rust/tests/ui/unit.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
279 B
Rust
Raw Normal View History

// run-pass
#![allow(unused_assignments)]
#![allow(unknown_lints)]
// pretty-expanded FIXME #23616
#![allow(unused_variables)]
#![allow(dead_assignment)]
2010-06-24 04:03:09 +00:00
2012-08-02 00:30:05 +00:00
fn f(u: ()) { return u; }
pub fn main() {
let u1: () = ();
let mut u2: () = f(u1);
u2 = ();
2012-08-02 00:30:05 +00:00
return ();
}