rust/src/test/ui/syntax-trait-polarity.stderr

45 lines
1.2 KiB
Plaintext
Raw Normal View History

2018-08-08 07:28:26 -05:00
error: inherent impls cannot be negative
--> $DIR/syntax-trait-polarity.rs:7:6
2018-08-08 07:28:26 -05:00
|
LL | impl !TestType {}
| ^
2018-08-08 07:28:26 -05:00
error[E0198]: negative impls cannot be unsafe
--> $DIR/syntax-trait-polarity.rs:12:13
2018-08-08 07:28:26 -05:00
|
LL | unsafe impl !Send for TestType {}
| ------ ^^^^^
| |
| unsafe because of this
2018-08-08 07:28:26 -05:00
error: inherent impls cannot be negative
--> $DIR/syntax-trait-polarity.rs:19:9
2018-08-08 07:28:26 -05:00
|
LL | impl<T> !TestType2<T> {}
| ^
2018-08-08 07:28:26 -05:00
error[E0198]: negative impls cannot be unsafe
--> $DIR/syntax-trait-polarity.rs:22:16
2018-08-08 07:28:26 -05:00
|
LL | unsafe impl<T> !Send for TestType2<T> {}
| ------ ^^^^^
| |
| unsafe because of this
2018-08-08 07:28:26 -05:00
error[E0192]: negative impls are only allowed for auto traits (e.g., `Send` and `Sync`)
2018-12-25 09:56:47 -06:00
--> $DIR/syntax-trait-polarity.rs:14:1
2018-08-08 07:28:26 -05:00
|
LL | impl !TestTrait for TestType {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0192]: negative impls are only allowed for auto traits (e.g., `Send` and `Sync`)
2018-12-25 09:56:47 -06:00
--> $DIR/syntax-trait-polarity.rs:24:1
2018-08-08 07:28:26 -05:00
|
LL | impl<T> !TestTrait for TestType2<T> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 6 previous errors
Some errors have detailed explanations: E0192, E0198.
2018-08-08 07:28:26 -05:00
For more information about an error, try `rustc --explain E0192`.