2017-11-10 05:11:25 -06:00
|
|
|
fn ok() {
|
|
|
|
loop {
|
|
|
|
let _x = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-11-27 02:06:36 -06:00
|
|
|
fn also_ok() {
|
|
|
|
loop {
|
|
|
|
let _x = String::new();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-11-10 05:11:25 -06:00
|
|
|
fn fail() {
|
|
|
|
loop {
|
|
|
|
let x: i32;
|
2019-05-02 17:34:15 -05:00
|
|
|
let _ = x + 1; //~ERROR [E0381]
|
2017-11-10 05:11:25 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
ok();
|
2017-11-27 02:06:36 -06:00
|
|
|
also_ok();
|
2017-11-10 05:11:25 -06:00
|
|
|
fail();
|
|
|
|
}
|