]> git.proxmox.com Git - rustc.git/blame - src/test/ui/lint/recommend-literal.rs
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / src / test / ui / lint / recommend-literal.rs
CommitLineData
6a06907d
XL
1type Real = double;
2//~^ ERROR cannot find type `double` in this scope
3//~| HELP perhaps you intended to use this type
4
5fn 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
12fn z(a: boolean) {
13 //~^ ERROR cannot find type `boolean` in this scope
14 //~| HELP perhaps you intended to use this type
15}
16
17fn a() -> byte {
18//~^ ERROR cannot find type `byte` in this scope
19//~| HELP perhaps you intended to use this type
20 3
21}
22
23struct 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
32trait Stuff {}
33impl Stuff for short {}
34//~^ ERROR cannot find type `short` in this scope
35//~| HELP perhaps you intended to use this type