-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Rollup of 5 pull requests #135725
Rollup of 5 pull requests #135725
Conversation
When encountering a call corresponding to an item marked as unstable behind a feature flag, provide a structured suggestion pointing at where in the crate the `#![feature(..)]` needs to be written. ``` error: `foobar` is not yet stable as a const fn --> $DIR/const-stability-attribute-implies-no-feature.rs:12:5 | LL | foobar(); | ^^^^^^^^ | help: add `#![feature(const_foobar)]` to the crate attributes to enable | LL + #![feature(const_foobar)] | ``` Fix rust-lang#81370.
``` error: `size_of_val` is not yet stable as a const intrinsic --> $DIR/const-unstable-intrinsic.rs:17:9 | LL | unstable_intrinsic::size_of_val(&x); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable)]` to the crate attributes to enable help: add `#![feature(unstable)]` to the crate attributes to enable | LL + #![feature("unstable")] | ```
``` error[E0797]: base expression required after `..` --> $DIR/feature-gate-default-field-values.rs:62:21 | LL | let x = Foo { .. }; | ^ | help: add `#![feature(default_field_values)]` to the crate attributes to enable default values on `struct` fields | LL + #![feature(default_field_values)] | help: add a base expression here | LL | let x = Foo { ../* expr */ }; | ++++++++++ ```
Setting up the argument parser to parse no arguments is a tiny bit of wasted work, but avoids an otherwise-unnecessary special case. In particular, this lets us avoid having to deal with multiple different APIs to determine whether the compiler is nightly or not.
Signed-off-by: onur-ozkan <work@onurozkan.dev>
I know it would have made more sense to make this PR to the dev guide repo but I had already made the fix before I realized that.
Provide structured suggestion for `#![feature(..)]` in more cases Fix rust-lang#81370.
…e, r=jieyouxu create an issue template for bootstrap Resolves rust-lang#135593 cc `@rust-lang/bootstrap`
…, r=notriddle Remove unused `item-row` CSS class Seems like a CSS class we forgot to remove at some point. r? `@notriddle`
Don't skip argument parsing when running `rustc` with no arguments Setting up the argument parser to parse no arguments is a tiny bit of wasted work, but avoids an otherwise-unnecessary special case, in a scenario (printing a help message and quitting) where perf at this scale really doesn't matter anyway. In particular, this lets us avoid having to deal with multiple different APIs to determine whether the compiler is nightly or not. --- This special-case handling for rustc with no arguments is very very old (long predating 1.0), and used to be much simpler, without any need to set up boolean values to handle various conditional cases. So I don't think it was ever explicitly decided that having this special case was worth the extra complexity; it just started out simple and accumulated complexity over time.
…ieyouxu Fix dev guide docs for error-pattern I know it would have made more sense to make this PR to the dev guide repo but I had already made the fix before I realized that. r? `@jieyouxu`
@bors r+ p=5 rollup=never |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: 678e669cc4 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (af952c1): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResults (secondary 3.7%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 763.781s -> 765.496s (0.22%) |
Successful merges:
#![feature(..)]
in more cases #134858 (Provide structured suggestion for#![feature(..)]
in more cases)item-row
CSS class #135685 (Remove unuseditem-row
CSS class)rustc
with no arguments #135716 (Don't skip argument parsing when runningrustc
with no arguments)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup