-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Lint against Symbol::intern on a string literal #133545
Conversation
r? @Nadrieril rustbot has assigned @Nadrieril. Use |
This comment has been minimized.
This comment has been minimized.
f8edb84
to
ebe0e42
Compare
Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 |
This comment has been minimized.
This comment has been minimized.
ebe0e42
to
4d6e8f8
Compare
r? jieyouxu |
4d6e8f8
to
1619597
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I concur with previous remarks that this is should not be universally applied.
1619597
to
dd442e4
Compare
Reverted the cases where this is less than helpful, but I've left the others to match the existing symbol naming rules. Then again, it looks like the rule isn't very consistently applied (there's a few symbols with dashes which don't contain |
In my opinion, if the (1) Either we don't make it a For stuff like |
dd442e4
to
71b698c
Compare
Switched to only passing the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@bors r+ rollup |
…youxu Lint against Symbol::intern on a string literal Disabled in tests where this doesn't make much sense
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#133089 (Stabilize noop_waker) - rust-lang#133522 (Don't suggest restricting bound with unstable traits on stable and mention it's unstable on nightly) - rust-lang#133545 (Lint against Symbol::intern on a string literal) - rust-lang#133558 (Structurally resolve in `probe_adt`) - rust-lang#133753 (Reduce false positives on some common cases from if-let-rescope lint) - rust-lang#133762 (stabilize const_{size,align}_of_val) - rust-lang#133777 (document -Zrandomize-layout in the unstable book) - rust-lang#133779 (Use correct `hir_id` for array const arg infers) r? `@ghost` `@rustbot` modify labels: rollup
…youxu Lint against Symbol::intern on a string literal Disabled in tests where this doesn't make much sense
…youxu Lint against Symbol::intern on a string literal Disabled in tests where this doesn't make much sense
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#133522 (Don't suggest restricting bound with unstable traits on stable and mention it's unstable on nightly) - rust-lang#133545 (Lint against Symbol::intern on a string literal) - rust-lang#133558 (Structurally resolve in `probe_adt`) - rust-lang#133753 (Reduce false positives on some common cases from if-let-rescope lint) - rust-lang#133762 (stabilize const_{size,align}_of_val) - rust-lang#133777 (document -Zrandomize-layout in the unstable book) - rust-lang#133779 (Use correct `hir_id` for array const arg infers) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#132612 (Gate async fn trait bound modifier on `async_trait_bounds`) - rust-lang#133545 (Lint against Symbol::intern on a string literal) - rust-lang#133558 (Structurally resolve in `probe_adt`) - rust-lang#133696 (stabilize const_collections_with_hasher and build_hasher_default_const_new) - rust-lang#133753 (Reduce false positives on some common cases from if-let-rescope lint) - rust-lang#133762 (stabilize const_{size,align}_of_val) - rust-lang#133777 (document -Zrandomize-layout in the unstable book) - rust-lang#133779 (Use correct `hir_id` for array const arg infers) - rust-lang#133796 (Update the definition of `borrowing_sub`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#133545 - clubby789:symbol-intern-lit, r=jieyouxu Lint against Symbol::intern on a string literal Disabled in tests where this doesn't make much sense
…youxu Lint against Symbol::intern on a string literal Disabled in tests where this doesn't make much sense
…ing-literal, r=jieyouxu allow `symbol_intern_string_literal` lint in test modules Since rust-lang#133545, `x check compiler --stage 1` no longer works because compiler test modules trigger `symbol_intern_string_literal` lint errors. Bootstrap shouldn't control when to ignore or enable this lint in the compiler tree (using `Kind != Test` was ineffective for obvious reasons). Also, conditionally adding this rustflag invalidates the build cache between `x test` and other commands. This PR removes the `Kind` check from bootstrap and handles it directly in the compiler tree in a more natural way.
…ing-literal, r=jieyouxu allow `symbol_intern_string_literal` lint in test modules Since rust-lang#133545, `x check compiler --stage 1` no longer works because compiler test modules trigger `symbol_intern_string_literal` lint errors. Bootstrap shouldn't control when to ignore or enable this lint in the compiler tree (using `Kind != Test` was ineffective for obvious reasons). Also, conditionally adding this rustflag invalidates the build cache between `x test` and other commands. This PR removes the `Kind` check from bootstrap and handles it directly in the compiler tree in a more natural way.
…ing-literal, r=jieyouxu allow `symbol_intern_string_literal` lint in test modules Since rust-lang#133545, `x check compiler --stage 1` no longer works because compiler test modules trigger `symbol_intern_string_literal` lint errors. Bootstrap shouldn't control when to ignore or enable this lint in the compiler tree (using `Kind != Test` was ineffective for obvious reasons). Also, conditionally adding this rustflag invalidates the build cache between `x test` and other commands. This PR removes the `Kind` check from bootstrap and handles it directly in the compiler tree in a more natural way.
Rollup merge of rust-lang#134173 - onur-ozkan:allow-symbol-intern-string-literal, r=jieyouxu allow `symbol_intern_string_literal` lint in test modules Since rust-lang#133545, `x check compiler --stage 1` no longer works because compiler test modules trigger `symbol_intern_string_literal` lint errors. Bootstrap shouldn't control when to ignore or enable this lint in the compiler tree (using `Kind != Test` was ineffective for obvious reasons). Also, conditionally adding this rustflag invalidates the build cache between `x test` and other commands. This PR removes the `Kind` check from bootstrap and handles it directly in the compiler tree in a more natural way.
Disabled in tests where this doesn't make much sense