Make liveness analysis respect privacy

This commit is contained in:
varkor 2018-11-06 19:38:01 +00:00
parent 20415af142
commit 210e234733
2 changed files with 7 additions and 4 deletions

View file

@ -1,6 +1,6 @@
// compile-pass
#![deny(unreachable_code)]
#![deny(unused_variables)]
mod foo {
enum Bar {}
@ -14,6 +14,7 @@ mod foo {
}
fn main() {
let a = 42;
foo::give_foo();
println!("Hello, world!"); // ok: we can't tell that this code is dead
println!("Hello, {}", a); // ok: we can't tell that this code is dead
}