Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean-up AST construction in syntax::ext #6611

Merged
merged 6 commits into from
May 21, 2013

Conversation

huonw
Copy link
Member

@huonw huonw commented May 19, 2013

Fixes #6578 by merging the 3 different ways to build an AST into a single AstBuilder trait, creating a more uniform and briefer interface.

Also, converts the ext_ctxt trait-object to be a plain struct, as well as renaming it to ExtCtxt.

Seems to make expansion slightly faster for the normal case (e.g. libcore and libstd), but slower for librustc (slightly) and libsyntax (0.3s -> 0.8s! I'm investigating this, but I'd prefer this patch to land relatively quickly.).

git blame suggests maybe @graydon or @erickt are familiar with this area of the code. r?

@brson
Copy link
Contributor

brson commented May 20, 2013

/cc @jbclements

bors added a commit that referenced this pull request May 21, 2013
Fixes #6578 by merging the 3 different ways to build an AST into a single `AstBuilder` trait, creating a more uniform and briefer interface.

Also, converts the `ext_ctxt` trait-object to be a plain struct, as well as renaming it to `ExtCtxt`.

Seems to make expansion slightly faster for the normal case (e.g. `libcore` and `libstd`), but slower for `librustc` (slightly) and `libsyntax` (0.3s -> 0.8s! I'm investigating this, but I'd prefer this patch to land relatively quickly.).

`git blame` suggests maybe @graydon or @erickt are familiar with this area of the code. r?
@bors bors closed this May 21, 2013
@bors bors merged commit a59bec4 into rust-lang:incoming May 21, 2013
@huonw huonw deleted the syntax-ext-no-dup branch May 23, 2013 05:21
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jan 30, 2021
Fix the reversed suggestion message of `stable_sort_primitive`.

Now Clippy emits `stable_sort_primitive` warning as follows:

```
warning: used sort instead of sort_unstable to sort primitive type `usize`
  --> src\asm.rs:41:13
   |
41 |             self.successors.sort();
   |             ^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.successors.sort_unstable()`
   |
   = note: `#[warn(clippy::stable_sort_primitive)]` on by default
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#stable_sort_primitive
```

I think the position of `sort` and `sort_unstable` in the first line should be reversed.

changelog: Fix the reversed suggestion message of `stable_sort_primitive`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants