From b5ad0cb03302d679e5dc7d7d1157c42ccd72b5b0 Mon Sep 17 00:00:00 2001 From: Esteban Küber Date: Tue, 3 Dec 2019 22:25:15 -0800 Subject: review comments: move test --- .../ui/issues/issue-65634-raw-ident-suggestion.rs | 22 ++++++++++++++++++++++ .../issues/issue-65634-raw-ident-suggestion.stderr | 22 ++++++++++++++++++++++ src/test/ui/raw-ident-suggestion.rs | 22 ---------------------- src/test/ui/raw-ident-suggestion.stderr | 22 ---------------------- 4 files changed, 44 insertions(+), 44 deletions(-) create mode 100644 src/test/ui/issues/issue-65634-raw-ident-suggestion.rs create mode 100644 src/test/ui/issues/issue-65634-raw-ident-suggestion.stderr delete mode 100644 src/test/ui/raw-ident-suggestion.rs delete mode 100644 src/test/ui/raw-ident-suggestion.stderr (limited to 'src') diff --git a/src/test/ui/issues/issue-65634-raw-ident-suggestion.rs b/src/test/ui/issues/issue-65634-raw-ident-suggestion.rs new file mode 100644 index 00000000000..b928510258b --- /dev/null +++ b/src/test/ui/issues/issue-65634-raw-ident-suggestion.rs @@ -0,0 +1,22 @@ +#![allow(non_camel_case_types)] + +trait r#async { + fn r#struct(&self) { + println!("async"); + } +} + +trait r#await { + fn r#struct(&self) { + println!("await"); + } +} + +struct r#fn {} + +impl r#async for r#fn {} +impl r#await for r#fn {} + +fn main() { + r#fn {}.r#struct(); //~ ERROR multiple applicable items in scope +} diff --git a/src/test/ui/issues/issue-65634-raw-ident-suggestion.stderr b/src/test/ui/issues/issue-65634-raw-ident-suggestion.stderr new file mode 100644 index 00000000000..c7bb653dc1f --- /dev/null +++ b/src/test/ui/issues/issue-65634-raw-ident-suggestion.stderr @@ -0,0 +1,22 @@ +error[E0034]: multiple applicable items in scope + --> $DIR/issue-65634-raw-ident-suggestion.rs:21:13 + | +LL | r#fn {}.r#struct(); + | ^^^^^^^^ multiple `r#struct` found + | +note: candidate #1 is defined in an impl of the trait `async` for the type `r#fn` + --> $DIR/issue-65634-raw-ident-suggestion.rs:4:5 + | +LL | fn r#struct(&self) { + | ^^^^^^^^^^^^^^^^^^ + = help: to disambiguate the method call, write `async::r#struct(r#fn {})` instead +note: candidate #2 is defined in an impl of the trait `await` for the type `r#fn` + --> $DIR/issue-65634-raw-ident-suggestion.rs:10:5 + | +LL | fn r#struct(&self) { + | ^^^^^^^^^^^^^^^^^^ + = help: to disambiguate the method call, write `await::r#struct(r#fn {})` instead + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0034`. diff --git a/src/test/ui/raw-ident-suggestion.rs b/src/test/ui/raw-ident-suggestion.rs deleted file mode 100644 index b928510258b..00000000000 --- a/src/test/ui/raw-ident-suggestion.rs +++ /dev/null @@ -1,22 +0,0 @@ -#![allow(non_camel_case_types)] - -trait r#async { - fn r#struct(&self) { - println!("async"); - } -} - -trait r#await { - fn r#struct(&self) { - println!("await"); - } -} - -struct r#fn {} - -impl r#async for r#fn {} -impl r#await for r#fn {} - -fn main() { - r#fn {}.r#struct(); //~ ERROR multiple applicable items in scope -} diff --git a/src/test/ui/raw-ident-suggestion.stderr b/src/test/ui/raw-ident-suggestion.stderr deleted file mode 100644 index fddd9427ab7..00000000000 --- a/src/test/ui/raw-ident-suggestion.stderr +++ /dev/null @@ -1,22 +0,0 @@ -error[E0034]: multiple applicable items in scope - --> $DIR/raw-ident-suggestion.rs:21:13 - | -LL | r#fn {}.r#struct(); - | ^^^^^^^^ multiple `r#struct` found - | -note: candidate #1 is defined in an impl of the trait `async` for the type `r#fn` - --> $DIR/raw-ident-suggestion.rs:4:5 - | -LL | fn r#struct(&self) { - | ^^^^^^^^^^^^^^^^^^ - = help: to disambiguate the method call, write `async::r#struct(r#fn {})` instead -note: candidate #2 is defined in an impl of the trait `await` for the type `r#fn` - --> $DIR/raw-ident-suggestion.rs:10:5 - | -LL | fn r#struct(&self) { - | ^^^^^^^^^^^^^^^^^^ - = help: to disambiguate the method call, write `await::r#struct(r#fn {})` instead - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0034`. -- cgit 1.4.1-3-g733a5