Closed
Description
const FOO: i32 = 42;
fn main() {
FOO;
}
<anon>:3:5: 3:9 warning: path statement with no effect, #[warn(path_statements)] on by default
<anon>:3 FOO;
^~~~
<anon>:3:5: 3:8 error: internal compiler error: constant expression should not reach expr::trans_def
<anon>:3 FOO;
^~~
Note that this is fixed by changing to let _ = FOO;
.