about summary refs log tree commit diff
path: root/compiler/rustc_error_codes
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2025-03-17 16:50:55 +0100
committerMara Bos <m-ou.se@m-ou.se>2025-03-19 14:12:47 +0100
commit6c865c1e14d5bd76b4ffe1e7ed2e60b3261d03a9 (patch)
tree63af01dfa353f6dda1b2cd6d2b01ae92005addcf /compiler/rustc_error_codes
parent1370611c0ae0c7232bcd073e15046bae6b519e50 (diff)
downloadrust-6c865c1e14d5bd76b4ffe1e7ed2e60b3261d03a9.tar.gz
rust-6c865c1e14d5bd76b4ffe1e7ed2e60b3261d03a9.zip
Allow builtin macros to be used more than once.
This removes E0773 "A builtin-macro was defined more than once."
Diffstat (limited to 'compiler/rustc_error_codes')
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0773.md42
1 files changed, 3 insertions, 39 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0773.md b/compiler/rustc_error_codes/src/error_codes/E0773.md
index aa65a475a4f..5ebb43c6683 100644
--- a/compiler/rustc_error_codes/src/error_codes/E0773.md
+++ b/compiler/rustc_error_codes/src/error_codes/E0773.md
@@ -1,40 +1,4 @@
-A builtin-macro was defined more than once.
+#### this error code is no longer emitted by the compiler.
 
-Erroneous code example:
-
-```compile_fail,E0773
-#![feature(decl_macro)]
-#![feature(rustc_attrs)]
-#![allow(internal_features)]
-
-#[rustc_builtin_macro]
-pub macro test($item:item) {
-    /* compiler built-in */
-}
-
-mod inner {
-    #[rustc_builtin_macro]
-    pub macro test($item:item) {
-        /* compiler built-in */
-    }
-}
-```
-
-To fix the issue, remove the duplicate declaration:
-
-```
-#![feature(decl_macro)]
-#![feature(rustc_attrs)]
-#![allow(internal_features)]
-
-#[rustc_builtin_macro]
-pub macro test($item:item) {
-    /* compiler built-in */
-}
-```
-
-In very rare edge cases, this may happen when loading `core` or `std` twice,
-once with `check` metadata and once with `build` metadata.
-For more information, see [#75176].
-
-[#75176]: https://github.com/rust-lang/rust/pull/75176#issuecomment-683234468
+This was triggered when multiple macro definitions used the same
+`#[rustc_builtin_macro(..)]`. This is no longer an error.