-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Tweak wording of non-const traits used as const bounds #134094
Conversation
HIR ty lowering was modified cc @fmease |
@@ -2,7 +2,7 @@ error: const `impl` for trait `FromResidual` which is not marked with `#[const_t | |||
--> $DIR/const-try.rs:15:12 | |||
| | |||
LL | impl const FromResidual<Error> for TryMe { | |||
| ^^^^^^^^^^^^^^^^^^^ | |||
| ^^^^^^^^^^^^^^^^^^^ not marked with `#[const_trait]` | |||
| | |||
= note: marking a trait with `#[const_trait]` ensures all default method bodies are `const` |
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.
Unrelated, but this note is kinda nonsense?
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.
It's an untouched note since at least 2022 (and before that it was moved from somewhere else), so it'll be hard to figure out what they wanted to say then :)
I think that with the current context we can remove this?
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.
sure, or it could just be guaranteed to only trigger within default methods, but that might be difficult to fix, and i'd rather not see hacks to do that.
tests/ui/traits/const-traits/const-bounds-non-const-trait.stderr
Outdated
Show resolved
Hide resolved
This PR modifies cc @jieyouxu |
This comment has been minimized.
This comment has been minimized.
853ca8c
to
2420dd6
Compare
This comment has been minimized.
This comment has been minimized.
please fix ci, then r=me |
2420dd6
to
37267fd
Compare
This comment has been minimized.
This comment has been minimized.
37267fd
to
781c622
Compare
@bors r+ rollup |
This comment has been minimized.
This comment has been minimized.
@bors r- |
Use verbose suggestions and add additional labels/notes. Add more test cases for stable/nightly and feature enabled/disabled.
781c622
to
4007fc9
Compare
@bors r=compiler-errors |
…piler-errors Tweak wording of non-const traits used as const bounds Use verbose suggestions and add additional labels/notes. r? `@compiler-errors`
Rollup of 9 pull requests Successful merges: - rust-lang#134042 (Add the `power8-crypto` target feature) - rust-lang#134070 (Some asm! diagnostic adjustments and a papercut fix) - rust-lang#134094 (Tweak wording of non-const traits used as const bounds) - rust-lang#134100 (Remove rustc_const_stable attribute on const NOOP) - rust-lang#134103 (Don't ICE when encountering never in range pattern) - rust-lang#134113 (run-make: Fix `assert_stderr_not_contains_regex`) - rust-lang#134115 (rustc_target: ppc64 target string fixes for LLVM 20) - rust-lang#134116 (stabilize const_nonnull_new) - rust-lang#134120 (Remove Felix from ping groups and review rotation) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 9 pull requests Successful merges: - rust-lang#133583 (Fix type (exit → exist)) - rust-lang#134042 (Add the `power8-crypto` target feature) - rust-lang#134094 (Tweak wording of non-const traits used as const bounds) - rust-lang#134100 (Remove rustc_const_stable attribute on const NOOP) - rust-lang#134103 (Don't ICE when encountering never in range pattern) - rust-lang#134113 (run-make: Fix `assert_stderr_not_contains_regex`) - rust-lang#134115 (rustc_target: ppc64 target string fixes for LLVM 20) - rust-lang#134116 (stabilize const_nonnull_new) - rust-lang#134120 (Remove Felix from ping groups and review rotation) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 9 pull requests Successful merges: - rust-lang#133583 (Fix type (exit → exist)) - rust-lang#134042 (Add the `power8-crypto` target feature) - rust-lang#134094 (Tweak wording of non-const traits used as const bounds) - rust-lang#134100 (Remove rustc_const_stable attribute on const NOOP) - rust-lang#134103 (Don't ICE when encountering never in range pattern) - rust-lang#134113 (run-make: Fix `assert_stderr_not_contains_regex`) - rust-lang#134115 (rustc_target: ppc64 target string fixes for LLVM 20) - rust-lang#134116 (stabilize const_nonnull_new) - rust-lang#134120 (Remove Felix from ping groups and review rotation) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 9 pull requests Successful merges: - rust-lang#133583 (Fix type (exit → exist)) - rust-lang#134042 (Add the `power8-crypto` target feature) - rust-lang#134094 (Tweak wording of non-const traits used as const bounds) - rust-lang#134100 (Remove rustc_const_stable attribute on const NOOP) - rust-lang#134103 (Don't ICE when encountering never in range pattern) - rust-lang#134113 (run-make: Fix `assert_stderr_not_contains_regex`) - rust-lang#134115 (rustc_target: ppc64 target string fixes for LLVM 20) - rust-lang#134116 (stabilize const_nonnull_new) - rust-lang#134120 (Remove Felix from ping groups and review rotation) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#134094 - estebank:const-trait-errors, r=compiler-errors Tweak wording of non-const traits used as const bounds Use verbose suggestions and add additional labels/notes. r? ``@compiler-errors``
Use verbose suggestions and add additional labels/notes.
r? @compiler-errors