Skip to content
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

Enable creating backtraces via -Ztreat-err-as-bug when stashing errors #122194

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Mar 8, 2024

r? @nnethercote

Otherwise I can't debug stashed errors because I can't find their source

@rustbot 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 Mar 8, 2024
#[allow(deprecated)]
Some(ErrorGuaranteed::unchecked_error_guaranteed())
}
Error => Some(self.span_delayed_bug(span, "stashing {key:?}")),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stashed diagnostics, argh, such a PITA.

Having to create a delayed bug for every single one is unfortunate. Is it possible to only do that when -Ztreat-err-as-bug is enabled? You haven't described the debugging much so I'm only guessing at what you're doing. Also a brief comment here explaining why a delayed bug is preferable to an unchecked ErrorGuarantee would be useful.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually like the use of span_delayed_bug over unchecked_error_guaranteed, and it's not like it's a perf issue

@nnethercote
Copy link
Contributor

Eh, fine.

@bors r+

@bors
Copy link
Contributor

bors commented Mar 12, 2024

📌 Commit cfbc1b9 has been approved by nnethercote

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 12, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 12, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#115141 (Update Windows platform support)
 - rust-lang#121865 (Add FileCheck annotations to MIR-opt unnamed-fields tests)
 - rust-lang#122000 (Fix 32-bit overflows in LLVM composite constants)
 - rust-lang#122194 (Enable creating backtraces via -Ztreat-err-as-bug when stashing errors)
 - rust-lang#122319 (Don't ICE when non-self part of trait goal is constrained in new solver)
 - rust-lang#122339 (Update books)
 - rust-lang#122342 (Update /NODEFAUTLIB comment for msvc)
 - rust-lang#122343 (Remove some unnecessary `allow(incomplete_features)` in the test suite)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 0b127d8 into rust-lang:master Mar 12, 2024
11 checks passed
@rustbot rustbot added this to the 1.78.0 milestone Mar 12, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 12, 2024
Rollup merge of rust-lang#122194 - oli-obk:stash_delay_bug, r=nnethercote

Enable creating backtraces via -Ztreat-err-as-bug when stashing errors

r? `@nnethercote`

Otherwise I can't debug stashed errors because I can't find their source
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants