rust/tests/ui/resolve/typo-suggestion-named-underscore.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
288 B
Rust
Raw Normal View History

2020-02-02 04:40:55 +09:00
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