Remove useless warning
This commit is contained in:
parent
2eae102cd1
commit
fae1e646ee
2 changed files with 1 additions and 9 deletions
|
@ -145,7 +145,7 @@ impl Test {
|
||||||
|
|
||||||
trait LintContext<'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 {
|
fn test<'a>(x: &'a [u8]) -> u8 {
|
||||||
let y: &'a u8 = &x[5];
|
let y: &'a u8 = &x[5];
|
||||||
|
|
|
@ -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!() }
|
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
|
error: aborting due to 15 previous errors
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue