-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Make rustc consider itself a stable compiler when RUSTC_BOOTSTRAP=-1
#132993
Conversation
I was thinking about doing this myself recently, because we have some code paths for adjusting |
7d8d712
to
151d885
Compare
151d885
to
d6f3b18
Compare
// also affected by `RUSTC_BOOTSTRAP`. | ||
//@[force_stable] rustc-env:RUSTC_BOOTSTRAP=-1 | ||
//@[force_stable] compile-flags: -Z unstable-options | ||
//@[force_stable] regex-error-pattern: error: the option `Z` is only accepted on the nightly compiler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
N.B.: this doesn't check in a snapshot because the exact error message will be different between beta/stable/dev depending on channel info.
d6f3b18
to
c130501
Compare
Rebased and fixed a comment in order for sentence to sentence, no functional changes. |
@bors r+ rollup |
Rollup of 7 pull requests Successful merges: - rust-lang#132795 (Check `use<..>` in RPITIT for refinement) - rust-lang#132944 (add parentheses when unboxing suggestion needed) - rust-lang#132993 (Make rustc consider itself a stable compiler when `RUSTC_BOOTSTRAP=-1`) - rust-lang#133130 (`suggest_borrow_generic_arg`: instantiate clauses properly) - rust-lang#133133 (rustdoc-search: add standalone trailing `::` test) - rust-lang#133143 (Diagnostics for let mut in item context) - rust-lang#133147 (Fixup some test directives) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#132993 - jieyouxu:i_am_very_stable, r=chenyukang Make rustc consider itself a stable compiler when `RUSTC_BOOTSTRAP=-1` Addresses rust-lang#123404 to allow test writers to specify `//@ rustc-env:RUSTC_BOOTSTRAP=-1` to have a given rustc consider itself a stable rustc. This is only intended for testing usages. I did not use `RUSTC_BOOTSTRAP=0` because that can be confusing, i.e. one might think that means "not bootstrapping", but "forcing a given rustc to consider itself a stable compiler" is a different use case. I also added a specific test to check `RUSTC_BOOTSTRAP`'s various values and how that interacts with rustc's stability story w.r.t. features and cli flags. Noticed when trying to write a test for enabling ICE file dumping on stable. Dunno if this needs a compiler FCP or MCP, but I can file an MCP or ask someone to start an FCP if needed. Note that `RUSTC_BOOTSTRAP` is a perma-unstable env var and has no stability guarantees (heh) whatsoever. This does not affect bootstrapping because bootstrap never sets `RUSTC_BOOTSTRAP=-1`. If someone does set that when bootstrapping, it is considered PEBKAC. Accompanying dev-guide PR: rust-lang/rustc-dev-guide#2136 cc `@estebank` and `@rust-lang/wg-diagnostics` for FYI
Maybe we could replace the empty feature list in
|
Yeah, that is actually somewhat inaccurate if you really wanted to emulate a |
Addresses #123404 to allow test writers to specify
//@ rustc-env:RUSTC_BOOTSTRAP=-1
to have a given rustc consider itself a stable rustc. This is only intended for testing usages.I did not use
RUSTC_BOOTSTRAP=0
because that can be confusing, i.e. one might think that means "not bootstrapping", but "forcing a given rustc to consider itself a stable compiler" is a different use case.I also added a specific test to check
RUSTC_BOOTSTRAP
's various values and how that interacts with rustc's stability story w.r.t. features and cli flags.Noticed when trying to write a test for enabling ICE file dumping on stable.
Dunno if this needs a compiler FCP or MCP, but I can file an MCP or ask someone to start an FCP if needed. Note that
RUSTC_BOOTSTRAP
is a perma-unstable env var and has no stability guarantees (heh) whatsoever. This does not affect bootstrapping because bootstrap never setsRUSTC_BOOTSTRAP=-1
. If someone does set that when bootstrapping, it is considered PEBKAC.Accompanying dev-guide PR: rust-lang/rustc-dev-guide#2136
cc @estebank and @rust-lang/wg-diagnostics for FYI