about summary refs log tree commit diff
path: root/tests/ui/issues
diff options
context:
space:
mode:
authorJonathan Brouwer <jonathantbrouwer@gmail.com>2025-07-31 15:38:44 +0200
committerJonathan Brouwer <jonathantbrouwer@gmail.com>2025-08-22 08:58:45 +0200
commitec5b2cce8e0e409e7c4bbcec332fba7c70c142ec (patch)
tree3316d9facb2070e4472399c75d6ecf087b3ccd41 /tests/ui/issues
parent17e34f6b2418975a360755a1e1a3b8793864da9b (diff)
downloadrust-ec5b2cce8e0e409e7c4bbcec332fba7c70c142ec.tar.gz
rust-ec5b2cce8e0e409e7c4bbcec332fba7c70c142ec.zip
Updated uitests for new parser
Diffstat (limited to 'tests/ui/issues')
-rw-r--r--tests/ui/issues/issue-32782.rs4
-rw-r--r--tests/ui/issues/issue-32782.stderr18
2 files changed, 18 insertions, 4 deletions
diff --git a/tests/ui/issues/issue-32782.rs b/tests/ui/issues/issue-32782.rs
index e3aa9f3bf2f..1e99a25cec3 100644
--- a/tests/ui/issues/issue-32782.rs
+++ b/tests/ui/issues/issue-32782.rs
@@ -4,7 +4,9 @@ macro_rules! bar (
 
 macro_rules! foo (
     () => (
-        #[allow_internal_unstable] //~ ERROR allow_internal_unstable side-steps
+        #[allow_internal_unstable()]
+        //~^ ERROR allow_internal_unstable side-steps
+        //~| ERROR `#[allow_internal_unstable]` attribute cannot be used on macro calls
         bar!();
     );
 );
diff --git a/tests/ui/issues/issue-32782.stderr b/tests/ui/issues/issue-32782.stderr
index 830d83f6e57..96cd0489b2a 100644
--- a/tests/ui/issues/issue-32782.stderr
+++ b/tests/ui/issues/issue-32782.stderr
@@ -1,8 +1,8 @@
 error[E0658]: allow_internal_unstable side-steps feature gating and stability checks
   --> $DIR/issue-32782.rs:7:9
    |
-LL |         #[allow_internal_unstable]
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |         #[allow_internal_unstable()]
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 ...
 LL | foo!();
    | ------ in this macro invocation
@@ -11,6 +11,18 @@ LL | foo!();
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
    = note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: aborting due to 1 previous error
+error: `#[allow_internal_unstable]` attribute cannot be used on macro calls
+  --> $DIR/issue-32782.rs:7:9
+   |
+LL |         #[allow_internal_unstable()]
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+...
+LL | foo!();
+   | ------ in this macro invocation
+   |
+   = help: `#[allow_internal_unstable]` can be applied to macro defs and functions
+   = note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0658`.