mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
40ae34194c
detects redundant imports that can be eliminated. for #117772 : In order to facilitate review and modification, split the checking code and removing redundant imports code into two PR.
18 lines
347 B
Rust
18 lines
347 B
Rust
// run-pass
|
|
#![allow(dead_code)]
|
|
// This test verifies that temporary lifetime is correctly computed
|
|
// for static objects in enclosing scopes.
|
|
|
|
fn f<T:PartialEq+std::fmt::Debug>(o: &mut Option<T>) {
|
|
assert_eq!(*o, None);
|
|
}
|
|
|
|
pub fn main() {
|
|
mod t {
|
|
enum E {V=1, A=0}
|
|
static C: E = E::V;
|
|
}
|
|
|
|
f::<isize>(&mut None);
|
|
}
|