You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a compiletest regression for the dbg! temporary-lifetime bug fixed in #154074
#149869 rewrote multi-argument dbg! expansion to avoid print tearing, but
accidentally caused borrowed temporaries to be dropped too early, triggering
E0716 on valid code (#153850). #154074 fixed the macro expansion and added a
library test, but that test only runs under ./x test library/std - there
was no tests/ui/ coverage.
rustbot
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Apr 24, 2026
rustbot has assigned @ShoyuVanilla.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.
I don't think there needs to be a ui test. dbg! is defined in std and the test is for code that should work, so having it tested as part of std makes the most sense to me. Those tests are also run by CI. Is there a policy I'm missing here? If anything, I should have marked it #[expect(dead_code)] instead of #[test] since it only needs to pass borrowck; having a separate //@ run-pass test seems excessive.
I don't think there needs to be a ui test. dbg! is defined in std and the test is for code that should work, so having it tested as part of std makes the most sense to me. Those tests are also run by CI. Is there a policy I'm missing here? If anything, I should have marked it #[expect(dead_code)] instead of #[test] since it only needs to pass borrowck; having a separate //@ run-pass test seems excessive.
You're right! the library test in tests.rs is run by CI, so a separate ui test is just duplication. I missed that when i looked at this. Closing.
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
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
5 participants
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.
Add a compiletest regression for the dbg! temporary-lifetime bug fixed in #154074
#149869 rewrote multi-argument
dbg!expansion to avoid print tearing, butaccidentally caused borrowed temporaries to be dropped too early, triggering
E0716 on valid code (#153850). #154074 fixed the macro expansion and added a
library test, but that test only runs under
./x test library/std- therewas no tests/ui/ coverage.