-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
78 additions
and
21 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
tests/ui/specialization/coherence/default-impl-normalization-ambig-2.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes | ||
--> $DIR/default-impl-normalization-ambig-2.rs:2:12 | ||
| | ||
LL | #![feature(specialization)] | ||
| ^^^^^^^^^^^^^^ | ||
| | ||
= note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information | ||
= help: consider using `min_specialization` instead, which is more stable and complete | ||
= note: `#[warn(incomplete_features)]` on by default | ||
|
||
error[E0277]: the trait bound `u16: Assoc` is not satisfied | ||
--> $DIR/default-impl-normalization-ambig-2.rs:17:14 | ||
| | ||
LL | impl Foo for <u16 as Assoc>::Output {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `Assoc` is not implemented for `u16` | ||
| | ||
= help: the trait `Assoc` is implemented for `u8` | ||
|
||
error: aborting due to 1 previous error; 1 warning emitted | ||
|
||
For more information about this error, try `rustc --explain E0277`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
tests/ui/specialization/coherence/default-item-normalization-ambig-1.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes | ||
--> $DIR/default-item-normalization-ambig-1.rs:2:12 | ||
| | ||
LL | #![feature(specialization)] | ||
| ^^^^^^^^^^^^^^ | ||
| | ||
= note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information | ||
= help: consider using `min_specialization` instead, which is more stable and complete | ||
= note: `#[warn(incomplete_features)]` on by default | ||
|
||
error[E0119]: conflicting implementations of trait `Y` for type `<() as X>::U` | ||
--> $DIR/default-item-normalization-ambig-1.rs:20:1 | ||
| | ||
LL | impl Y for <() as X>::U {} | ||
| ----------------------- first implementation here | ||
LL | impl Y for <i32 as X>::U {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `<() as X>::U` | ||
|
||
error: aborting due to 1 previous error; 1 warning emitted | ||
|
||
For more information about this error, try `rustc --explain E0119`. |
4 changes: 3 additions & 1 deletion
4
tests/crashes/124207.rs → ...ness/coherence-bikeshed-intrinsic-from.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
//@ known-bug: #124207 | ||
#![feature(transmutability)] | ||
#![feature(type_alias_impl_trait)] | ||
trait OpaqueTrait {} | ||
type OpaqueType = impl OpaqueTrait; | ||
//~^ ERROR unconstrained opaque type | ||
trait AnotherTrait {} | ||
impl<T: std::mem::BikeshedIntrinsicFrom<(), ()>> AnotherTrait for T {} | ||
//~^ ERROR type provided when a constant was expected | ||
impl AnotherTrait for OpaqueType {} | ||
//~^ ERROR conflicting implementations of trait `AnotherTrait` | ||
pub fn main() {} |
27 changes: 27 additions & 0 deletions
27
...i/transmutability/malformed-program-gracefulness/coherence-bikeshed-intrinsic-from.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
error: unconstrained opaque type | ||
--> $DIR/coherence-bikeshed-intrinsic-from.rs:4:19 | ||
| | ||
LL | type OpaqueType = impl OpaqueTrait; | ||
| ^^^^^^^^^^^^^^^^ | ||
| | ||
= note: `OpaqueType` must be used in combination with a concrete type within the same module | ||
|
||
error[E0747]: type provided when a constant was expected | ||
--> $DIR/coherence-bikeshed-intrinsic-from.rs:7:45 | ||
| | ||
LL | impl<T: std::mem::BikeshedIntrinsicFrom<(), ()>> AnotherTrait for T {} | ||
| ^^ | ||
|
||
error[E0119]: conflicting implementations of trait `AnotherTrait` | ||
--> $DIR/coherence-bikeshed-intrinsic-from.rs:9:1 | ||
| | ||
LL | impl<T: std::mem::BikeshedIntrinsicFrom<(), ()>> AnotherTrait for T {} | ||
| ------------------------------------------------------------------- first implementation here | ||
LL | | ||
LL | impl AnotherTrait for OpaqueType {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation | ||
|
||
error: aborting due to 3 previous errors | ||
|
||
Some errors have detailed explanations: E0119, E0747. | ||
For more information about an error, try `rustc --explain E0119`. |