Move span in error (fixup #22764)
This commit is contained in:
parent
3d3ccfff9e
commit
931c55ab00
1 changed files with 2 additions and 3 deletions
|
@ -18,11 +18,10 @@ trait Collection { fn len(&self) -> usize; }
|
|||
|
||||
struct List<'a, T: ListItem<'a>> {
|
||||
//~^ ERROR the parameter type `T` may not live long enough
|
||||
//~^^ HELP consider adding an explicit lifetime bound
|
||||
//~^^^ NOTE ...so that the reference type `&'a [T]` does not outlive the data it points at
|
||||
//~^^ NOTE ...so that the reference type `&'a [T]` does not outlive the data it points at
|
||||
slice: &'a [T]
|
||||
}
|
||||
|
||||
//~^ HELP consider adding an explicit lifetime bound
|
||||
impl<'a, T: ListItem<'a>> Collection for List<'a, T> {
|
||||
fn len(&self) -> usize {
|
||||
0
|
||||
|
|
Loading…
Reference in a new issue