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

Rerun build script on RUSTC_BOOTSTRAP change #330

Merged
merged 1 commit into from
Dec 25, 2023
Merged

Rerun build script on RUSTC_BOOTSTRAP change #330

merged 1 commit into from
Dec 25, 2023

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented Dec 25, 2023

Equivalent of dtolnay/thiserror#269.

Example failure mode without this PR:

pub fn repro(e: &anyhow::Error) -> &std::backtrace::Backtrace {
    e.backtrace()
}
$ cargo +stable check  #(expected failure)
   Compiling anyhow v1.0.76
    Checking repro v0.0.0
error[E0599]: no method named `backtrace` found for reference `&anyhow::Error` in the current scope
 --> src/lib.rs:2:7
  |
2 |     e.backtrace()
  |       ^^^^^^^^^ method not found in `&Error`

For more information about this error, try `rustc --explain E0599`.
error: could not compile `repro` due to previous error
$ RUSTC_BOOTSTRAP=1 cargo +stable check  #(should work, but doesn't)
    Checking repro v0.0.0
error[E0599]: no method named `backtrace` found for reference `&anyhow::Error` in the current scope
 --> src/lib.rs:2:7
  |
2 |     e.backtrace()
  |       ^^^^^^^^^ method not found in `&Error`

For more information about this error, try `rustc --explain E0599`.
error: could not compile `repro` due to previous error
$ cargo +stable clean
     Removed 30 files, 9.9MiB total
$ RUSTC_BOOTSTRAP=1 cargo +stable check
   Compiling anyhow v1.0.76
    Checking repro v0.0.0
    Finished dev [unoptimized + debuginfo] target(s) in 0.59s

After this PR: RUSTC_BOOTSTRAP=1 cargo +stable check works the first time.

@dtolnay dtolnay merged commit 5121cd2 into master Dec 25, 2023
19 checks passed
@dtolnay dtolnay deleted the bootstrap branch December 25, 2023 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant