rust/tests/ui/coherence/coherence-impls-sized.stderr

74 lines
2.7 KiB
Plaintext
Raw Normal View History

2018-08-08 07:28:26 -05:00
error[E0322]: explicit impls for the `Sized` trait are not permitted
--> $DIR/coherence-impls-sized.rs:14:1
2018-08-08 07:28:26 -05:00
|
2018-12-28 19:13:06 -06:00
LL | impl Sized for TestE {}
2022-06-01 13:36:20 -05:00
| ^^^^^^^^^^^^^^^^^^^^ impl of `Sized` not allowed
2018-08-08 07:28:26 -05:00
error[E0322]: explicit impls for the `Sized` trait are not permitted
--> $DIR/coherence-impls-sized.rs:17:1
2018-08-08 07:28:26 -05:00
|
2018-12-28 19:13:06 -06:00
LL | impl Sized for MyType {}
2022-06-01 13:36:20 -05:00
| ^^^^^^^^^^^^^^^^^^^^^ impl of `Sized` not allowed
2018-08-08 07:28:26 -05:00
error[E0322]: explicit impls for the `Sized` trait are not permitted
--> $DIR/coherence-impls-sized.rs:20:1
2018-08-08 07:28:26 -05:00
|
2018-12-28 19:13:06 -06:00
LL | impl Sized for (MyType, MyType) {}
2022-06-01 13:36:20 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl of `Sized` not allowed
2018-08-08 07:28:26 -05:00
2021-05-09 13:53:13 -05:00
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-impls-sized.rs:20:1
|
LL | impl Sized for (MyType, MyType) {}
| ^^^^^^^^^^^^^^^----------------
| | |
| | this is not defined in the current crate because tuples are always foreign
| impl doesn't use only types from inside the current crate
|
= note: define and implement a trait or new type instead
2018-08-08 07:28:26 -05:00
error[E0322]: explicit impls for the `Sized` trait are not permitted
--> $DIR/coherence-impls-sized.rs:24:1
2018-08-08 07:28:26 -05:00
|
2018-12-28 19:13:06 -06:00
LL | impl Sized for &'static NotSync {}
2022-06-01 13:36:20 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl of `Sized` not allowed
2018-08-08 07:28:26 -05:00
error[E0322]: explicit impls for the `Sized` trait are not permitted
--> $DIR/coherence-impls-sized.rs:27:1
2018-08-08 07:28:26 -05:00
|
2018-12-28 19:13:06 -06:00
LL | impl Sized for [MyType] {}
2022-06-01 13:36:20 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^ impl of `Sized` not allowed
2018-08-08 07:28:26 -05:00
2021-05-09 13:53:13 -05:00
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-impls-sized.rs:27:1
|
LL | impl Sized for [MyType] {}
| ^^^^^^^^^^^^^^^--------
| | |
| | this is not defined in the current crate because slices are always foreign
| impl doesn't use only types from inside the current crate
|
= note: define and implement a trait or new type instead
2018-08-08 07:28:26 -05:00
error[E0322]: explicit impls for the `Sized` trait are not permitted
--> $DIR/coherence-impls-sized.rs:31:1
2018-08-08 07:28:26 -05:00
|
2018-12-28 19:13:06 -06:00
LL | impl Sized for &'static [NotSync] {}
2022-06-01 13:36:20 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl of `Sized` not allowed
2018-08-08 07:28:26 -05:00
2021-05-09 13:53:13 -05:00
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-impls-sized.rs:31:1
|
LL | impl Sized for &'static [NotSync] {}
| ^^^^^^^^^^^^^^^------------------
| | |
| | this is not defined in the current crate because slices are always foreign
| impl doesn't use only types from inside the current crate
|
= note: define and implement a trait or new type instead
2018-08-08 07:28:26 -05:00
error: aborting due to 9 previous errors
Some errors have detailed explanations: E0117, E0322.
2018-08-08 07:28:26 -05:00
For more information about an error, try `rustc --explain E0117`.