summary refs log tree commit diff
path: root/tests/ui/unpretty/deprecated-attr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/unpretty/deprecated-attr.rs')
-rw-r--r--tests/ui/unpretty/deprecated-attr.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/ui/unpretty/deprecated-attr.rs b/tests/ui/unpretty/deprecated-attr.rs
index 0c80203e965..e2ab5efb5d8 100644
--- a/tests/ui/unpretty/deprecated-attr.rs
+++ b/tests/ui/unpretty/deprecated-attr.rs
@@ -16,3 +16,8 @@ pub struct SinceAndNote;
 
 #[deprecated(note = "here's why this is deprecated", since = "1.2.3")]
 pub struct FlippedOrder;
+
+pub fn f() {
+    // Attribute is ignored here (with a warning), but still preserved in HIR
+    #[deprecated] 0
+}