diff options
| author | Trevor Gross <t.gross35@gmail.com> | 2025-06-20 02:50:37 -0400 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-20 02:50:37 -0400 | 
| commit | bab4ca914ea58b5ced4903225fe31e90bfffed5f (patch) | |
| tree | ccdfb8fadf2f53d28537a438042759dced12de4f /compiler/rustc_error_codes/src | |
| parent | 5b74275f89b6041bf2e9dc2abcf332e206d4cfca (diff) | |
| parent | 3c418ec505233927d562ff906d8eea309aee1905 (diff) | |
| download | rust-bab4ca914ea58b5ced4903225fe31e90bfffed5f.tar.gz rust-bab4ca914ea58b5ced4903225fe31e90bfffed5f.zip  | |
Rollup merge of #138291 - jdonszelmann:optimize-attr, r=oli-obk
rewrite `optimize` attribute to use new attribute parsing infrastructure r? ```@oli-obk``` I'm afraid we'll get quite a few of these PRs in the future. If we get a lot of trivial changes I'll start merging multiple into one PR. They should be easy to review :) Waiting on #138165 first
Diffstat (limited to 'compiler/rustc_error_codes/src')
| -rw-r--r-- | compiler/rustc_error_codes/src/error_codes/E0722.md | 8 | ||||
| -rw-r--r-- | compiler/rustc_error_codes/src/lib.rs | 1 | 
2 files changed, 8 insertions, 1 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0722.md b/compiler/rustc_error_codes/src/error_codes/E0722.md index 570717a92bd..1799458d46c 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0722.md +++ b/compiler/rustc_error_codes/src/error_codes/E0722.md @@ -1,8 +1,14 @@ +#### Note: this error code is no longer emitted by the compiler + +This is because it was too specific to the `optimize` attribute. +Similar diagnostics occur for other attributes too. +The example here will now emit `E0539` + The `optimize` attribute was malformed. Erroneous code example: -```compile_fail,E0722 +```compile_fail,E0539 #![feature(optimize_attribute)] #[optimize(something)] // error: invalid argument diff --git a/compiler/rustc_error_codes/src/lib.rs b/compiler/rustc_error_codes/src/lib.rs index 6f5e4829802..22cc1e894da 100644 --- a/compiler/rustc_error_codes/src/lib.rs +++ b/compiler/rustc_error_codes/src/lib.rs @@ -686,6 +686,7 @@ E0805: 0805, // E0707, // multiple elided lifetimes used in arguments of `async fn` // E0709, // multiple different lifetimes used in arguments of `async fn` // E0721, // `await` keyword +// E0722, // replaced with a generic attribute input check // E0723, // unstable feature in `const` context // E0738, // Removed; errored on `#[track_caller] fn`s in `extern "Rust" { ... }`. // E0744, // merged into E0728  | 
