-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Rustup #6389
Merged
Merged
Rustup #6389
Commits on Nov 24, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 9f1505c - Browse repository at this point
Copy the full SHA 9f1505cView commit details -
clippy: Remove now obsolete lintlist module
Also stop updating the lintlist module in clippy_dev update_lints
Configuration menu - View commit details
-
Copy full SHA for 03f0431 - Browse repository at this point
Copy the full SHA 03f0431View commit details
Commits on Nov 25, 2020
-
Move lev_distance to rustc_ast, make non-generic
rustc_ast currently has a few dependencies on rustc_lexer. Ideally, an AST would not have any dependency its lexer, for minimizing unnecessarily design-time dependencies. Breaking this dependency would also have practical benefits, since modifying rustc_lexer would not trigger a rebuild of rustc_ast. This commit does not remove the rustc_ast --> rustc_lexer dependency, but it does remove one of the sources of this dependency, which is the code that handles fuzzy matching between symbol names for making suggestions in diagnostics. Since that code depends only on Symbol, it is easy to move it to rustc_span. It might even be best to move it to a separate crate, since other tools such as Cargo use the same algorithm, and have simply contain a duplicate of the code. This changes the signature of find_best_match_for_name so that it is no longer generic over its input. I checked the optimized binaries, and this function was duplicated at nearly every call site, because most call sites used short-lived iterator chains, generic over Map and such. But there's no good reason for a function like this to be generic, since all it does is immediately convert the generic input (the Iterator impl) to a concrete Vec<Symbol>. This has all of the costs of generics (duplicated method bodies) with no benefit. Changing find_best_match_for_name to be non-generic removed about 10KB of code from the optimized binary. I know it's a drop in the bucket, but we have to start reducing binary size, and beginning to tame over-use of generics is part of that.
Arlie Davis committedNov 25, 2020 Configuration menu - View commit details
-
Copy full SHA for f682783 - Browse repository at this point
Copy the full SHA f682783View commit details
Commits on Nov 26, 2020
-
Auto merge of #77671 - flip1995:lint_list_always_plugins, r=oli-obk,M…
…anishearth Always print lints from plugins, if they're available Currently you can get a list of lints and lint groups by running `rustc -Whelp`. This prints an additional line at the end: ``` Compiler plugins can provide additional lints and lint groups. To see a listing of these, re-run `rustc -W help` with a crate filename. ``` Clippy is such a "compiler plugin", that provides additional lints. Running `clippy-driver -Whelp` (`rustc` wrapper) still only prints the rustc lints with the above message at the end. But when running `clippy-driver -Whelp main.rs`, where `main.rs` is any rust file, it also prints Clippy lints. I don't think this is a good approach from a UX perspective: Why is a random file necessary to print a help message? This PR changes this behavior: Whenever a compiler callback registers lints, it is assumed that these lints come from a plugin and are printed without having to specify a Rust source file. Fixes rust-lang#6122 cc `@Manishearth` `@ebroto` for the Clippy changes.
Configuration menu - View commit details
-
Copy full SHA for f303168 - Browse repository at this point
Copy the full SHA f303168View commit details
Commits on Nov 27, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 0924d62 - Browse repository at this point
Copy the full SHA 0924d62View commit details -
Configuration menu - View commit details
-
Copy full SHA for e91d15f - Browse repository at this point
Copy the full SHA e91d15fView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.