]> git.lizzy.rs Git - rust.git/blob - src/test/ui/resolve/levenshtein.rs
Rollup merge of #87180 - notriddle:notriddle/sidebar-keyboard-mobile, r=GuillaumeGomez
[rust.git] / src / test / ui / resolve / levenshtein.rs
1 const MAX_ITEM: usize = 10;
2
3 fn foo_bar() {}
4
5 fn foo(c: esize) {} // Misspelled primitive type name.
6 //~^ ERROR cannot find
7
8 enum Bar { }
9
10 type A = Baz; // Misspelled type name.
11 //~^ ERROR cannot find
12 type B = Opiton<u8>; // Misspelled type name from the prelude.
13 //~^ ERROR cannot find
14
15 mod m {
16     type A = Baz; // No suggestion here, Bar is not visible
17     //~^ ERROR cannot find
18
19     pub struct First;
20     pub struct Second;
21 }
22
23 fn main() {
24     let v = [0u32; MAXITEM]; // Misspelled constant name.
25     //~^ ERROR cannot find
26     foobar(); // Misspelled function name.
27     //~^ ERROR cannot find
28     let b: m::first = m::second; // Misspelled item in module.
29     //~^ ERROR cannot find
30     //~| ERROR cannot find
31 }