mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
25 lines
260 B
Rust
25 lines
260 B
Rust
fn ok() {
|
|
loop {
|
|
let _x = 1;
|
|
}
|
|
}
|
|
|
|
fn also_ok() {
|
|
loop {
|
|
let _x = String::new();
|
|
}
|
|
}
|
|
|
|
fn fail() {
|
|
loop {
|
|
let x: i32;
|
|
let _ = x + 1; //~ERROR [E0381]
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
ok();
|
|
also_ok();
|
|
fail();
|
|
}
|