]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/warn-path-statement.rs
Auto merge of #106884 - clubby789:fieldless-enum-debug, r=michaelwoerister
[rust.git] / tests / ui / lint / warn-path-statement.rs
1 // compile-flags: -D path-statements
2 struct Droppy;
3
4 impl Drop for Droppy {
5     fn drop(&mut self) {}
6 }
7
8 fn main() {
9     let x = 10;
10     x; //~ ERROR path statement with no effect
11
12     let y = Droppy;
13     y; //~ ERROR path statement drops value
14
15     let z = (Droppy,);
16     z; //~ ERROR path statement drops value
17 }