]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lint/recommend-literal.rs
Rollup merge of #87180 - notriddle:notriddle/sidebar-keyboard-mobile, r=GuillaumeGomez
[rust.git] / src / test / ui / lint / recommend-literal.rs
1 type Real = double;
2 //~^ ERROR cannot find type `double` in this scope
3 //~| HELP perhaps you intended to use this type
4
5 fn main() {
6     let x: Real = 3.5;
7     let y: long = 74802374902374923;
8     //~^ ERROR cannot find type `long` in this scope
9     //~| HELP perhaps you intended to use this type
10 }
11
12 fn z(a: boolean) {
13     //~^ ERROR cannot find type `boolean` in this scope
14     //~| HELP perhaps you intended to use this type
15 }
16
17 fn a() -> byte {
18 //~^ ERROR cannot find type `byte` in this scope
19 //~| HELP perhaps you intended to use this type
20     3
21 }
22
23 struct Data { //~ HELP you might be missing a type parameter
24     width: float,
25     //~^ ERROR cannot find type `float` in this scope
26     //~| HELP perhaps you intended to use this type
27     depth: Option<int>,
28     //~^ ERROR cannot find type `int` in this scope
29     //~| HELP perhaps you intended to use this type
30 }
31
32 trait Stuff {}
33 impl Stuff for short {}
34 //~^ ERROR cannot find type `short` in this scope
35 //~| HELP perhaps you intended to use this type