diff options
author | Igor Aleksanov <[email protected]> | 2020-08-14 05:34:07 +0100 |
---|---|---|
committer | Igor Aleksanov <[email protected]> | 2020-08-14 05:34:07 +0100 |
commit | c26c911ec1e6c2ad1dcb7d155a6a1d528839ad1a (patch) | |
tree | 7cff36c38234be0afb65273146d8247083a5cfeb /crates/syntax/test_data/parser/ok/0051_parameter_attrs.rs | |
parent | 3c018bf84de5c693b5ee1c6bec0fed3b201c2060 (diff) | |
parent | f1f73649a686dc6e6449afc35e0fa6fed00e225d (diff) |
Merge branch 'master' into add-disable-diagnostics
Diffstat (limited to 'crates/syntax/test_data/parser/ok/0051_parameter_attrs.rs')
-rw-r--r-- | crates/syntax/test_data/parser/ok/0051_parameter_attrs.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/crates/syntax/test_data/parser/ok/0051_parameter_attrs.rs b/crates/syntax/test_data/parser/ok/0051_parameter_attrs.rs new file mode 100644 index 000000000..de350d858 --- /dev/null +++ b/crates/syntax/test_data/parser/ok/0051_parameter_attrs.rs | |||
@@ -0,0 +1,21 @@ | |||
1 | fn g1(#[attr1] #[attr2] pat: Type) {} | ||
2 | fn g2(#[attr1] x: u8) {} | ||
3 | |||
4 | extern "C" { fn printf(format: *const i8, #[attr] ...) -> i32; } | ||
5 | |||
6 | fn foo<F: FnMut(#[attr] &mut Foo<'a>)>(){} | ||
7 | |||
8 | trait Foo { | ||
9 | fn bar(#[attr] _: u64, # [attr] mut x: i32); | ||
10 | } | ||
11 | |||
12 | impl S { | ||
13 | fn f(#[must_use] self) {} | ||
14 | fn g1(#[attr] self) {} | ||
15 | fn g2(#[attr] &self) {} | ||
16 | fn g3<'a>(#[attr] &mut self) {} | ||
17 | fn g4<'a>(#[attr] &'a self) {} | ||
18 | fn g5<'a>(#[attr] &'a mut self) {} | ||
19 | fn c(#[attr] self: Self) {} | ||
20 | fn d(#[attr] self: Rc<Self>) {} | ||
21 | } \ No newline at end of file | ||