Skip to content

Commit 4d96d99

Browse files
committed
rebase and update fixed crashes
1 parent 083f399 commit 4d96d99

13 files changed

+40
-106
lines changed

tests/crashes/118987.rs

-17
This file was deleted.

tests/crashes/119272.rs

-27
This file was deleted.

tests/crashes/74299.rs

-24
This file was deleted.

tests/ui/coherence/skip-reporting-if-references-err.current.stderr

+2-15
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,6 @@ help: indicate the anonymous lifetime
99
LL | impl<T> ToUnit<'_> for T {}
1010
| ++++
1111

12-
error[E0277]: the trait bound `for<'a> (): ToUnit<'a>` is not satisfied
13-
--> $DIR/skip-reporting-if-references-err.rs:15:29
14-
|
15-
LL | impl Overlap for for<'a> fn(<() as ToUnit<'a>>::Unit) {}
16-
| ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> ToUnit<'a>` is not implemented for `()`
17-
18-
error[E0277]: the trait bound `for<'a> (): ToUnit<'a>` is not satisfied
19-
--> $DIR/skip-reporting-if-references-err.rs:15:18
20-
|
21-
LL | impl Overlap for for<'a> fn(<() as ToUnit<'a>>::Unit) {}
22-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> ToUnit<'a>` is not implemented for `()`
23-
24-
error: aborting due to 3 previous errors
12+
error: aborting due to 1 previous error
2513

26-
Some errors have detailed explanations: E0277, E0726.
27-
For more information about an error, try `rustc --explain E0277`.
14+
For more information about this error, try `rustc --explain E0726`.
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
// Regression test for #121006.
2-
//@ revisions: current next
3-
//@ ignore-compare-mode-next-solver (explicit revisions)
4-
//@[next] compile-flags: -Znext-solver
52

63
trait ToUnit<'a> {
74
type Unit;
@@ -13,7 +10,5 @@ impl<T> ToUnit for T {}
1310
trait Overlap {}
1411
impl<U> Overlap for fn(U) {}
1512
impl Overlap for for<'a> fn(<() as ToUnit<'a>>::Unit) {}
16-
//[current]~^ ERROR the trait bound `for<'a> (): ToUnit<'a>` is not satisfied
17-
//[current]~| ERROR the trait bound `for<'a> (): ToUnit<'a>` is not satisfied
1813

1914
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
error[E0726]: implicit elided lifetime not allowed here
2+
--> $DIR/skip-reporting-if-references-err.rs:7:9
3+
|
4+
LL | impl<T> ToUnit for T {}
5+
| ^^^^^^ expected lifetime parameter
6+
|
7+
help: indicate the anonymous lifetime
8+
|
9+
LL | impl<T> ToUnit<'_> for T {}
10+
| ++++
11+
12+
error: aborting due to 1 previous error
13+
14+
For more information about this error, try `rustc --explain E0726`.

tests/ui/const-generics/generic_const_exprs/unknown-alias-defkind-anonconst-ice-116710.rs

-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@ trait Trait {}
1010
impl<const N: u32> Trait for A<N> {}
1111

1212
impl<const N: u32> Trait for A<N> {}
13-
//~^ ERROR conflicting implementations of trait `Trait` for type `A<_>`
1413

1514
pub fn main() {}

tests/ui/const-generics/generic_const_exprs/unknown-alias-defkind-anonconst-ice-116710.stderr

+2-12
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,6 @@ error[E0423]: expected value, found builtin type `u8`
44
LL | struct A<const N: u32 = 1, const M: u32 = u8>;
55
| ^^ not a value
66

7-
error[E0119]: conflicting implementations of trait `Trait` for type `A<_>`
8-
--> $DIR/unknown-alias-defkind-anonconst-ice-116710.rs:12:1
9-
|
10-
LL | impl<const N: u32> Trait for A<N> {}
11-
| --------------------------------- first implementation here
12-
LL |
13-
LL | impl<const N: u32> Trait for A<N> {}
14-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `A<_>`
15-
16-
error: aborting due to 2 previous errors
7+
error: aborting due to 1 previous error
178

18-
Some errors have detailed explanations: E0119, E0423.
19-
For more information about an error, try `rustc --explain E0119`.
9+
For more information about this error, try `rustc --explain E0423`.

tests/crashes/118987-2.rs renamed to tests/ui/specialization/defaultimpl/coherence-ice-issue-118987.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
//@ known-bug: #118987
1+
//@ check-pass
2+
// Regression test for #118987 which previously caused an ICE.
23
#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
34

45
trait Assoc {
@@ -14,4 +15,6 @@ impl Assoc for u8 {}
1415
trait Foo {}
1516

1617
impl Foo for <u8 as Assoc>::Output {}
17-
impl Foo for <u16 as Assoc>::Output {}
18+
impl Foo for u16 {}
19+
20+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
2+
--> $DIR/coherence-ice-issue-118987.rs:3: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+
warning: 1 warning emitted
12+

tests/ui/specialization/specialization-default-items-drop-coherence.current.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0119]: conflicting implementations of trait `Overlap` for type `u32`
2-
--> $DIR/specialization-default-items-drop-coherence.rs:26:1
2+
--> $DIR/specialization-default-items-drop-coherence.rs:28:1
33
|
44
LL | impl Overlap for u32 {
55
| -------------------- first implementation here

tests/ui/specialization/specialization-default-items-drop-coherence.next.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0119]: conflicting implementations of trait `Overlap` for type `u32`
2-
--> $DIR/specialization-default-items-drop-coherence.rs:26:1
2+
--> $DIR/specialization-default-items-drop-coherence.rs:28:1
33
|
44
LL | impl Overlap for u32 {
55
| -------------------- first implementation here
@@ -8,7 +8,7 @@ LL | impl Overlap for <u32 as Default>::Id {
88
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `u32`
99

1010
error[E0282]: type annotations needed
11-
--> $DIR/specialization-default-items-drop-coherence.rs:15:23
11+
--> $DIR/specialization-default-items-drop-coherence.rs:17:23
1212
|
1313
LL | default type Id = T;
1414
| ^ cannot infer type for associated type `<T as Default>::Id`

tests/ui/specialization/specialization-default-items-drop-coherence.rs

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
// Should fail. Default items completely drop candidates instead of ambiguity,
55
// which is unsound during coherence, since coherence requires completeness.
6+
//
7+
// A regression test for #105782.
68

79
#![feature(specialization)]
810
#![allow(incomplete_features)]

0 commit comments

Comments
 (0)