Report the actual item that evaluation failed for#142015
Merged
bors merged 1 commit intorust-lang:masterfrom Jun 5, 2025
Merged
Report the actual item that evaluation failed for#142015bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
Collaborator
Member
|
Oh wow... good find! Can you add a test for this that has |
RalfJung
reviewed
Jun 4, 2025
Member
|
This would affect even automatically derived diagnostic types, wouldn't it? That's a pretty severe bug in the diagnostic infrastructure -- fields of separate diagnostic types shouldn't be mixed like that. Can you file an issue and reference it from the comment here? |
Contributor
Author
done |
Member
|
r=me when CI is green |
Contributor
Author
|
@bors r=RalfJung |
Collaborator
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Jun 5, 2025
Report the actual item that evaluation failed for instead of id of the last frame in the evaluation stack r? `@RalfJung` fixes rust-lang#142010
This was referenced Jun 5, 2025
bors
added a commit
that referenced
this pull request
Jun 5, 2025
Rollup of 7 pull requests Successful merges: - #141709 (jsondocck: Refactor directive handling) - #141974 (`tests/ui`: A New Order [4/N]) - #141989 (rustdoc-json-type: Depend on `serde` and `serde_derive` seperately) - #142015 (Report the actual item that evaluation failed for) - #142026 (bootstrap: Fix file permissions when dereferencing symlinks) - #142032 (Fix parsing of frontmatters with inner hyphens) - #142036 (Update the `compiler-builtins` subtree) r? `@ghost` `@rustbot` modify labels: rollup
github-actions bot
pushed a commit
to rust-lang/miri
that referenced
this pull request
Jun 6, 2025
Rollup of 7 pull requests Successful merges: - rust-lang/rust#141709 (jsondocck: Refactor directive handling) - rust-lang/rust#141974 (`tests/ui`: A New Order [4/N]) - rust-lang/rust#141989 (rustdoc-json-type: Depend on `serde` and `serde_derive` seperately) - rust-lang/rust#142015 (Report the actual item that evaluation failed for) - rust-lang/rust#142026 (bootstrap: Fix file permissions when dereferencing symlinks) - rust-lang/rust#142032 (Fix parsing of frontmatters with inner hyphens) - rust-lang/rust#142036 (Update the `compiler-builtins` subtree) r? `@ghost` `@rustbot` modify labels: rollup
github-actions bot
pushed a commit
to rust-lang/rustc-dev-guide
that referenced
this pull request
Jun 9, 2025
Rollup of 7 pull requests Successful merges: - rust-lang/rust#141709 (jsondocck: Refactor directive handling) - rust-lang/rust#141974 (`tests/ui`: A New Order [4/N]) - rust-lang/rust#141989 (rustdoc-json-type: Depend on `serde` and `serde_derive` seperately) - rust-lang/rust#142015 (Report the actual item that evaluation failed for) - rust-lang/rust#142026 (bootstrap: Fix file permissions when dereferencing symlinks) - rust-lang/rust#142032 (Fix parsing of frontmatters with inner hyphens) - rust-lang/rust#142036 (Update the `compiler-builtins` subtree) r? `@ghost` `@rustbot` modify labels: rollup
tgross35
pushed a commit
to tgross35/compiler-builtins
that referenced
this pull request
Jun 9, 2025
Rollup of 7 pull requests Successful merges: - rust-lang/rust#141709 (jsondocck: Refactor directive handling) - rust-lang/rust#141974 (`tests/ui`: A New Order [4/N]) - rust-lang/rust#141989 (rustdoc-json-type: Depend on `serde` and `serde_derive` seperately) - rust-lang/rust#142015 (Report the actual item that evaluation failed for) - rust-lang/rust#142026 (bootstrap: Fix file permissions when dereferencing symlinks) - rust-lang/rust#142032 (Fix parsing of frontmatters with inner hyphens) - rust-lang/rust#142036 (Update the `compiler-builtins` subtree) r? `@ghost` `@rustbot` modify labels: rollup
github-merge-queue bot
pushed a commit
to model-checking/kani
that referenced
this pull request
Jun 14, 2025
Culprit PRs: - June 4: rust-lang/rust#141741 - June 5: rust-lang/rust#142015 - June 6: rust-lang/rust#138677, rust-lang/rust#142005 - June 7: rust-lang/rust#142012 - June 9: rust-lang/rust#141700 - June 10: rust-lang/rust#142179, rust-lang/rust#141803 Resolves #4140 By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.
tautschnig
pushed a commit
to model-checking/verify-rust-std
that referenced
this pull request
Jun 17, 2025
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#141709 (jsondocck: Refactor directive handling) - rust-lang#141974 (`tests/ui`: A New Order [4/N]) - rust-lang#141989 (rustdoc-json-type: Depend on `serde` and `serde_derive` seperately) - rust-lang#142015 (Report the actual item that evaluation failed for) - rust-lang#142026 (bootstrap: Fix file permissions when dereferencing symlinks) - rust-lang#142032 (Fix parsing of frontmatters with inner hyphens) - rust-lang#142036 (Update the `compiler-builtins` subtree) r? `@ghost` `@rustbot` modify labels: rollup
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Jun 25, 2025
…li-obk Add runtime check to avoid overwrite arg in `Diag` ## Origin PR description At first, I set up a `debug_assert` check for the arg method to make sure that `args` in `Diag` aren't easily overwritten, and I added the `remove_arg()` method, so that if you do need to overwrite an arg, then you can explicitly call `remove_arg()` to remove it first, then call `arg()` to overwrite it. For the code before the rust-lang#142015 change, it won't compile because it will report an error ``` arg `instance`already exists. ``` This PR also modifies all diagnostics that fail the check to pass the check. There are two cases of check failure: 1. ~~Between *the parent diagnostic and the subdiagnostic*, or *between the subdiagnostics* have the same field between them. In this case, I renamed the conflicting fields.~~ 2. ~~For subdiagnostics stored in `Vec`, the rendering may iteratively write the same arg over and over again. In this case, I changed the auto-generation with `derive(SubDiagnostic)` to manually implementing `SubDiagnostic` and manually rendered it with `eagerly_translate()`, similar to rust-lang#142031 (comment), and after rendering it I manually deleted useless arg with the newly added `remove_arg` method.~~ ## Final Decision After trying and discussing, we made a final decision. For `#[derive(Subdiagnostic)]`, This PR made two changes: 1. After the subdiagnostic is rendered, remove all args of this subdiagnostic, which allows for usage like `Vec<Subdiag>`. 2. Store `diag.args` before setting arguments, so that you can restore the contents of the main diagnostic after deleting the arguments after subdiagnostic is rendered, to avoid deleting the main diagnostic's arg when they have the same name args.
jdonszelmann
added a commit
to jdonszelmann/rust
that referenced
this pull request
Jun 25, 2025
…li-obk Add runtime check to avoid overwrite arg in `Diag` ## Origin PR description At first, I set up a `debug_assert` check for the arg method to make sure that `args` in `Diag` aren't easily overwritten, and I added the `remove_arg()` method, so that if you do need to overwrite an arg, then you can explicitly call `remove_arg()` to remove it first, then call `arg()` to overwrite it. For the code before the rust-lang#142015 change, it won't compile because it will report an error ``` arg `instance`already exists. ``` This PR also modifies all diagnostics that fail the check to pass the check. There are two cases of check failure: 1. ~~Between *the parent diagnostic and the subdiagnostic*, or *between the subdiagnostics* have the same field between them. In this case, I renamed the conflicting fields.~~ 2. ~~For subdiagnostics stored in `Vec`, the rendering may iteratively write the same arg over and over again. In this case, I changed the auto-generation with `derive(SubDiagnostic)` to manually implementing `SubDiagnostic` and manually rendered it with `eagerly_translate()`, similar to rust-lang#142031 (comment), and after rendering it I manually deleted useless arg with the newly added `remove_arg` method.~~ ## Final Decision After trying and discussing, we made a final decision. For `#[derive(Subdiagnostic)]`, This PR made two changes: 1. After the subdiagnostic is rendered, remove all args of this subdiagnostic, which allows for usage like `Vec<Subdiag>`. 2. Store `diag.args` before setting arguments, so that you can restore the contents of the main diagnostic after deleting the arguments after subdiagnostic is rendered, to avoid deleting the main diagnostic's arg when they have the same name args.
rust-timer
added a commit
that referenced
this pull request
Jun 26, 2025
Rollup merge of #142724 - xizheyin:avoid_overwrite_args, r=oli-obk Add runtime check to avoid overwrite arg in `Diag` ## Origin PR description At first, I set up a `debug_assert` check for the arg method to make sure that `args` in `Diag` aren't easily overwritten, and I added the `remove_arg()` method, so that if you do need to overwrite an arg, then you can explicitly call `remove_arg()` to remove it first, then call `arg()` to overwrite it. For the code before the #142015 change, it won't compile because it will report an error ``` arg `instance`already exists. ``` This PR also modifies all diagnostics that fail the check to pass the check. There are two cases of check failure: 1. ~~Between *the parent diagnostic and the subdiagnostic*, or *between the subdiagnostics* have the same field between them. In this case, I renamed the conflicting fields.~~ 2. ~~For subdiagnostics stored in `Vec`, the rendering may iteratively write the same arg over and over again. In this case, I changed the auto-generation with `derive(SubDiagnostic)` to manually implementing `SubDiagnostic` and manually rendered it with `eagerly_translate()`, similar to #142031 (comment), and after rendering it I manually deleted useless arg with the newly added `remove_arg` method.~~ ## Final Decision After trying and discussing, we made a final decision. For `#[derive(Subdiagnostic)]`, This PR made two changes: 1. After the subdiagnostic is rendered, remove all args of this subdiagnostic, which allows for usage like `Vec<Subdiag>`. 2. Store `diag.args` before setting arguments, so that you can restore the contents of the main diagnostic after deleting the arguments after subdiagnostic is rendered, to avoid deleting the main diagnostic's arg when they have the same name args.
github-actions bot
pushed a commit
to rust-lang/rustc-dev-guide
that referenced
this pull request
Jun 26, 2025
Add runtime check to avoid overwrite arg in `Diag` ## Origin PR description At first, I set up a `debug_assert` check for the arg method to make sure that `args` in `Diag` aren't easily overwritten, and I added the `remove_arg()` method, so that if you do need to overwrite an arg, then you can explicitly call `remove_arg()` to remove it first, then call `arg()` to overwrite it. For the code before the rust-lang/rust#142015 change, it won't compile because it will report an error ``` arg `instance`already exists. ``` This PR also modifies all diagnostics that fail the check to pass the check. There are two cases of check failure: 1. ~~Between *the parent diagnostic and the subdiagnostic*, or *between the subdiagnostics* have the same field between them. In this case, I renamed the conflicting fields.~~ 2. ~~For subdiagnostics stored in `Vec`, the rendering may iteratively write the same arg over and over again. In this case, I changed the auto-generation with `derive(SubDiagnostic)` to manually implementing `SubDiagnostic` and manually rendered it with `eagerly_translate()`, similar to rust-lang/rust#142031 (comment), and after rendering it I manually deleted useless arg with the newly added `remove_arg` method.~~ ## Final Decision After trying and discussing, we made a final decision. For `#[derive(Subdiagnostic)]`, This PR made two changes: 1. After the subdiagnostic is rendered, remove all args of this subdiagnostic, which allows for usage like `Vec<Subdiag>`. 2. Store `diag.args` before setting arguments, so that you can restore the contents of the main diagnostic after deleting the arguments after subdiagnostic is rendered, to avoid deleting the main diagnostic's arg when they have the same name args.
datdenkikniet
added a commit
to rtic-rs/rtic
that referenced
this pull request
Sep 3, 2025
This message was changed in rust 1.89 See: https://users.rust-lang.org/t/regression-of-panic-message-in-const-context-since-1-89/133161 Probably due to rust-lang/rust#142015
AfoHT
pushed a commit
to rtic-rs/rtic
that referenced
this pull request
Sep 17, 2025
This message was changed in rust 1.89 See: https://users.rust-lang.org/t/regression-of-panic-message-in-const-context-since-1-89/133161 Probably due to rust-lang/rust#142015
tgross35
pushed a commit
to rust-lang/compiler-builtins
that referenced
this pull request
Jan 31, 2026
Rollup of 7 pull requests Successful merges: - rust-lang/rust#141709 (jsondocck: Refactor directive handling) - rust-lang/rust#141974 (`tests/ui`: A New Order [4/N]) - rust-lang/rust#141989 (rustdoc-json-type: Depend on `serde` and `serde_derive` seperately) - rust-lang/rust#142015 (Report the actual item that evaluation failed for) - rust-lang/rust#142026 (bootstrap: Fix file permissions when dereferencing symlinks) - rust-lang/rust#142032 (Fix parsing of frontmatters with inner hyphens) - rust-lang/rust#142036 (Update the `compiler-builtins` subtree) r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
instead of id of the last frame in the evaluation stack
r? @RalfJung
fixes #142010