2015-01-20 11:20:22 -08:00
|
|
|
//@ compile-flags: -D path-statements
|
2020-08-02 16:30:09 +02:00
|
|
|
struct Droppy;
|
|
|
|
|
|
|
|
impl Drop for Droppy {
|
|
|
|
fn drop(&mut self) {}
|
|
|
|
}
|
2012-04-26 13:47:13 -07:00
|
|
|
|
2020-08-02 16:30:09 +02:00
|
|
|
fn main() {
|
2015-01-31 17:23:42 +01:00
|
|
|
let x = 10;
|
2012-06-30 12:23:59 +01:00
|
|
|
x; //~ ERROR path statement with no effect
|
2020-08-02 16:30:09 +02:00
|
|
|
|
|
|
|
let y = Droppy;
|
|
|
|
y; //~ ERROR path statement drops value
|
|
|
|
|
|
|
|
let z = (Droppy,);
|
|
|
|
z; //~ ERROR path statement drops value
|
2013-02-14 11:47:00 -08:00
|
|
|
}
|