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

Respect RUST_BACKTRACE for delayed bugs #112359

Merged

Conversation

Noratrieb
Copy link
Member

Sometimes, especially with MIR validation, the backtraces from delayed bugs are noise and make it harder to look at them. Respect the environment variable and don't print it when the user doesn't want it.

Sometimes, especially with MIR validation, the backtraces from delayed
bugs are noise and make it harder to look at them. Respect the
environment variable and don't print it when the user doesn't want it.
@rustbot
Copy link
Collaborator

rustbot commented Jun 6, 2023

r? @oli-obk

(rustbot has picked a reviewer for you, use r? to override)

@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 Jun 6, 2023
@Noratrieb
Copy link
Member Author

it worked when i tested it at first but now it doesn't work again, somethings wrong

@Noratrieb Noratrieb marked this pull request as draft June 6, 2023 19:28
@Noratrieb Noratrieb marked this pull request as ready for review June 6, 2023 19:34
@Noratrieb
Copy link
Member Author

it works just fine, i just held it wrong.
example:

error: internal compiler error: broken MIR in Item(DefId(0:21 ~ uwu[d045]::{impl#0}::deserialize)) (after pass PreCodegen) at bb0[1]:
                                Field projection `(*_2).0` specified type `u32`, but actual type is `<[<T as Archive>::Archived] as ArchivePointee>::ArchivedMetadata`
  --> uwu.rs:21:57
   |
21 |     let _a: <[T] as ArchivePointee>::ArchivedMetadata = v.metadata;
   |                                                         ^^^^^^^^^^
   |
   = note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:354:30 - disabled backtrace

error: internal compiler error: broken MIR in Item(DefId(0:21 ~ uwu[d045]::{impl#0}::deserialize)) (after phase change to runtime-optimized) at bb0[1]:
                                Field projection `(*_2).0` specified type `u32`, but actual type is `<[<T as Archive>::Archived] as ArchivePointee>::ArchivedMetadata`
  --> uwu.rs:21:57
   |
21 |     let _a: <[T] as ArchivePointee>::ArchivedMetadata = v.metadata;
   |                                                         ^^^^^^^^^^
   |
   = note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:354:30 - disabled backtrace

Copy link
Member

@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

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

r=me if ci is green

@Noratrieb
Copy link
Member Author

@bors r=compiler-errors
ci is green

@bors
Copy link
Contributor

bors commented Jun 6, 2023

📌 Commit 7098092 has been approved by compiler-errors

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 Jun 6, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 7, 2023
Rollup of 6 pull requests

Successful merges:

 - rust-lang#112076 (Fall back to bidirectional normalizes-to if no subst-relate candidate in alias-relate goal)
 - rust-lang#112122 (Add `-Ztrait-solver=next-coherence`)
 - rust-lang#112251 (rustdoc: convert `if let Some()` that always matches to variable)
 - rust-lang#112345 (fix(expand): prevent infinity loop in macro containing only "///")
 - rust-lang#112359 (Respect `RUST_BACKTRACE` for delayed bugs)
 - rust-lang#112382 (download-rustc: Fix `x test core` on MacOS)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 1dc4b40 into rust-lang:master Jun 7, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jun 7, 2023
@Noratrieb Noratrieb deleted the i-can-only-handle-so-many-backtraces branch June 7, 2023 18:44
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.

5 participants