-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Provide structured suggestion for #![feature(..)]
in more cases
#134858
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
Conversation
r? @Noratrieb rustbot has assigned @Noratrieb. Use |
Some changes occurred to the CTFE machinery cc @rust-lang/wg-const-eval |
Yeah, please revert the example that Ralf pointed out is redundant. @rustbot author |
plz squash rather than pushing a new commit xD |
bf1475b
to
69bf257
Compare
squashed |
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 */ }; | ++++++++++ ```
@bors r+ |
…llaumeGomez Rollup of 5 pull requests Successful merges: - rust-lang#134858 (Provide structured suggestion for `#![feature(..)]` in more cases) - rust-lang#135679 (create an issue template for bootstrap) - rust-lang#135685 (Remove unused `item-row` CSS class) - rust-lang#135716 (Don't skip argument parsing when running `rustc` with no arguments) - rust-lang#135723 (Fix dev guide docs for error-pattern) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#134858 - estebank:issue-81370, r=Noratrieb Provide structured suggestion for `#![feature(..)]` in more cases Fix rust-lang#81370.
Fix #81370.