2019-06-21 09:12:07 -05:00
|
|
|
error[E0224]: at least one trait is required for an object type
|
2019-01-12 21:25:03 -06:00
|
|
|
--> $DIR/trait-object-vs-lifetime.rs:9:23
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-05-28 13:46:13 -05:00
|
|
|
LL | let _: S<'static, dyn 'static +>;
|
|
|
|
| ^^^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2021-01-02 12:45:11 -06:00
|
|
|
error[E0107]: this struct takes 1 lifetime argument but 2 lifetime arguments were supplied
|
|
|
|
--> $DIR/trait-object-vs-lifetime.rs:11:12
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let _: S<'static, 'static>;
|
2021-01-02 12:45:11 -06:00
|
|
|
| ^ --------- help: remove this lifetime argument
|
|
|
|
| |
|
|
|
|
| expected 1 lifetime argument
|
|
|
|
|
|
|
|
|
note: struct defined here, with 1 lifetime parameter: `'a`
|
|
|
|
--> $DIR/trait-object-vs-lifetime.rs:4:8
|
|
|
|
|
|
|
|
|
LL | struct S<'a, T>(&'a u8, T);
|
|
|
|
| ^ --
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2021-01-02 12:45:11 -06:00
|
|
|
error[E0107]: this struct takes 1 type argument but 0 type arguments were supplied
|
2019-01-12 21:25:03 -06:00
|
|
|
--> $DIR/trait-object-vs-lifetime.rs:11:12
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let _: S<'static, 'static>;
|
2021-01-02 12:45:11 -06:00
|
|
|
| ^ expected 1 type argument
|
|
|
|
|
|
|
|
|
note: struct defined here, with 1 type parameter: `T`
|
|
|
|
--> $DIR/trait-object-vs-lifetime.rs:4:8
|
|
|
|
|
|
|
|
|
LL | struct S<'a, T>(&'a u8, T);
|
|
|
|
| ^ -
|
|
|
|
help: add missing type argument
|
|
|
|
|
|
|
|
|
LL | let _: S<'static, 'static, T>;
|
|
|
|
| ^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2019-06-21 09:12:07 -05:00
|
|
|
error[E0224]: at least one trait is required for an object type
|
2019-01-12 21:25:03 -06:00
|
|
|
--> $DIR/trait-object-vs-lifetime.rs:14:14
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-05-28 13:46:13 -05:00
|
|
|
LL | let _: S<dyn 'static +, 'static>;
|
|
|
|
| ^^^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2020-01-21 17:07:07 -06:00
|
|
|
error[E0747]: type provided when a lifetime was expected
|
|
|
|
--> $DIR/trait-object-vs-lifetime.rs:14:14
|
|
|
|
|
|
|
|
|
LL | let _: S<dyn 'static +, 'static>;
|
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
2018-08-08 07:28:26 -05:00
|
|
|
error: aborting due to 5 previous errors
|
|
|
|
|
2020-03-21 10:43:12 -05:00
|
|
|
Some errors have detailed explanations: E0107, E0224, E0747.
|
2020-01-21 17:07:07 -06:00
|
|
|
For more information about an error, try `rustc --explain E0107`.
|