-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #124945 - matthiaskrgr:rollup-r6395sn, r=matthiaskrgr
Rollup of 4 pull requests Successful merges: - #124915 (`rustc_target` cleanups) - #124927 (opt-dist: use xz2 instead of xz crate) - #124936 (analyse visitor: build proof tree in probe) - #124943 (always use `GenericArgsRef`) r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
21 changed files
with
139 additions
and
77 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
43 changes: 43 additions & 0 deletions
43
tests/ui/traits/next-solver/coherence/ambiguity-causes-canonical-state-ice-1.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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
//@ compile-flags: -Znext-solver=coherence | ||
//@ check-pass | ||
|
||
// A regression test for #124791. Computing ambiguity causes | ||
// for the overlap of the `ToString` impls caused an ICE. | ||
#![crate_type = "lib"] | ||
#![feature(min_specialization)] | ||
trait Display {} | ||
|
||
trait ToOwned { | ||
type Owned; | ||
} | ||
|
||
impl<T> ToOwned for T { | ||
type Owned = T; | ||
} | ||
|
||
struct Cow<B: ?Sized>(B); | ||
|
||
impl<B: ?Sized> Display for Cow<B> | ||
where | ||
B: ToOwned, | ||
B::Owned: Display, | ||
{ | ||
} | ||
|
||
impl Display for () {} | ||
|
||
trait ToString { | ||
fn to_string(); | ||
} | ||
|
||
impl<T: Display + ?Sized> ToString for T { | ||
default fn to_string() {} | ||
} | ||
|
||
impl ToString for Cow<str> { | ||
fn to_string() {} | ||
} | ||
|
||
impl ToOwned for str { | ||
type Owned = (); | ||
} |
19 changes: 19 additions & 0 deletions
19
tests/ui/traits/next-solver/coherence/ambiguity-causes-canonical-state-ice-2.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
//@ compile-flags: -Znext-solver=coherence | ||
|
||
// A regression test for #124791. Computing ambiguity causes | ||
// for the overlap of the `ToString` impls caused an ICE. | ||
#![crate_type = "lib"] | ||
trait ToOwned { | ||
type Owned; | ||
} | ||
impl<T> ToOwned for T { | ||
type Owned = u8; | ||
} | ||
impl ToOwned for str { | ||
type Owned = i8; | ||
} | ||
|
||
trait Overlap {} | ||
impl<T: ToOwned<Owned = i8> + ?Sized> Overlap for T {} | ||
impl Overlap for str {} | ||
//~^ ERROR conflicting implementations of trait `Overlap` |
11 changes: 11 additions & 0 deletions
11
tests/ui/traits/next-solver/coherence/ambiguity-causes-canonical-state-ice-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,11 @@ | ||
error[E0119]: conflicting implementations of trait `Overlap` for type `str` | ||
--> $DIR/ambiguity-causes-canonical-state-ice-2.rs:18:1 | ||
| | ||
LL | impl<T: ToOwned<Owned = i8> + ?Sized> Overlap for T {} | ||
| --------------------------------------------------- first implementation here | ||
LL | impl Overlap for str {} | ||
| ^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `str` | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0119`. |
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
Oops, something went wrong.