From 3871988dfaa9d0f4629038d656ce9ba32ebc6e12 Mon Sep 17 00:00:00 2001 From: Seiichi Uchida Date: Mon, 25 Jun 2018 23:36:37 +0900 Subject: [PATCH] Add a test for raw identifiers --- tests/target/raw_identifiers.rs | 50 +++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 tests/target/raw_identifiers.rs diff --git a/tests/target/raw_identifiers.rs b/tests/target/raw_identifiers.rs new file mode 100644 index 00000000000..a798743c514 --- /dev/null +++ b/tests/target/raw_identifiers.rs @@ -0,0 +1,50 @@ +#![feature(custom_attribute)] +#![feature(raw_identifiers)] +#![feature(extern_types)] +#![allow(invalid_type_param_default)] +#![allow(unused_attributes)] + +use r#foo as r#alias_foo; + +fn main() { + #[r#attr] + r#foo::r#bar(); + + let r#local = 3; + let r#async = r#foo(r#local); + r#macro!(); + + if let r#sub_pat @ r#Foo(_) = r#Foo(3) {} + + match r#async { + r#Foo | r#Bar => r#foo(), + } +} + +fn r#bar<'a, r#T>(r#x: &'a r#T) {} + +mod r#foo { + pub fn r#bar() {} +} + +enum r#Foo { + r#Bar {}, +} + +trait r#Trait { + type r#Type; +} + +impl r#Trait for r#Impl { + type r#Type = r#u32; + fn r#xxx(r#fjio: r#u32) {} +} + +extern "C" { + type r#ccc; + static r#static_val: u32; +} + +macro_rules! r#macro { + () => {}; +} -- 2.44.0