2015-01-08 21:54:35 +11:00
|
|
|
fn foo(x: isize) { println!("{}", x); }
|
2012-05-19 05:52:01 -07:00
|
|
|
|
|
|
|
|
fn main() {
|
2015-01-08 21:54:35 +11:00
|
|
|
let x: isize;
|
2022-06-21 11:57:45 -07:00
|
|
|
foo(x); //~ ERROR E0381
|
2024-02-04 17:11:29 +00:00
|
|
|
|
|
|
|
|
// test for #120634
|
|
|
|
|
struct A(u8);
|
|
|
|
|
struct B { d: u8 }
|
|
|
|
|
let (a, );
|
|
|
|
|
let [b, ];
|
|
|
|
|
let A(c);
|
|
|
|
|
let B { d };
|
|
|
|
|
let _: (u8, u8, u8, u8) = (a, b, c, d);
|
|
|
|
|
//~^ ERROR used binding `a`
|
|
|
|
|
//~| ERROR used binding `b`
|
|
|
|
|
//~| ERROR used binding `c`
|
|
|
|
|
//~| ERROR used binding `d`
|
2012-05-19 05:52:01 -07:00
|
|
|
}
|