]> git.lizzy.rs Git - rust.git/commitdiff
Remove useless warning
authorOliver Schneider <git-no-reply-9879165716479413131@oli-obk.de>
Tue, 11 Apr 2017 12:34:39 +0000 (14:34 +0200)
committerOliver Schneider <git-no-reply-9879165716479413131@oli-obk.de>
Tue, 11 Apr 2017 12:34:39 +0000 (14:34 +0200)
tests/ui/lifetimes.rs
tests/ui/lifetimes.stderr

index 620ceafdba2658d0ec3d20fd830e154431372af8..ea8a483924fd9a9b558e447d4dca9755289dbce1 100644 (file)
@@ -145,7 +145,7 @@ fn iter<'a>(&'a self) -> Box<Iterator<Item = usize> + 'a> {
 
 trait LintContext<'a> {}
 
-fn f<'a, T: LintContext<'a>>(cx: &T) {}
+fn f<'a, T: LintContext<'a>>(_: &T) {}
 
 fn test<'a>(x: &'a [u8]) -> u8 {
     let y: &'a u8 = &x[5];
index 0a201222910c53421e116ffcbe571b3f0bc14a35..e155d55011ccd9b3cb39c6c043cf456a620e14a3 100644 (file)
@@ -97,13 +97,5 @@ error: explicit lifetimes given in parameter types where they could be elided
 132 | fn trait_bound_bug<'a, T: WithLifetime<'a>>() { unimplemented!() }
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-warning: unused variable: `cx`
-   --> $DIR/lifetimes.rs:148:30
-    |
-148 | fn f<'a, T: LintContext<'a>>(cx: &T) {}
-    |                              ^^
-    |
-    = note: #[warn(unused_variables)] on by default
-
 error: aborting due to 15 previous errors