]> git.lizzy.rs Git - rust.git/commit
Auto merge of #83722 - jyn514:stable-help, r=estebank
authorbors <bors@rust-lang.org>
Sat, 24 Apr 2021 02:25:54 +0000 (02:25 +0000)
committerbors <bors@rust-lang.org>
Sat, 24 Apr 2021 02:25:54 +0000 (02:25 +0000)
commita7aba58e9684175c5c5dfef8277c95ebc43f904a
tree415eb537541408015b2183b7c823c74d6e08e856
parent8ad0821b035e35aed07ec252c2dd831c15a4e26e
parent53a11050742ae1c59ccb33302a2d998cd35aed03
Auto merge of #83722 - jyn514:stable-help, r=estebank

On stable, suggest removing `#![feature]` for features that have been stabilized

I don't know how to test this (https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Run.20tests.20without.20enabling.20nightly.20features.3F). I confirmed locally that this gives the
appropriate help with `channel = "beta"`:

```
error[E0554]: `#![feature]` may not be used on the beta release channel
 --> src/lib.rs:2:1
  |
2 | #![feature(min_const_generics)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the attribute
  |
  = help: the feature `min_const_generics` has been stable since 1.51.0 and no longer requires an attribute to enable

error[E0554]: `#![feature]` may not be used on the beta release channel
 --> src/lib.rs:3:1
  |
3 | #![feature(min_const_generics, min_specialization)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = help: the feature `min_const_generics` has been stable since 1.51.0 and no longer requires an attribute to enable

error[E0554]: `#![feature]` may not be used on the beta release channel
 --> src/lib.rs:4:1
  |
4 | #![feature(box_patterns)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^
```

Closes https://github.com/rust-lang/rust/issues/83715.
compiler/rustc_ast_passes/src/feature_gate.rs