about summary refs log tree commit diff
path: root/compiler/rustc_error_codes/src
diff options
context:
space:
mode:
authorJana Dönszelmann <jana@donsz.nl>2025-03-09 23:46:47 +0100
committerJana Dönszelmann <jana@donsz.nl>2025-06-18 13:48:42 +0200
commitb64fd13a04e03bd260b550430daa6fbdf1fb27c9 (patch)
treee0146f6e81a64818c98c623035d4fe2609c20367 /compiler/rustc_error_codes/src
parent1bb335244c311a07cee165c28c553c869e6f64a9 (diff)
downloadrust-b64fd13a04e03bd260b550430daa6fbdf1fb27c9.tar.gz
rust-b64fd13a04e03bd260b550430daa6fbdf1fb27c9.zip
convert the `optimize` attribute to a new parser
Diffstat (limited to 'compiler/rustc_error_codes/src')
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0722.md8
-rw-r--r--compiler/rustc_error_codes/src/lib.rs1
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