Skip to content

Commit 1a893ac

Browse files
committed
stabilize -Znext-solver=coherence
1 parent 009e738 commit 1a893ac

File tree

64 files changed

+326
-318
lines changed

Some content is hidden

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

64 files changed

+326
-318
lines changed

compiler/rustc_interface/src/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ fn test_unstable_options_tracking_hash() {
808808
tracked!(mir_opt_level, Some(4));
809809
tracked!(move_size_limit, Some(4096));
810810
tracked!(mutable_noalias, false);
811-
tracked!(next_solver, Some(NextSolverConfig { coherence: true, globally: false }));
811+
tracked!(next_solver, NextSolverConfig { coherence: true, globally: true });
812812
tracked!(no_generate_arange_section, true);
813813
tracked!(no_jump_tables, true);
814814
tracked!(no_link, true);

compiler/rustc_middle/src/ty/context.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3128,11 +3128,11 @@ impl<'tcx> TyCtxt<'tcx> {
31283128
}
31293129

31303130
pub fn next_trait_solver_globally(self) -> bool {
3131-
self.sess.opts.unstable_opts.next_solver.map_or(false, |c| c.globally)
3131+
self.sess.opts.unstable_opts.next_solver.globally
31323132
}
31333133

31343134
pub fn next_trait_solver_in_coherence(self) -> bool {
3135-
self.sess.opts.unstable_opts.next_solver.map_or(false, |c| c.coherence)
3135+
self.sess.opts.unstable_opts.next_solver.coherence
31363136
}
31373137

31383138
pub fn is_impl_trait_in_trait(self, def_id: DefId) -> bool {

compiler/rustc_session/src/config.rs

+5
Original file line numberDiff line numberDiff line change
@@ -842,6 +842,11 @@ pub struct NextSolverConfig {
842842
/// This is only `true` if `coherence` is also enabled.
843843
pub globally: bool,
844844
}
845+
impl Default for NextSolverConfig {
846+
fn default() -> Self {
847+
NextSolverConfig { coherence: true, globally: false }
848+
}
849+
}
845850

846851
#[derive(Clone)]
847852
pub enum Input {

compiler/rustc_session/src/options.rs

+10-21
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ mod desc {
403403
pub(crate) const parse_unpretty: &str = "`string` or `string=string`";
404404
pub(crate) const parse_treat_err_as_bug: &str = "either no value or a non-negative number";
405405
pub(crate) const parse_next_solver_config: &str =
406-
"a comma separated list of solver configurations: `globally` (default), and `coherence`";
406+
"either `globally` (when used without an argument), `coherence` (default) or `no`";
407407
pub(crate) const parse_lto: &str =
408408
"either a boolean (`yes`, `no`, `on`, `off`, etc), `thin`, `fat`, or omitted";
409409
pub(crate) const parse_linker_plugin_lto: &str =
@@ -1105,27 +1105,16 @@ mod parse {
11051105
}
11061106
}
11071107

1108-
pub(crate) fn parse_next_solver_config(
1109-
slot: &mut Option<NextSolverConfig>,
1110-
v: Option<&str>,
1111-
) -> bool {
1108+
pub(crate) fn parse_next_solver_config(slot: &mut NextSolverConfig, v: Option<&str>) -> bool {
11121109
if let Some(config) = v {
1113-
let mut coherence = false;
1114-
let mut globally = true;
1115-
for c in config.split(',') {
1116-
match c {
1117-
"globally" => globally = true,
1118-
"coherence" => {
1119-
globally = false;
1120-
coherence = true;
1121-
}
1122-
_ => return false,
1123-
}
1124-
}
1125-
1126-
*slot = Some(NextSolverConfig { coherence: coherence || globally, globally });
1110+
*slot = match config {
1111+
"no" => NextSolverConfig { coherence: false, globally: false },
1112+
"coherence" => NextSolverConfig { coherence: true, globally: false },
1113+
"globally" => NextSolverConfig { coherence: true, globally: true },
1114+
_ => return false,
1115+
};
11271116
} else {
1128-
*slot = Some(NextSolverConfig { coherence: true, globally: true });
1117+
*slot = NextSolverConfig { coherence: true, globally: true };
11291118
}
11301119

11311120
true
@@ -1878,7 +1867,7 @@ options! {
18781867
"the size at which the `large_assignments` lint starts to be emitted"),
18791868
mutable_noalias: bool = (true, parse_bool, [TRACKED],
18801869
"emit noalias metadata for mutable references (default: yes)"),
1881-
next_solver: Option<NextSolverConfig> = (None, parse_next_solver_config, [TRACKED],
1870+
next_solver: NextSolverConfig = (NextSolverConfig::default(), parse_next_solver_config, [TRACKED],
18821871
"enable and configure the next generation trait solver used by rustc"),
18831872
nll_facts: bool = (false, parse_bool, [UNTRACKED],
18841873
"dump facts from NLL analysis into side files (default: no)"),

compiler/rustc_trait_selection/src/traits/engine.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,8 @@ where
3535
if infcx.next_trait_solver() {
3636
Box::new(NextFulfillmentCtxt::new(infcx))
3737
} else {
38-
let new_solver_globally =
39-
infcx.tcx.sess.opts.unstable_opts.next_solver.map_or(false, |c| c.globally);
4038
assert!(
41-
!new_solver_globally,
39+
!infcx.tcx.next_trait_solver_globally(),
4240
"using old solver even though new solver is enabled globally"
4341
);
4442
Box::new(FulfillmentContext::new(infcx))

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/auto-traits/opaque_type_candidate_selection.rs

-30
This file was deleted.

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/coherence-overlap-unnormalizable-projection-1.classic.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ 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<<std::boxed::Box<_> as WithAssoc<'a>>::Assoc>`
15+
= note: downstream crates may implement trait `WhereBound` for type `std::boxed::Box<_>`
1616

1717
error: aborting due to 1 previous error
1818

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
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
|
10+
= note: upstream crates may add a new impl of trait `std::clone::Clone` for type `(MyType,)` in future versions
1011
= note: upstream crates may add a new impl of trait `std::marker::Copy` for type `std::boxed::Box<(MyType,)>` in future versions
1112

1213
error: aborting due to 1 previous error

tests/ui/coherence/normalize-for-errors.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
//@ revisions: current next
2-
//@ ignore-compare-mode-next-solver (explicit revisions)
3-
//@[next] compile-flags: -Znext-solver
4-
51
struct MyType;
62
trait MyTrait<S> {}
73

@@ -18,6 +14,6 @@ impl<S: Iterator> MyTrait<S> for (Box<<(MyType,) as Mirror>::Assoc>, S::Item) {}
1814
//~^ ERROR conflicting implementations of trait `MyTrait<_>` for type `(Box<(MyType,)>,
1915
//~| NOTE conflicting implementation for `(Box<(MyType,)>,
2016
//~| NOTE upstream crates may add a new impl of trait `std::marker::Copy` for type `std::boxed::Box<(MyType,)>` in future versions
21-
//[next]~| NOTE upstream crates may add a new impl of trait `std::clone::Clone` for type `std::boxed::Box<(MyType,)>` in future versions
17+
//~| NOTE upstream crates may add a new impl of trait `std::clone::Clone` for type `std::boxed::Box<(MyType,)>` in future versions
2218

2319
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
error[E0119]: conflicting implementations of trait `MyTrait<_>` for type `(Box<(MyType,)>, <_ as Iterator>::Item)`
2+
--> $DIR/normalize-for-errors.rs:13:1
3+
|
4+
LL | impl<T: Copy, S: Iterator> MyTrait<S> for (T, S::Item) {}
5+
| ------------------------------------------------------ first implementation here
6+
LL |
7+
LL | impl<S: Iterator> MyTrait<S> for (Box<<(MyType,) as Mirror>::Assoc>, S::Item) {}
8+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(Box<(MyType,)>, <_ as Iterator>::Item)`
9+
|
10+
= note: upstream crates may add a new impl of trait `std::clone::Clone` for type `std::boxed::Box<(MyType,)>` in future versions
11+
= note: upstream crates may add a new impl of trait `std::marker::Copy` for type `std::boxed::Box<(MyType,)>` in future versions
12+
13+
error: aborting due to 1 previous error
14+
15+
For more information about this error, try `rustc --explain E0119`.

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

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,8 +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
5-
62
trait ToUnit<'a> {
73
type Unit;
84
}
@@ -13,7 +9,5 @@ impl<T> ToUnit for T {}
139
trait Overlap {}
1410
impl<U> Overlap for fn(U) {}
1511
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
1812

1913
fn main() {}

0 commit comments

Comments
 (0)