diff options
| author | León Orell Valerian Liehr <me@fmease.dev> | 2024-07-10 17:38:52 +0200 |
|---|---|---|
| committer | León Orell Valerian Liehr <me@fmease.dev> | 2025-02-15 16:47:30 +0100 |
| commit | 9b6fd35738965ef3f246018fddc743b5e5cd8d2c (patch) | |
| tree | 955710be2b114b379217abfe9c79362d99b37bbe /compiler/rustc_interface/src/util.rs | |
| parent | 46d53a68aa1b10833ec25178171f34e29e71f1f1 (diff) | |
| download | rust-9b6fd35738965ef3f246018fddc743b5e5cd8d2c.tar.gz rust-9b6fd35738965ef3f246018fddc743b5e5cd8d2c.zip | |
Reject macro calls inside of `#![crate_name]`
Diffstat (limited to 'compiler/rustc_interface/src/util.rs')
| -rw-r--r-- | compiler/rustc_interface/src/util.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_interface/src/util.rs b/compiler/rustc_interface/src/util.rs index e900ec14fca..bc2aae7cd87 100644 --- a/compiler/rustc_interface/src/util.rs +++ b/compiler/rustc_interface/src/util.rs @@ -433,11 +433,11 @@ pub(crate) fn check_attr_crate_type( } } else { // This is here mainly to check for using a macro, such as - // #![crate_type = foo!()]. That is not supported since the + // `#![crate_type = foo!()]`. That is not supported since the // crate type needs to be known very early in compilation long // before expansion. Otherwise, validation would normally be - // caught in AstValidator (via `check_builtin_attribute`), but - // by the time that runs the macro is expanded, and it doesn't + // caught during semantic analysis via `TyCtxt::check_mod_attrs`, + // but by the time that runs the macro is expanded, and it doesn't // give an error. validate_attr::emit_fatal_malformed_builtin_attribute( &sess.psess, |
