Skip to content

Commit a018a58

Browse files
committed
stabilize -Znext-solver=coherence
1 parent f92d49b commit a018a58

File tree

53 files changed

+307
-225
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+307
-225
lines changed

compiler/rustc_session/src/config.rs

+10
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,16 @@ pub struct NextSolverConfig {
790790
pub dump_tree: DumpSolverProofTree,
791791
}
792792

793+
impl Default for NextSolverConfig {
794+
fn default() -> Self {
795+
NextSolverConfig {
796+
coherence: true,
797+
globally: false,
798+
dump_tree: DumpSolverProofTree::default(),
799+
}
800+
}
801+
}
802+
793803
#[derive(Default, Debug, Copy, Clone, Hash, PartialEq, Eq)]
794804
pub enum DumpSolverProofTree {
795805
Always,

compiler/rustc_session/src/options.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ mod desc {
398398
pub const parse_instrument_xray: &str = "either a boolean (`yes`, `no`, `on`, `off`, etc), or a comma separated list of settings: `always` or `never` (mutually exclusive), `ignore-loops`, `instruction-threshold=N`, `skip-entry`, `skip-exit`";
399399
pub const parse_unpretty: &str = "`string` or `string=string`";
400400
pub const parse_treat_err_as_bug: &str = "either no value or a non-negative number";
401-
pub const parse_next_solver_config: &str = "a comma separated list of solver configurations: `globally` (default), `coherence`, `dump-tree`, `dump-tree-on-error";
401+
pub const parse_next_solver_config: &str = "a comma separated list of solver configurations: `globally` (default), `no`, `dump-tree`, `dump-tree-on-error";
402402
pub const parse_lto: &str =
403403
"either a boolean (`yes`, `no`, `on`, `off`, etc), `thin`, `fat`, or omitted";
404404
pub const parse_linker_plugin_lto: &str =
@@ -1049,6 +1049,10 @@ mod parse {
10491049
let mut dump_tree = None;
10501050
for c in config.split(',') {
10511051
match c {
1052+
"no" => {
1053+
*slot = None;
1054+
return true;
1055+
}
10521056
"globally" => globally = true,
10531057
"coherence" => {
10541058
globally = false;
@@ -1803,7 +1807,7 @@ options! {
18031807
"the size at which the `large_assignments` lint starts to be emitted"),
18041808
mutable_noalias: bool = (true, parse_bool, [TRACKED],
18051809
"emit noalias metadata for mutable references (default: yes)"),
1806-
next_solver: Option<NextSolverConfig> = (None, parse_next_solver_config, [TRACKED],
1810+
next_solver: Option<NextSolverConfig> = (Some(NextSolverConfig::default()), parse_next_solver_config, [TRACKED],
18071811
"enable and configure the next generation trait solver used by rustc"),
18081812
nll_facts: bool = (false, parse_bool, [UNTRACKED],
18091813
"dump facts from NLL analysis into side files (default: no)"),

tests/ui/associated-types/associated-types-coherence-failure.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
error[E0119]: conflicting implementations of trait `IntoCow<'_, _>` for type `Cow<'_, _>`
1+
error[E0119]: conflicting implementations of trait `IntoCow<'_, _>` for type `<_ as ToOwned>::Owned`
22
--> $DIR/associated-types-coherence-failure.rs:21:1
33
|
44
LL | impl<'a, B: ?Sized> IntoCow<'a, B> for <B as ToOwned>::Owned where B: ToOwned {
55
| ----------------------------------------------------------------------------- first implementation here
66
...
77
LL | impl<'a, B: ?Sized> IntoCow<'a, B> for Cow<'a, B> where B: ToOwned {
8-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Cow<'_, _>`
8+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `<_ as ToOwned>::Owned`
99

10-
error[E0119]: conflicting implementations of trait `IntoCow<'_, _>` for type `&_`
10+
error[E0119]: conflicting implementations of trait `IntoCow<'_, _>` for type `<_ as ToOwned>::Owned`
1111
--> $DIR/associated-types-coherence-failure.rs:28:1
1212
|
1313
LL | impl<'a, B: ?Sized> IntoCow<'a, B> for <B as ToOwned>::Owned where B: ToOwned {
1414
| ----------------------------------------------------------------------------- first implementation here
1515
...
1616
LL | impl<'a, B: ?Sized> IntoCow<'a, B> for &'a B where B: ToOwned {
17-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_`
17+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `<_ as ToOwned>::Owned`
1818

1919
error: aborting due to 2 previous errors
2020

tests/ui/coherence/coherence-negative-outlives-lifetimes.stock.stderr

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ LL | impl<'a, T: MyPredicate<'a>> MyTrait<'a> for T {}
55
| ---------------------------------------------- first implementation here
66
LL | impl<'a, T> MyTrait<'a> for &'a T {}
77
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_`
8+
|
9+
= note: downstream crates may implement trait `MyPredicate<'_>` for type `&_`
810

911
error: aborting due to 1 previous error
1012

tests/ui/coherence/coherence-negative-outlives-lifetimes.with_negative_coherence.stderr

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ LL | impl<'a, T: MyPredicate<'a>> MyTrait<'a> for T {}
55
| ---------------------------------------------- first implementation here
66
LL | impl<'a, T> MyTrait<'a> for &'a T {}
77
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_`
8+
|
9+
= note: downstream crates may implement trait `MyPredicate<'_>` for type `&_`
810

911
error: aborting due to 1 previous error
1012

tests/ui/coherence/coherence-overlap-negate-not-use-feature-gate.stderr

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ LL | impl<T: DerefMut> Foo for T {}
55
| --------------------------- first implementation here
66
LL | impl<U> Foo for &U {}
77
| ^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_`
8+
|
9+
= note: downstream crates may implement trait `std::ops::DerefMut` for type `&_`
810

911
error: aborting due to 1 previous error
1012

tests/ui/coherence/coherence-overlap-unnormalizable-projection-0.classic.stderr

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ LL | impl<T> Trait for Box<T> {}
1212
| ^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Box<_>`
1313
|
1414
= note: downstream crates may implement trait `WithAssoc<'a>` for type `std::boxed::Box<_>`
15-
= note: downstream crates may implement trait `WhereBound` for type `<std::boxed::Box<_> as WithAssoc<'a>>::Assoc`
1615

1716
error: aborting due to 1 previous error
1817

tests/ui/coherence/negative-coherence-check-placeholder-outlives.stderr

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ LL | impl<T> Bar for T where T: Foo {}
55
| ------------------------------ first implementation here
66
LL | impl<T> Bar for Box<T> {}
77
| ^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Box<_>`
8+
|
9+
= note: downstream crates may implement trait `Foo` for type `std::boxed::Box<_>`
810

911
error: aborting due to 1 previous error
1012

tests/ui/coherence/negative-coherence-considering-regions.any_lt.stderr

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ LL | impl<T> Bar for T where T: Foo {}
66
...
77
LL | impl<T> Bar for &T {}
88
| ^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_`
9+
|
10+
= note: downstream crates may implement trait `Foo` for type `&_`
911

1012
error: aborting due to 1 previous error
1113

tests/ui/coherence/negative-coherence-placeholder-region-constraints-on-unification.explicit.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ LL | impl<T: ?Sized> FnMarker for fn(&T) {}
88
|
99
= warning: the behavior may change in a future release
1010
= note: for more information, see issue #56105 <https://github.com/rust-lang/rust/issues/56105>
11+
= note: downstream crates may implement trait `Marker` for type `&_`
1112
= note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
1213
note: the lint level is defined here
1314
--> $DIR/negative-coherence-placeholder-region-constraints-on-unification.rs:4:11

tests/ui/coherence/normalize-for-errors.current.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
error[E0119]: conflicting implementations of trait `MyTrait<_>` for type `(Box<(MyType,)>, _)`
1+
error[E0119]: conflicting implementations of trait `MyTrait<_>` for type `(Box<(MyType,)>, <_ as Iterator>::Item)`
22
--> $DIR/normalize-for-errors.rs:17:1
33
|
44
LL | impl<T: Copy, S: Iterator> MyTrait<S> for (T, S::Item) {}
55
| ------------------------------------------------------ first implementation here
66
LL |
77
LL | impl<S: Iterator> MyTrait<S> for (Box<<(MyType,) as Mirror>::Assoc>, S::Item) {}
8-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(Box<(MyType,)>, _)`
8+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(Box<(MyType,)>, <_ as Iterator>::Item)`
99
|
1010
= note: upstream crates may add a new impl of trait `std::marker::Copy` for type `std::boxed::Box<(MyType,)>` in future versions
1111

tests/ui/coherence/occurs-check/associated-type.old.stderr

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, '^0.Named(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), "'a")], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) }
2-
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, !2_0.Named(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), "'a")], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) }
32
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, '^0.Named(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), "'a")], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) }
4-
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, !2_0.Named(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), "'a")], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) }
53
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, '^0.Named(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), "'a")], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) }
6-
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, !2_0.Named(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), "'a")], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) }
74
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, '^0.Named(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), "'a")], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) }
8-
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, !2_0.Named(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), "'a")], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) }
9-
error[E0119]: conflicting implementations of trait `Overlap<for<'a> fn(&'a (), _)>` for type `for<'a> fn(&'a (), _)`
5+
error[E0119]: conflicting implementations of trait `Overlap<for<'a> fn(&'a (), ())>` for type `for<'a> fn(&'a (), ())`
106
--> $DIR/associated-type.rs:31:1
117
|
128
LL | impl<T> Overlap<T> for T {
@@ -16,7 +12,7 @@ LL | / impl<T> Overlap<for<'a> fn(&'a (), Assoc<'a, T>)> for T
1612
LL | |
1713
LL | | where
1814
LL | | for<'a> *const T: ToUnit<'a>,
19-
| |_________________________________^ conflicting implementation for `for<'a> fn(&'a (), _)`
15+
| |_________________________________^ conflicting implementation for `for<'a> fn(&'a (), ())`
2016
|
2117
= note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
2218

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
error[E0119]: conflicting implementations of trait `Trait<_>`
2+
--> $DIR/opaques.rs:27:1
3+
|
4+
LL | impl<T> Trait<T> for T {
5+
| ---------------------- first implementation here
6+
...
7+
LL | impl<T> Trait<T> for defining_scope::Alias<T> {
8+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
9+
10+
error: aborting due to 1 previous error
11+
12+
For more information about this error, try `rustc --explain E0119`.

tests/ui/coherence/occurs-check/opaques.next.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0119]: conflicting implementations of trait `Trait<_>`
2-
--> $DIR/opaques.rs:30:1
2+
--> $DIR/opaques.rs:27:1
33
|
44
LL | impl<T> Trait<T> for T {
55
| ---------------------- first implementation here
@@ -8,7 +8,7 @@ LL | impl<T> Trait<T> for defining_scope::Alias<T> {
88
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
99

1010
error[E0282]: type annotations needed
11-
--> $DIR/opaques.rs:13:20
11+
--> $DIR/opaques.rs:10:20
1212
|
1313
LL | pub fn cast<T>(x: Container<Alias<T>, T>) -> Container<T, T> {
1414
| ^ cannot infer type for struct `Container<T, T>`

tests/ui/coherence/occurs-check/opaques.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
//@revisions: old next
1+
//@revisions: current next
22
//@[next] compile-flags: -Znext-solver
33

44
// A regression test for #105787
5-
6-
//@[old] known-bug: #105787
7-
//@[old] check-pass
85
#![feature(type_alias_impl_trait)]
96
mod defining_scope {
107
use super::*;
@@ -28,7 +25,7 @@ impl<T> Trait<T> for T {
2825
type Assoc = Box<u32>;
2926
}
3027
impl<T> Trait<T> for defining_scope::Alias<T> {
31-
//[next]~^ ERROR conflicting implementations of trait
28+
//~^ ERROR conflicting implementations of trait
3229
type Assoc = usize;
3330
}
3431

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/unevaluated-const-ice-119731.rs

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ mod v20 {
2222
impl v17<512, v0> {
2323
pub const fn v21() -> v18 {}
2424
//~^ ERROR cannot find type `v18` in this scope
25+
//~| ERROR duplicate definitions with name `v21`
2526
}
2627

2728
impl<const v10: usize> v17<v10, v2> {

tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.stderr

+16-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0432]: unresolved import `v20::v13`
2-
--> $DIR/unevaluated-const-ice-119731.rs:37:15
2+
--> $DIR/unevaluated-const-ice-119731.rs:38:15
33
|
44
LL | pub use v20::{v13, v17};
55
| ^^^
@@ -23,7 +23,7 @@ LL | pub const fn v21() -> v18 {}
2323
| ^^^ help: a type alias with a similar name exists: `v11`
2424

2525
error[E0412]: cannot find type `v18` in this scope
26-
--> $DIR/unevaluated-const-ice-119731.rs:30:31
26+
--> $DIR/unevaluated-const-ice-119731.rs:31:31
2727
|
2828
LL | pub type v11 = [[usize; v4]; v4];
2929
| --------------------------------- similarly named type alias `v11` defined here
@@ -32,7 +32,7 @@ LL | pub const fn v21() -> v18 {
3232
| ^^^ help: a type alias with a similar name exists: `v11`
3333

3434
error[E0422]: cannot find struct, variant or union type `v18` in this scope
35-
--> $DIR/unevaluated-const-ice-119731.rs:32:13
35+
--> $DIR/unevaluated-const-ice-119731.rs:33:13
3636
|
3737
LL | pub type v11 = [[usize; v4]; v4];
3838
| --------------------------------- similarly named type alias `v11` defined here
@@ -73,20 +73,29 @@ LL + #![feature(adt_const_params)]
7373
|
7474

7575
error: maximum number of nodes exceeded in constant v20::v17::<v10, v2>::{constant#1}
76-
--> $DIR/unevaluated-const-ice-119731.rs:27:37
76+
--> $DIR/unevaluated-const-ice-119731.rs:28:37
7777
|
7878
LL | impl<const v10: usize> v17<v10, v2> {
7979
| ^^
8080

8181
error: maximum number of nodes exceeded in constant v20::v17::<v10, v2>::{constant#1}
82-
--> $DIR/unevaluated-const-ice-119731.rs:27:37
82+
--> $DIR/unevaluated-const-ice-119731.rs:28:37
8383
|
8484
LL | impl<const v10: usize> v17<v10, v2> {
8585
| ^^
8686
|
8787
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
8888

89-
error: aborting due to 9 previous errors; 2 warnings emitted
89+
error[E0592]: duplicate definitions with name `v21`
90+
--> $DIR/unevaluated-const-ice-119731.rs:23:9
91+
|
92+
LL | pub const fn v21() -> v18 {}
93+
| ^^^^^^^^^^^^^^^^^^^^^^^^^ duplicate definitions for `v21`
94+
...
95+
LL | pub const fn v21() -> v18 {
96+
| ------------------------- other definition for `v21`
97+
98+
error: aborting due to 10 previous errors; 2 warnings emitted
9099

91-
Some errors have detailed explanations: E0412, E0422, E0425, E0432.
100+
Some errors have detailed explanations: E0412, E0422, E0425, E0432, E0592.
92101
For more information about an error, try `rustc --explain E0412`.

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/ui/dyn-star/param-env-region-infer.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@ revisions: current
22
//@ incremental
33

4-
// FIXME(-Znext-solver): THis currently results in unstable query results:
4+
// FIXME(-Znext-solver): This currently results in unstable query results:
55
// `normalizes-to(opaque, opaque)` changes from `Maybe(Ambiguous)` to `Maybe(Overflow)`
66
// once the hidden type of the opaque is already defined to be itself.
77

tests/ui/error-codes/e0119/issue-23563.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0119]: conflicting implementations of trait `LolFrom<&[_]>` for type `LocalType<_>`
1+
error[E0119]: conflicting implementations of trait `LolFrom<&[u8]>` for type `LocalType<u8>`
22
--> $DIR/issue-23563.rs:13:1
33
|
44
LL | impl<'a, T> LolFrom<&'a [T]> for LocalType<T> {

tests/ui/feature-gates/feature-gate-with_negative_coherence.stderr

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ LL | impl<T: std::ops::DerefMut> Foo for T { }
66
LL |
77
LL | impl<T> Foo for &T { }
88
| ^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_`
9+
|
10+
= note: downstream crates may implement trait `std::ops::DerefMut` for type `&_`
911

1012
error: aborting due to 1 previous error
1113

tests/ui/higher-ranked/structually-relate-aliases.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ type Assoc<'a, T> = <T as ToUnit<'a>>::Unit;
1111
impl<T> Overlap<T> for T {}
1212

1313
impl<T> Overlap<for<'a> fn(&'a (), Assoc<'a, T>)> for T {}
14-
//~^ ERROR 13:17: 13:49: the trait bound `for<'a> T: ToUnit<'a>` is not satisfied [E0277]
15-
//~| ERROR 13:36: 13:48: the trait bound `for<'a> T: ToUnit<'a>` is not satisfied [E0277]
14+
//~^ ERROR conflicting implementations of trait `Overlap<for<'a> fn(&'a (), _)>`
1615

1716
fn main() {}

0 commit comments

Comments
 (0)