diff --git a/tests/ui/needless_option_take.rs b/tests/ui/needless_option_take.rs index eb57ffeab..27cc9a2e6 100644 --- a/tests/ui/needless_option_take.rs +++ b/tests/ui/needless_option_take.rs @@ -3,5 +3,5 @@ fn main() { println!("Testing option_take_on_temporary"); let x = Some(3); - let y = x.as_ref().take(); + x.as_ref().take(); } diff --git a/tests/ui/option_take_on_temporary.fixed b/tests/ui/option_take_on_temporary.fixed index 9b4ca5a4a..7e2930766 100644 --- a/tests/ui/option_take_on_temporary.fixed +++ b/tests/ui/option_take_on_temporary.fixed @@ -3,5 +3,5 @@ fn main() { println!("Testing option_take_on_temporary"); let x = Some(3); - let y = x.as_ref(); + x.as_ref(); }