Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/parser/test_data/parser/ok/0051_parameter_attrs.rs')
-rw-r--r--crates/parser/test_data/parser/ok/0051_parameter_attrs.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/crates/parser/test_data/parser/ok/0051_parameter_attrs.rs b/crates/parser/test_data/parser/ok/0051_parameter_attrs.rs
new file mode 100644
index 0000000000..de350d8587
--- /dev/null
+++ b/crates/parser/test_data/parser/ok/0051_parameter_attrs.rs
@@ -0,0 +1,21 @@
+fn g1(#[attr1] #[attr2] pat: Type) {}
+fn g2(#[attr1] x: u8) {}
+
+extern "C" { fn printf(format: *const i8, #[attr] ...) -> i32; }
+
+fn foo<F: FnMut(#[attr] &mut Foo<'a>)>(){}
+
+trait Foo {
+ fn bar(#[attr] _: u64, # [attr] mut x: i32);
+}
+
+impl S {
+ fn f(#[must_use] self) {}
+ fn g1(#[attr] self) {}
+ fn g2(#[attr] &self) {}
+ fn g3<'a>(#[attr] &mut self) {}
+ fn g4<'a>(#[attr] &'a self) {}
+ fn g5<'a>(#[attr] &'a mut self) {}
+ fn c(#[attr] self: Self) {}
+ fn d(#[attr] self: Rc<Self>) {}
+} \ No newline at end of file