about summary refs log tree commit diff
path: root/tests/ui/resolve
diff options
context:
space:
mode:
authorJonathan Brouwer <jonathantbrouwer@gmail.com>2025-07-06 22:16:42 +0200
committerJonathan Brouwer <jonathantbrouwer@gmail.com>2025-07-06 22:19:16 +0200
commit244d64e60b94d9ffba58a2f4e38430378aa79037 (patch)
tree78389367873c2abf369ecd9ebbaec8de1d3a5bfc /tests/ui/resolve
parentef3d7741e5f9e61b50a6023694981c913de54526 (diff)
downloadrust-244d64e60b94d9ffba58a2f4e38430378aa79037.tar.gz
rust-244d64e60b94d9ffba58a2f4e38430378aa79037.zip
Port `#[path]` to the new attribute parsing infrastructure
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
Diffstat (limited to 'tests/ui/resolve')
-rw-r--r--tests/ui/resolve/path-attr-in-const-block.rs1
-rw-r--r--tests/ui/resolve/path-attr-in-const-block.stderr12
2 files changed, 12 insertions, 1 deletions
diff --git a/tests/ui/resolve/path-attr-in-const-block.rs b/tests/ui/resolve/path-attr-in-const-block.rs
index 076511d26d6..69be65bda3f 100644
--- a/tests/ui/resolve/path-attr-in-const-block.rs
+++ b/tests/ui/resolve/path-attr-in-const-block.rs
@@ -5,5 +5,6 @@ fn main() {
     const {
         #![path = foo!()]
         //~^ ERROR: cannot find macro `foo` in this scope
+        //~| ERROR malformed `path` attribute input
     }
 }
diff --git a/tests/ui/resolve/path-attr-in-const-block.stderr b/tests/ui/resolve/path-attr-in-const-block.stderr
index 8f9e58157c8..0b5942a287d 100644
--- a/tests/ui/resolve/path-attr-in-const-block.stderr
+++ b/tests/ui/resolve/path-attr-in-const-block.stderr
@@ -4,5 +4,15 @@ error: cannot find macro `foo` in this scope
 LL |         #![path = foo!()]
    |                   ^^^
 
-error: aborting due to 1 previous error
+error[E0539]: malformed `path` attribute input
+  --> $DIR/path-attr-in-const-block.rs:6:9
+   |
+LL |         #![path = foo!()]
+   |         ^^^^^^^^^^------^
+   |         |         |
+   |         |         expected a string literal here
+   |         help: must be of the form: `#[path = "file"]`
+
+error: aborting due to 2 previous errors
 
+For more information about this error, try `rustc --explain E0539`.