summaryrefslogtreecommitdiffstats
path: root/src/test/ui/rfc-2091-track-caller/only-for-fns.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/rfc-2091-track-caller/only-for-fns.rs')
-rw-r--r--src/test/ui/rfc-2091-track-caller/only-for-fns.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/ui/rfc-2091-track-caller/only-for-fns.rs b/src/test/ui/rfc-2091-track-caller/only-for-fns.rs
new file mode 100644
index 000000000..2d2b01b6f
--- /dev/null
+++ b/src/test/ui/rfc-2091-track-caller/only-for-fns.rs
@@ -0,0 +1,5 @@
+#[track_caller]
+struct S;
+//~^^ ERROR attribute should be applied to a function definition
+
+fn main() {}