Remove useless warning

This commit is contained in:
Oliver Schneider 2017-04-11 14:34:39 +02:00
parent 2eae102cd1
commit fae1e646ee
2 changed files with 1 additions and 9 deletions

View File

@ -145,7 +145,7 @@ impl Test {
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];

View 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