summaryrefslogtreecommitdiffstats
path: root/src/test/ui/attributes/attrs-on-params.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/attributes/attrs-on-params.rs')
-rw-r--r--src/test/ui/attributes/attrs-on-params.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/ui/attributes/attrs-on-params.rs b/src/test/ui/attributes/attrs-on-params.rs
new file mode 100644
index 000000000..158a4500b
--- /dev/null
+++ b/src/test/ui/attributes/attrs-on-params.rs
@@ -0,0 +1,8 @@
+// This checks that incorrect params on function parameters are caught
+
+fn function(#[inline] param: u32) {
+ //~^ ERROR attribute should be applied to function or closure
+ //~| ERROR allow, cfg, cfg_attr, deny, expect, forbid, and warn are the only allowed built-in attributes
+}
+
+fn main() {}