summary refs log tree commit diff
path: root/src/test/ui/lifetime-errors/ex2a-push-one-existing-name.stderr
blob: ede76bca2ba0a9dbcd7512b064ad300a6ae628a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
error[E0621]: explicit lifetime required in the type of `y`
  --> $DIR/ex2a-push-one-existing-name.rs:16:12
   |
LL | fn foo<'a>(x: &mut Vec<Ref<'a, i32>>, y: Ref<i32>) {
   |                                       - consider changing the type of `y` to `Ref<'a, i32>`
LL |     x.push(y); //~ ERROR explicit lifetime
   |            ^ lifetime `'a` required

error: aborting due to previous error

For more information about this error, try `rustc --explain E0621`.