diff options
| author | bors <bors@rust-lang.org> | 2021-07-08 17:51:10 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-07-08 17:51:10 +0000 |
| commit | aa65b08b1dbaf4b637847646801ebc8c01d7ecbd (patch) | |
| tree | 9828a028f1c2c73ed4f8c85959c7eebb747ecc48 /compiler/rustc_error_codes/src | |
| parent | d0485c7986e0dac6ffd0207aba56467cb9378d85 (diff) | |
| parent | 60566820b3800036a00e2b7e5787b8c816dc2342 (diff) | |
| download | rust-aa65b08b1dbaf4b637847646801ebc8c01d7ecbd.tar.gz rust-aa65b08b1dbaf4b637847646801ebc8c01d7ecbd.zip | |
Auto merge of #86982 - GuillaumeGomez:rollup-7sbye3c, r=GuillaumeGomez
Rollup of 8 pull requests Successful merges: - #84961 (Rework SESSION_GLOBALS API) - #86726 (Use diagnostic items instead of lang items for rfc2229 migrations) - #86789 (Update BTreeSet::drain_filter documentation) - #86838 (Checking that function is const if marked with rustc_const_unstable) - #86903 (Fix small headers display) - #86913 (Document rustdoc with `--document-private-items`) - #86957 (Update .mailmap file) - #86971 (mailmap: Add alternative addresses for myself) Failed merges: - #86869 (Account for capture kind in auto traits migration) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_error_codes/src')
| -rw-r--r-- | compiler/rustc_error_codes/src/error_codes/E0542.md | 4 | ||||
| -rw-r--r-- | compiler/rustc_error_codes/src/error_codes/E0545.md | 4 | ||||
| -rw-r--r-- | compiler/rustc_error_codes/src/error_codes/E0547.md | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0542.md b/compiler/rustc_error_codes/src/error_codes/E0542.md index 7cb58f9d0cb..7fecfeaa57c 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0542.md +++ b/compiler/rustc_error_codes/src/error_codes/E0542.md @@ -10,7 +10,7 @@ Erroneous code example: fn _stable_fn() {} #[rustc_const_stable(feature = "_stable_const_fn")] // invalid -fn _stable_const_fn() {} +const fn _stable_const_fn() {} #[stable(feature = "_deprecated_fn", since = "0.1.0")] #[rustc_deprecated( @@ -29,7 +29,7 @@ To fix this issue, you need to provide the `since` field. Example: fn _stable_fn() {} #[rustc_const_stable(feature = "_stable_const_fn", since = "1.0.0")] // ok! -fn _stable_const_fn() {} +const fn _stable_const_fn() {} #[stable(feature = "_deprecated_fn", since = "0.1.0")] #[rustc_deprecated( diff --git a/compiler/rustc_error_codes/src/error_codes/E0545.md b/compiler/rustc_error_codes/src/error_codes/E0545.md index 9fb935a3ab1..7aba084f4d3 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0545.md +++ b/compiler/rustc_error_codes/src/error_codes/E0545.md @@ -10,7 +10,7 @@ Erroneous code example: fn _unstable_fn() {} #[rustc_const_unstable(feature = "_unstable_const_fn", issue = "0")] // invalid -fn _unstable_const_fn() {} +const fn _unstable_const_fn() {} ``` To fix this issue, you need to provide a correct value in the `issue` field. @@ -24,7 +24,7 @@ Example: fn _unstable_fn() {} #[rustc_const_unstable(feature = "_unstable_const_fn", issue = "1")] // ok! -fn _unstable_const_fn() {} +const fn _unstable_const_fn() {} ``` See the [How Rust is Made and “Nightly Rust”][how-rust-made-nightly] appendix diff --git a/compiler/rustc_error_codes/src/error_codes/E0547.md b/compiler/rustc_error_codes/src/error_codes/E0547.md index 1aa4b354248..4950325df64 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0547.md +++ b/compiler/rustc_error_codes/src/error_codes/E0547.md @@ -10,7 +10,7 @@ Erroneous code example: fn _unstable_fn() {} #[rustc_const_unstable(feature = "_unstable_const_fn")] // invalid -fn _unstable_const_fn() {} +const fn _unstable_const_fn() {} ``` To fix this issue, you need to provide the `issue` field. Example: @@ -26,7 +26,7 @@ fn _unstable_fn() {} feature = "_unstable_const_fn", issue = "none" )] // ok! -fn _unstable_const_fn() {} +const fn _unstable_const_fn() {} ``` See the [How Rust is Made and “Nightly Rust”][how-rust-made-nightly] appendix |
