rust/src/test/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr

23 lines
908 B
Plaintext
Raw Normal View History

2017-03-28 14:10:16 +02:00
error[E0178]: expected a path on the left-hand side of `+`, not `&Copy`
--> $DIR/trait-object-reference-without-parens-suggestion.rs:12:12
|
12 | let _: &Copy + 'static;
| ^^^^^^^^^^^^^^^ try adding parentheses: `&(Copy + 'static)`
error[E0178]: expected a path on the left-hand side of `+`, not `&'static Copy`
--> $DIR/trait-object-reference-without-parens-suggestion.rs:13:12
|
13 | let _: &'static Copy + 'static;
| ^^^^^^^^^^^^^^^^^^^^^^^ try adding parentheses: `&'static (Copy + 'static)`
error[E0038]: the trait `std::marker::Copy` cannot be made into an object
--> $DIR/trait-object-reference-without-parens-suggestion.rs:12:12
|
12 | let _: &Copy + 'static;
| ^^^^^ the trait `std::marker::Copy` cannot be made into an object
|
= note: the trait cannot require that `Self : Sized`
error: aborting due to previous error