-
Notifications
You must be signed in to change notification settings - Fork 13.4k
const-eval error: always say in which item the error occurred #142008
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
base: master
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
Once #142015 lands, do we even still want this? The first label always points inside the "root constant" (I forgot about that), so we don't have to repeat the name of that constant. It's kind of unnecessary that we spell out whether it's a static or const but 🤷 |
I think we still want this PR just as a simplification without any downsides |
☔ The latest upstream changes (presumably #142081) made this pull request unmergeable. Please resolve the merge conflicts. |
6a9919e
to
c78beb8
Compare
Okay, now this looks as expected. :) I also replaced "failed here" by "failed inside this call" when the label is pointing at the top of an (inverted) stack trace rather than the fine-grained failure location. @rustbot ready |
This comment has been minimized.
This comment has been minimized.
c78beb8
to
03c440b
Compare
The Miri subtree was changed cc @rust-lang/miri |
This comment has been minimized.
This comment has been minimized.
also adjust the wording a little so that we don't say "the error occurred here" for two different spans
03c440b
to
17946c2
Compare
@bors r+ |
…oli-obk const-eval error: always say in which item the error occurred I don't see why "is this generic" should make a difference. It may be reasonable to key this on whether the error occurs in a `const fn` that was invoked by a const (making it non-obvious which constant it is) vs inside the body of the const. r? `@oli-obk`
Rollup of 14 pull requests Successful merges: - #138062 (Enable Non-determinism of float operations in Miri and change std tests ) - #140560 (Allow `#![doc(test(attr(..)))]` everywhere) - #141001 (Make NonZero<char> possible) - #141295 (Stabilize `if let` guards (`feature(if_let_guard)`)) - #141435 (Add (back) `unsupported_calling_conventions` lint to reject more invalid calling conventions) - #141447 (Document representation of `Option<unsafe fn()>`) - #142008 (const-eval error: always say in which item the error occurred) - #142053 (Add new Tier-3 targets: `loongarch32-unknown-none*`) - #142065 (Stabilize `const_eq_ignore_ascii_case`) - #142116 (Fix bootstrap tracing imports) - #142126 (Treat normalizing consts like normalizing types in deeply normalize) - #142140 (compiler: Sort and doc ExternAbi variants) - #142148 (compiler: Treat ForceWarning as a Warning for diagnostic level) - #142154 (get rid of spurious cfg(bootstrap)) r? `@ghost` `@rustbot` modify labels: rollup
…oli-obk const-eval error: always say in which item the error occurred I don't see why "is this generic" should make a difference. It may be reasonable to key this on whether the error occurs in a `const fn` that was invoked by a const (making it non-obvious which constant it is) vs inside the body of the const. r? ``@oli-obk``
Rollup of 7 pull requests Successful merges: - #141001 (Make NonZero<char> possible) - #141700 (Atomic intrinsics : use const generic ordering, part 2) - #141993 (Use the in-tree `compiler-builtins` for the sysroot) - #142008 (const-eval error: always say in which item the error occurred) - #142053 (Add new Tier-3 targets: `loongarch32-unknown-none*`) - #142132 (`tests/ui`: A New Order [6/N]) - #142179 (store `target.min_global_align` as an `Align`) r? `@ghost` `@rustbot` modify labels: rollup
…oli-obk const-eval error: always say in which item the error occurred I don't see why "is this generic" should make a difference. It may be reasonable to key this on whether the error occurs in a `const fn` that was invoked by a const (making it non-obvious which constant it is) vs inside the body of the const. r? ```@oli-obk```
Rollup of 6 pull requests Successful merges: - #141001 (Make NonZero<char> possible) - #141700 (Atomic intrinsics : use const generic ordering, part 2) - #142008 (const-eval error: always say in which item the error occurred) - #142053 (Add new Tier-3 targets: `loongarch32-unknown-none*`) - #142132 (`tests/ui`: A New Order [6/N]) - #142179 (store `target.min_global_align` as an `Align`) r? `@ghost` `@rustbot` modify labels: rollup
…oli-obk const-eval error: always say in which item the error occurred I don't see why "is this generic" should make a difference. It may be reasonable to key this on whether the error occurs in a `const fn` that was invoked by a const (making it non-obvious which constant it is) vs inside the body of the const. r? ````@oli-obk````
I don't see why "is this generic" should make a difference. It may be reasonable to key this on whether the error occurs in a
const fn
that was invoked by a const (making it non-obvious which constant it is) vs inside the body of the const.r? @oli-obk