diff options
Diffstat (limited to 'src/test/ui/resolve/typo-suggestion-named-underscore.rs')
-rw-r--r-- | src/test/ui/resolve/typo-suggestion-named-underscore.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/resolve/typo-suggestion-named-underscore.rs b/src/test/ui/resolve/typo-suggestion-named-underscore.rs new file mode 100644 index 000000000..a2b05db03 --- /dev/null +++ b/src/test/ui/resolve/typo-suggestion-named-underscore.rs @@ -0,0 +1,14 @@ +const _: () = (); + +fn main() { + a // Shouldn't suggest underscore + //~^ ERROR: cannot find value `a` in this scope +} + +trait Unknown {} + +#[allow(unused_imports)] +use Unknown as _; + +fn foo<T: A>(x: T) {} // Shouldn't suggest underscore +//~^ ERROR: cannot find trait `A` in this scope |