From a1c187eef3ba08076aedb5154929f7eda8d1b424 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 12 Aug 2020 18:26:51 +0200 Subject: Rename ra_syntax -> syntax --- .../test_data/parser/ok/0051_parameter_attrs.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 crates/syntax/test_data/parser/ok/0051_parameter_attrs.rs (limited to 'crates/syntax/test_data/parser/ok/0051_parameter_attrs.rs') 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 @@ +fn g1(#[attr1] #[attr2] pat: Type) {} +fn g2(#[attr1] x: u8) {} + +extern "C" { fn printf(format: *const i8, #[attr] ...) -> i32; } + +fn foo)>(){} + +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) {} +} \ No newline at end of file -- cgit v1.2.3