blob: 6e6c649ca3d5768058fde30a2b0fa4e6a40fc1eb [file] [log] [blame]
error[E0107]: trait takes 1 lifetime argument but 0 lifetime arguments were supplied
--> $DIR/unboxed-closure-sugar-region.rs:32:51
|
LL | fn test2(x: &dyn Foo<(isize,),Output=()>, y: &dyn Foo(isize)) {
| ^^^ expected 1 lifetime argument
|
note: trait defined here, with 1 lifetime parameter: `'a`
--> $DIR/unboxed-closure-sugar-region.rs:10:7
|
LL | trait Foo<'a,T> {
| ^^^ --
error[E0107]: trait takes 1 lifetime argument but 0 lifetime arguments were supplied
--> $DIR/unboxed-closure-sugar-region.rs:23:58
|
LL | eq::< dyn Foo<(isize,),Output=()>, dyn Foo(isize) >();
| ^^^ expected 1 lifetime argument
|
note: trait defined here, with 1 lifetime parameter: `'a`
--> $DIR/unboxed-closure-sugar-region.rs:10:7
|
LL | trait Foo<'a,T> {
| ^^^ --
error[E0107]: trait takes 1 lifetime argument but 0 lifetime arguments were supplied
--> $DIR/unboxed-closure-sugar-region.rs:28:58
|
LL | eq::< dyn Foo<'static, (isize,),Output=()>, dyn Foo(isize) >();
| ^^^ expected 1 lifetime argument
|
note: trait defined here, with 1 lifetime parameter: `'a`
--> $DIR/unboxed-closure-sugar-region.rs:10:7
|
LL | trait Foo<'a,T> {
| ^^^ --
error[E0521]: borrowed data escapes outside of function
--> $DIR/unboxed-closure-sugar-region.rs:35:5
|
LL | fn test2(x: &dyn Foo<(isize,),Output=()>, y: &dyn Foo(isize)) {
| - - `y` declared here, outside of the function body
| |
| `x` is a reference that is only valid in the function body
| has type `&dyn Foo<'1, (isize,), Output = ()>`
...
LL | same_type(x, y)
| ^^^^^^^^^^^^^^^
| |
| `x` escapes the function body here
| argument requires that `'1` must outlive `'static`
error: aborting due to 4 previous errors
Some errors have detailed explanations: E0107, E0521.
For more information about an error, try `rustc --explain E0107`.