Skip to content

Commit d93e047

Browse files
committed
rebase and update fixed crashes
1 parent 1a893ac commit d93e047

7 files changed

+78
-21
lines changed

tests/crashes/118987.rs

-17
This file was deleted.

tests/crashes/118987-2.rs tests/ui/specialization/coherence/default-impl-normalization-ambig-2.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ known-bug: #118987
1+
// regression test for #118987
22
#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
33

44
trait Assoc {
@@ -15,3 +15,5 @@ trait Foo {}
1515

1616
impl Foo for <u8 as Assoc>::Output {}
1717
impl Foo for <u16 as Assoc>::Output {}
18+
//~^ ERROR the trait bound `u16: Assoc` is not satisfied
19+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
2+
--> $DIR/default-impl-normalization-ambig-2.rs:2:12
3+
|
4+
LL | #![feature(specialization)]
5+
| ^^^^^^^^^^^^^^
6+
|
7+
= note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
8+
= help: consider using `min_specialization` instead, which is more stable and complete
9+
= note: `#[warn(incomplete_features)]` on by default
10+
11+
error[E0277]: the trait bound `u16: Assoc` is not satisfied
12+
--> $DIR/default-impl-normalization-ambig-2.rs:17:14
13+
|
14+
LL | impl Foo for <u16 as Assoc>::Output {}
15+
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `Assoc` is not implemented for `u16`
16+
|
17+
= help: the trait `Assoc` is implemented for `u8`
18+
19+
error: aborting due to 1 previous error; 1 warning emitted
20+
21+
For more information about this error, try `rustc --explain E0277`.

tests/crashes/74299.rs tests/ui/specialization/coherence/default-item-normalization-ambig-1.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
//@ known-bug: #74299
2-
#![feature(specialization)]
1+
// regression test for #73299.
2+
#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
33

44
trait X {
55
type U;
@@ -18,6 +18,7 @@ trait Y {
1818

1919
impl Y for <() as X>::U {}
2020
impl Y for <i32 as X>::U {}
21+
//~^ ERROR conflicting implementations of trait `Y` for type `<() as X>::U`
2122

2223
fn main() {
2324
().f().g();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
2+
--> $DIR/default-item-normalization-ambig-1.rs:2:12
3+
|
4+
LL | #![feature(specialization)]
5+
| ^^^^^^^^^^^^^^
6+
|
7+
= note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
8+
= help: consider using `min_specialization` instead, which is more stable and complete
9+
= note: `#[warn(incomplete_features)]` on by default
10+
11+
error[E0119]: conflicting implementations of trait `Y` for type `<() as X>::U`
12+
--> $DIR/default-item-normalization-ambig-1.rs:20:1
13+
|
14+
LL | impl Y for <() as X>::U {}
15+
| ----------------------- first implementation here
16+
LL | impl Y for <i32 as X>::U {}
17+
| ^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `<() as X>::U`
18+
19+
error: aborting due to 1 previous error; 1 warning emitted
20+
21+
For more information about this error, try `rustc --explain E0119`.
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
//@ known-bug: #124207
21
#![feature(transmutability)]
32
#![feature(type_alias_impl_trait)]
43
trait OpaqueTrait {}
54
type OpaqueType = impl OpaqueTrait;
5+
//~^ ERROR unconstrained opaque type
66
trait AnotherTrait {}
77
impl<T: std::mem::TransmuteFrom<(), ()>> AnotherTrait for T {}
8+
//~^ ERROR type provided when a constant was expected
89
impl AnotherTrait for OpaqueType {}
10+
//~^ ERROR conflicting implementations of trait `AnotherTrait`
911
pub fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
error: unconstrained opaque type
2+
--> $DIR/coherence-bikeshed-intrinsic-from.rs:4:19
3+
|
4+
LL | type OpaqueType = impl OpaqueTrait;
5+
| ^^^^^^^^^^^^^^^^
6+
|
7+
= note: `OpaqueType` must be used in combination with a concrete type within the same module
8+
9+
error[E0747]: type provided when a constant was expected
10+
--> $DIR/coherence-bikeshed-intrinsic-from.rs:7:37
11+
|
12+
LL | impl<T: std::mem::TransmuteFrom<(), ()>> AnotherTrait for T {}
13+
| ^^
14+
15+
error[E0119]: conflicting implementations of trait `AnotherTrait`
16+
--> $DIR/coherence-bikeshed-intrinsic-from.rs:9:1
17+
|
18+
LL | impl<T: std::mem::TransmuteFrom<(), ()>> AnotherTrait for T {}
19+
| ----------------------------------------------------------- first implementation here
20+
LL |
21+
LL | impl AnotherTrait for OpaqueType {}
22+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
23+
24+
error: aborting due to 3 previous errors
25+
26+
Some errors have detailed explanations: E0119, E0747.
27+
For more information about an error, try `rustc --explain E0119`.

0 commit comments

Comments
 (0)