Skip to content

Commit a385e56

Browse files
committedMar 19, 2024·
Auto merge of rust-lang#122392 - BoxyUwU:misc_cleanup, r=lcnr
misc cleanups from debugging something rename `instantiate_canonical_with_fresh_inference_vars` to `instantiate_canonical` the substs for the canonical are not solely infer vars as that would be wildly wrong and it is rather confusing to see this method called and think that the entire canonicalization setup is completely broken when it is not 👍 also update region debug printing to be more like the custom impls for Ty/Const, right now regions in debug output are horribly verbose and make it incredibly hard to read but with this atleast boundvars and placeholders when debugging the new solver do not take up excessive amounts of space. r? `@lcnr`
2 parents 200e3f7 + e34e344 commit a385e56

38 files changed

+205
-173
lines changed
 

‎compiler/rustc_borrowck/src/type_check/canonical.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,15 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
6161
Ok(output)
6262
}
6363

64-
pub(super) fn instantiate_canonical_with_fresh_inference_vars<T>(
64+
pub(super) fn instantiate_canonical<T>(
6565
&mut self,
6666
span: Span,
6767
canonical: &Canonical<'tcx, T>,
6868
) -> T
6969
where
7070
T: TypeFoldable<TyCtxt<'tcx>>,
7171
{
72-
let (instantiated, _) =
73-
self.infcx.instantiate_canonical_with_fresh_inference_vars(span, canonical);
72+
let (instantiated, _) = self.infcx.instantiate_canonical(span, canonical);
7473
instantiated
7574
}
7675

‎compiler/rustc_borrowck/src/type_check/input_output.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
3939
// (e.g., the `_` in the code above) with fresh variables.
4040
// Then replace the bound items in the fn sig with fresh variables,
4141
// so that they represent the view from "inside" the closure.
42-
let user_provided_sig = self
43-
.instantiate_canonical_with_fresh_inference_vars(body.span, &user_provided_poly_sig);
42+
let user_provided_sig = self.instantiate_canonical(body.span, &user_provided_poly_sig);
4443
let mut user_provided_sig = self.infcx.instantiate_binder_with_fresh_vars(
4544
body.span,
4645
BoundRegionConversionTime::FnCall,

‎compiler/rustc_borrowck/src/type_check/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1109,7 +1109,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
11091109
let tcx = self.tcx();
11101110
for user_annotation in self.user_type_annotations {
11111111
let CanonicalUserTypeAnnotation { span, ref user_ty, inferred_ty } = *user_annotation;
1112-
let annotation = self.instantiate_canonical_with_fresh_inference_vars(span, user_ty);
1112+
let annotation = self.instantiate_canonical(span, user_ty);
11131113
if let ty::UserType::TypeOf(def, args) = annotation
11141114
&& let DefKind::InlineConst = tcx.def_kind(def)
11151115
{

‎compiler/rustc_hir_typeck/src/method/probe.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -386,10 +386,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
386386

387387
let infcx = &self.infcx;
388388
let (ParamEnvAnd { param_env: _, value: self_ty }, canonical_inference_vars) =
389-
infcx.instantiate_canonical_with_fresh_inference_vars(
390-
span,
391-
&param_env_and_self_ty,
392-
);
389+
infcx.instantiate_canonical(span, &param_env_and_self_ty);
393390
debug!(
394391
"probe_op: Mode::Path, param_env_and_self_ty={:?} self_ty={:?}",
395392
param_env_and_self_ty, self_ty
@@ -661,13 +658,13 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
661658
// of the iterations in the autoderef loop, so there is no problem with it
662659
// being discoverable in another one of these iterations.
663660
//
664-
// Using `instantiate_canonical_with_fresh_inference_vars` on our
661+
// Using `instantiate_canonical` on our
665662
// `Canonical<QueryResponse<Ty<'tcx>>>` and then *throwing away* the
666663
// `CanonicalVarValues` will exactly give us such a generalization - it
667664
// will still match the original object type, but it won't pollute our
668665
// type variables in any form, so just do that!
669666
let (QueryResponse { value: generalized_self_ty, .. }, _ignored_var_values) =
670-
self.fcx.instantiate_canonical_with_fresh_inference_vars(self.span, self_ty);
667+
self.fcx.instantiate_canonical(self.span, self_ty);
671668

672669
self.assemble_inherent_candidates_from_object(generalized_self_ty);
673670
self.assemble_inherent_impl_candidates_for_type(p.def_id());

‎compiler/rustc_infer/src/infer/canonical/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ mod instantiate;
3838
pub mod query_response;
3939

4040
impl<'tcx> InferCtxt<'tcx> {
41-
/// Creates an instantiation S for the canonical value with fresh
42-
/// inference variables and applies it to the canonical value.
41+
/// Creates an instantiation S for the canonical value with fresh inference
42+
/// variables and placeholders then applies it to the canonical value.
4343
/// Returns both the instantiated result *and* the instantiation S.
4444
///
4545
/// This can be invoked as part of constructing an
@@ -50,7 +50,7 @@ impl<'tcx> InferCtxt<'tcx> {
5050
/// At the end of processing, the instantiation S (once
5151
/// canonicalized) then represents the values that you computed
5252
/// for each of the canonical inputs to your query.
53-
pub fn instantiate_canonical_with_fresh_inference_vars<T>(
53+
pub fn instantiate_canonical<T>(
5454
&self,
5555
span: Span,
5656
canonical: &Canonical<'tcx, T>,

‎compiler/rustc_infer/src/infer/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ impl<'tcx> InferCtxtBuilder<'tcx> {
678678
T: TypeFoldable<TyCtxt<'tcx>>,
679679
{
680680
let infcx = self.build();
681-
let (value, args) = infcx.instantiate_canonical_with_fresh_inference_vars(span, canonical);
681+
let (value, args) = infcx.instantiate_canonical(span, canonical);
682682
(infcx, value, args)
683683
}
684684

‎compiler/rustc_middle/src/ty/region.rs

+16-2
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,9 @@ pub struct EarlyParamRegion {
336336

337337
impl std::fmt::Debug for EarlyParamRegion {
338338
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
339-
write!(f, "{:?}, {}, {}", self.def_id, self.index, self.name)
339+
// FIXME(BoxyUwU): self.def_id goes first because of `erased-regions-in-hidden-ty.rs` being impossible to write
340+
// error annotations for otherwise. :). Ideally this would be `self.name, self.index, self.def_id`.
341+
write!(f, "{:?}_{}/#{}", self.def_id, self.name, self.index)
340342
}
341343
}
342344

@@ -381,13 +383,25 @@ pub enum BoundRegionKind {
381383
BrEnv,
382384
}
383385

384-
#[derive(Copy, Clone, PartialEq, Eq, Hash, TyEncodable, TyDecodable, Debug, PartialOrd, Ord)]
386+
#[derive(Copy, Clone, PartialEq, Eq, Hash, TyEncodable, TyDecodable, PartialOrd, Ord)]
385387
#[derive(HashStable)]
386388
pub struct BoundRegion {
387389
pub var: BoundVar,
388390
pub kind: BoundRegionKind,
389391
}
390392

393+
impl core::fmt::Debug for BoundRegion {
394+
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
395+
match self.kind {
396+
BoundRegionKind::BrAnon => write!(f, "{:?}", self.var),
397+
BoundRegionKind::BrEnv => write!(f, "{:?}.Env", self.var),
398+
BoundRegionKind::BrNamed(def, symbol) => {
399+
write!(f, "{:?}.Named({:?}, {:?})", self.var, def, symbol)
400+
}
401+
}
402+
}
403+
}
404+
391405
impl BoundRegionKind {
392406
pub fn is_named(&self) -> bool {
393407
match *self {

‎compiler/rustc_type_ir/src/region_kind.rs

+10-6
Original file line numberDiff line numberDiff line change
@@ -223,23 +223,27 @@ impl<I: Interner> DebugWithInfcx<I> for RegionKind<I> {
223223
f: &mut core::fmt::Formatter<'_>,
224224
) -> core::fmt::Result {
225225
match this.data {
226-
ReEarlyParam(data) => write!(f, "ReEarlyParam({data:?})"),
226+
ReEarlyParam(data) => write!(f, "{data:?}"),
227227

228228
ReBound(binder_id, bound_region) => {
229-
write!(f, "ReBound({binder_id:?}, {bound_region:?})")
229+
write!(f, "'")?;
230+
crate::debug_bound_var(f, *binder_id, bound_region)
230231
}
231232

232233
ReLateParam(fr) => write!(f, "{fr:?}"),
233234

234-
ReStatic => f.write_str("ReStatic"),
235+
ReStatic => f.write_str("'static"),
235236

236237
ReVar(vid) => write!(f, "{:?}", &this.wrap(vid)),
237238

238-
RePlaceholder(placeholder) => write!(f, "RePlaceholder({placeholder:?})"),
239+
RePlaceholder(placeholder) => write!(f, "{placeholder:?}"),
239240

240-
ReErased => f.write_str("ReErased"),
241+
// Use `'{erased}` as the output instead of `'erased` so that its more obviously distinct from
242+
// a `ReEarlyParam` named `'erased`. Technically that would print as `'erased/#IDX` so this is
243+
// not strictly necessary but *shrug*
244+
ReErased => f.write_str("'{erased}"),
241245

242-
ReError(_) => f.write_str("ReError"),
246+
ReError(_) => f.write_str("'{region error}"),
243247
}
244248
}
245249
}

‎tests/mir-opt/issue_99325.main.built.after.32bit.mir

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
| User Type Annotations
44
| 0: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[d56d]::function_with_bytes), UserArgs { args: [&*b"AAAA"], user_self_ty: None }), max_universe: U0, variables: [] }, span: $DIR/issue_99325.rs:13:16: 13:46, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
5-
| 1: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[d56d]::function_with_bytes), UserArgs { args: [UnevaluatedConst { def: DefId(0:8 ~ issue_99325[d56d]::main::{constant#1}), args: [] }: &ReStatic [u8; 4_usize]], user_self_ty: None }), max_universe: U0, variables: [] }, span: $DIR/issue_99325.rs:14:16: 14:68, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
5+
| 1: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[d56d]::function_with_bytes), UserArgs { args: [UnevaluatedConst { def: DefId(0:8 ~ issue_99325[d56d]::main::{constant#1}), args: [] }: &'static [u8; 4_usize]], user_self_ty: None }), max_universe: U0, variables: [] }, span: $DIR/issue_99325.rs:14:16: 14:68, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
66
|
77
fn main() -> () {
88
let mut _0: ();

‎tests/mir-opt/issue_99325.main.built.after.64bit.mir

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
| User Type Annotations
44
| 0: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[d56d]::function_with_bytes), UserArgs { args: [&*b"AAAA"], user_self_ty: None }), max_universe: U0, variables: [] }, span: $DIR/issue_99325.rs:13:16: 13:46, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
5-
| 1: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[d56d]::function_with_bytes), UserArgs { args: [UnevaluatedConst { def: DefId(0:8 ~ issue_99325[d56d]::main::{constant#1}), args: [] }: &ReStatic [u8; 4_usize]], user_self_ty: None }), max_universe: U0, variables: [] }, span: $DIR/issue_99325.rs:14:16: 14:68, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
5+
| 1: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[d56d]::function_with_bytes), UserArgs { args: [UnevaluatedConst { def: DefId(0:8 ~ issue_99325[d56d]::main::{constant#1}), args: [] }: &'static [u8; 4_usize]], user_self_ty: None }), max_universe: U0, variables: [] }, span: $DIR/issue_99325.rs:14:16: 14:68, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
66
|
77
fn main() -> () {
88
let mut _0: ();

‎tests/ui/associated-types/substs-ppaux.normal.stderr

+42-36
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,73 @@
11
error[E0308]: mismatched types
2-
--> $DIR/substs-ppaux.rs:16:17
2+
--> $DIR/substs-ppaux.rs:23:17
33
|
4-
LL | fn bar<'a, T>() where T: 'a {}
5-
| --------------------------- associated function `bar` defined here
4+
LL | / fn bar<'a, T>()
5+
LL | | where
6+
LL | | T: 'a,
7+
| |______________- associated function `bar` defined here
68
...
7-
LL | let x: () = <i8 as Foo<'static, 'static, u8>>::bar::<'static, char>;
8-
| -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found fn item
9-
| |
10-
| expected due to this
9+
LL | let x: () = <i8 as Foo<'static, 'static, u8>>::bar::<'static, char>;
10+
| -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found fn item
11+
| |
12+
| expected due to this
1113
|
1214
= note: expected unit type `()`
1315
found fn item `fn() {<i8 as Foo<'static, 'static, u8>>::bar::<'static, char>}`
1416
help: use parentheses to call this associated function
1517
|
16-
LL | let x: () = <i8 as Foo<'static, 'static, u8>>::bar::<'static, char>();
17-
| ++
18+
LL | let x: () = <i8 as Foo<'static, 'static, u8>>::bar::<'static, char>();
19+
| ++
1820

1921
error[E0308]: mismatched types
20-
--> $DIR/substs-ppaux.rs:25:17
22+
--> $DIR/substs-ppaux.rs:31:17
2123
|
22-
LL | fn bar<'a, T>() where T: 'a {}
23-
| --------------------------- associated function `bar` defined here
24+
LL | / fn bar<'a, T>()
25+
LL | | where
26+
LL | | T: 'a,
27+
| |______________- associated function `bar` defined here
2428
...
25-
LL | let x: () = <i8 as Foo<'static, 'static, u32>>::bar::<'static, char>;
26-
| -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found fn item
27-
| |
28-
| expected due to this
29+
LL | let x: () = <i8 as Foo<'static, 'static, u32>>::bar::<'static, char>;
30+
| -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found fn item
31+
| |
32+
| expected due to this
2933
|
3034
= note: expected unit type `()`
3135
found fn item `fn() {<i8 as Foo<'static, 'static>>::bar::<'static, char>}`
3236
help: use parentheses to call this associated function
3337
|
34-
LL | let x: () = <i8 as Foo<'static, 'static, u32>>::bar::<'static, char>();
35-
| ++
38+
LL | let x: () = <i8 as Foo<'static, 'static, u32>>::bar::<'static, char>();
39+
| ++
3640

3741
error[E0308]: mismatched types
38-
--> $DIR/substs-ppaux.rs:33:17
42+
--> $DIR/substs-ppaux.rs:39:17
3943
|
4044
LL | fn baz() {}
4145
| -------- associated function `baz` defined here
4246
...
43-
LL | let x: () = <i8 as Foo<'static, 'static, u8>>::baz;
44-
| -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found fn item
47+
LL | let x: () = <i8 as Foo<'static, 'static, u8>>::baz;
48+
| -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found fn item
4549
| |
4650
| expected due to this
4751
|
4852
= note: expected unit type `()`
4953
found fn item `fn() {<i8 as Foo<'static, 'static, u8>>::baz}`
5054
help: use parentheses to call this associated function
5155
|
52-
LL | let x: () = <i8 as Foo<'static, 'static, u8>>::baz();
53-
| ++
56+
LL | let x: () = <i8 as Foo<'static, 'static, u8>>::baz();
57+
| ++
5458

5559
error[E0308]: mismatched types
56-
--> $DIR/substs-ppaux.rs:41:17
60+
--> $DIR/substs-ppaux.rs:47:17
5761
|
58-
LL | fn foo<'z>() where &'z (): Sized {
59-
| -------------------------------- function `foo` defined here
62+
LL | / fn foo<'z>()
63+
LL | | where
64+
LL | | &'z (): Sized,
65+
| |__________________- function `foo` defined here
6066
...
61-
LL | let x: () = foo::<'static>;
62-
| -- ^^^^^^^^^^^^^^ expected `()`, found fn item
63-
| |
64-
| expected due to this
67+
LL | let x: () = foo::<'static>;
68+
| -- ^^^^^^^^^^^^^^ expected `()`, found fn item
69+
| |
70+
| expected due to this
6571
|
6672
= note: expected unit type `()`
6773
found fn item `fn() {foo::<'static>}`
@@ -71,18 +77,18 @@ LL | let x: () = foo::<'static>();
7177
| ++
7278

7379
error[E0277]: the trait bound `str: Foo<'_, '_, u8>` is not satisfied
74-
--> $DIR/substs-ppaux.rs:49:6
80+
--> $DIR/substs-ppaux.rs:55:6
7581
|
7682
LL | <str as Foo<u8>>::bar;
7783
| ^^^ the trait `Sized` is not implemented for `str`, which is required by `str: Foo<'_, '_, u8>`
7884
|
7985
note: required for `str` to implement `Foo<'_, '_, u8>`
80-
--> $DIR/substs-ppaux.rs:11:17
86+
--> $DIR/substs-ppaux.rs:15:20
8187
|
82-
LL | impl<'a,'b,T,S> Foo<'a, 'b, S> for T {}
83-
| - ^^^^^^^^^^^^^^ ^
84-
| |
85-
| unsatisfied trait bound introduced here
88+
LL | impl<'a, 'b, T, S> Foo<'a, 'b, S> for T {}
89+
| - ^^^^^^^^^^^^^^ ^
90+
| |
91+
| unsatisfied trait bound introduced here
8692

8793
error: aborting due to 5 previous errors
8894

‎tests/ui/associated-types/substs-ppaux.rs

+18-12
Original file line numberDiff line numberDiff line change
@@ -3,45 +3,51 @@
33
//
44
//@[verbose] compile-flags: -Z verbose-internals
55

6-
trait Foo<'b, 'c, S=u32> {
7-
fn bar<'a, T>() where T: 'a {}
6+
trait Foo<'b, 'c, S = u32> {
7+
fn bar<'a, T>()
8+
where
9+
T: 'a,
10+
{
11+
}
812
fn baz() {}
913
}
1014

11-
impl<'a,'b,T,S> Foo<'a, 'b, S> for T {}
15+
impl<'a, 'b, T, S> Foo<'a, 'b, S> for T {}
1216

1317
fn main() {}
1418

15-
fn foo<'z>() where &'z (): Sized {
16-
let x: () = <i8 as Foo<'static, 'static, u8>>::bar::<'static, char>;
19+
fn foo<'z>()
20+
where
21+
&'z (): Sized,
22+
{
23+
let x: () = <i8 as Foo<'static, 'static, u8>>::bar::<'static, char>;
1724
//[verbose]~^ ERROR mismatched types
1825
//[verbose]~| expected unit type `()`
19-
//[verbose]~| found fn item `fn() {<i8 as Foo<ReStatic, ReStatic, u8>>::bar::<ReStatic, char>}`
26+
//[verbose]~| found fn item `fn() {<i8 as Foo<'static, 'static, u8>>::bar::<'static, char>}`
2027
//[normal]~^^^^ ERROR mismatched types
2128
//[normal]~| expected unit type `()`
2229
//[normal]~| found fn item `fn() {<i8 as Foo<'static, 'static, u8>>::bar::<'static, char>}`
2330

24-
25-
let x: () = <i8 as Foo<'static, 'static, u32>>::bar::<'static, char>;
31+
let x: () = <i8 as Foo<'static, 'static, u32>>::bar::<'static, char>;
2632
//[verbose]~^ ERROR mismatched types
2733
//[verbose]~| expected unit type `()`
28-
//[verbose]~| found fn item `fn() {<i8 as Foo<ReStatic, ReStatic>>::bar::<ReStatic, char>}`
34+
//[verbose]~| found fn item `fn() {<i8 as Foo<'static, 'static>>::bar::<'static, char>}`
2935
//[normal]~^^^^ ERROR mismatched types
3036
//[normal]~| expected unit type `()`
3137
//[normal]~| found fn item `fn() {<i8 as Foo<'static, 'static>>::bar::<'static, char>}`
3238

33-
let x: () = <i8 as Foo<'static, 'static, u8>>::baz;
39+
let x: () = <i8 as Foo<'static, 'static, u8>>::baz;
3440
//[verbose]~^ ERROR mismatched types
3541
//[verbose]~| expected unit type `()`
36-
//[verbose]~| found fn item `fn() {<i8 as Foo<ReStatic, ReStatic, u8>>::baz}`
42+
//[verbose]~| found fn item `fn() {<i8 as Foo<'static, 'static, u8>>::baz}`
3743
//[normal]~^^^^ ERROR mismatched types
3844
//[normal]~| expected unit type `()`
3945
//[normal]~| found fn item `fn() {<i8 as Foo<'static, 'static, u8>>::baz}`
4046

4147
let x: () = foo::<'static>;
4248
//[verbose]~^ ERROR mismatched types
4349
//[verbose]~| expected unit type `()`
44-
//[verbose]~| found fn item `fn() {foo::<ReStatic>}`
50+
//[verbose]~| found fn item `fn() {foo::<'static>}`
4551
//[normal]~^^^^ ERROR mismatched types
4652
//[normal]~| expected unit type `()`
4753
//[normal]~| found fn item `fn() {foo::<'static>}`

‎tests/ui/associated-types/substs-ppaux.verbose.stderr

+46-40
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,94 @@
11
error[E0308]: mismatched types
2-
--> $DIR/substs-ppaux.rs:16:17
2+
--> $DIR/substs-ppaux.rs:23:17
33
|
4-
LL | fn bar<'a, T>() where T: 'a {}
5-
| --------------------------- associated function `bar` defined here
4+
LL | / fn bar<'a, T>()
5+
LL | | where
6+
LL | | T: 'a,
7+
| |______________- associated function `bar` defined here
68
...
7-
LL | let x: () = <i8 as Foo<'static, 'static, u8>>::bar::<'static, char>;
8-
| -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found fn item
9-
| |
10-
| expected due to this
9+
LL | let x: () = <i8 as Foo<'static, 'static, u8>>::bar::<'static, char>;
10+
| -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found fn item
11+
| |
12+
| expected due to this
1113
|
1214
= note: expected unit type `()`
13-
found fn item `fn() {<i8 as Foo<ReStatic, ReStatic, u8>>::bar::<ReStatic, char>}`
15+
found fn item `fn() {<i8 as Foo<'static, 'static, u8>>::bar::<'static, char>}`
1416
help: use parentheses to call this associated function
1517
|
16-
LL | let x: () = <i8 as Foo<'static, 'static, u8>>::bar::<'static, char>();
17-
| ++
18+
LL | let x: () = <i8 as Foo<'static, 'static, u8>>::bar::<'static, char>();
19+
| ++
1820

1921
error[E0308]: mismatched types
20-
--> $DIR/substs-ppaux.rs:25:17
22+
--> $DIR/substs-ppaux.rs:31:17
2123
|
22-
LL | fn bar<'a, T>() where T: 'a {}
23-
| --------------------------- associated function `bar` defined here
24+
LL | / fn bar<'a, T>()
25+
LL | | where
26+
LL | | T: 'a,
27+
| |______________- associated function `bar` defined here
2428
...
25-
LL | let x: () = <i8 as Foo<'static, 'static, u32>>::bar::<'static, char>;
26-
| -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found fn item
27-
| |
28-
| expected due to this
29+
LL | let x: () = <i8 as Foo<'static, 'static, u32>>::bar::<'static, char>;
30+
| -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found fn item
31+
| |
32+
| expected due to this
2933
|
3034
= note: expected unit type `()`
31-
found fn item `fn() {<i8 as Foo<ReStatic, ReStatic>>::bar::<ReStatic, char>}`
35+
found fn item `fn() {<i8 as Foo<'static, 'static>>::bar::<'static, char>}`
3236
help: use parentheses to call this associated function
3337
|
34-
LL | let x: () = <i8 as Foo<'static, 'static, u32>>::bar::<'static, char>();
35-
| ++
38+
LL | let x: () = <i8 as Foo<'static, 'static, u32>>::bar::<'static, char>();
39+
| ++
3640

3741
error[E0308]: mismatched types
38-
--> $DIR/substs-ppaux.rs:33:17
42+
--> $DIR/substs-ppaux.rs:39:17
3943
|
4044
LL | fn baz() {}
4145
| -------- associated function `baz` defined here
4246
...
43-
LL | let x: () = <i8 as Foo<'static, 'static, u8>>::baz;
44-
| -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found fn item
47+
LL | let x: () = <i8 as Foo<'static, 'static, u8>>::baz;
48+
| -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found fn item
4549
| |
4650
| expected due to this
4751
|
4852
= note: expected unit type `()`
49-
found fn item `fn() {<i8 as Foo<ReStatic, ReStatic, u8>>::baz}`
53+
found fn item `fn() {<i8 as Foo<'static, 'static, u8>>::baz}`
5054
help: use parentheses to call this associated function
5155
|
52-
LL | let x: () = <i8 as Foo<'static, 'static, u8>>::baz();
53-
| ++
56+
LL | let x: () = <i8 as Foo<'static, 'static, u8>>::baz();
57+
| ++
5458

5559
error[E0308]: mismatched types
56-
--> $DIR/substs-ppaux.rs:41:17
60+
--> $DIR/substs-ppaux.rs:47:17
5761
|
58-
LL | fn foo<'z>() where &'z (): Sized {
59-
| -------------------------------- function `foo` defined here
62+
LL | / fn foo<'z>()
63+
LL | | where
64+
LL | | &'z (): Sized,
65+
| |__________________- function `foo` defined here
6066
...
61-
LL | let x: () = foo::<'static>;
62-
| -- ^^^^^^^^^^^^^^ expected `()`, found fn item
63-
| |
64-
| expected due to this
67+
LL | let x: () = foo::<'static>;
68+
| -- ^^^^^^^^^^^^^^ expected `()`, found fn item
69+
| |
70+
| expected due to this
6571
|
6672
= note: expected unit type `()`
67-
found fn item `fn() {foo::<ReStatic>}`
73+
found fn item `fn() {foo::<'static>}`
6874
help: use parentheses to call this function
6975
|
7076
LL | let x: () = foo::<'static>();
7177
| ++
7278

7379
error[E0277]: the trait bound `str: Foo<'?0, '?1, u8>` is not satisfied
74-
--> $DIR/substs-ppaux.rs:49:6
80+
--> $DIR/substs-ppaux.rs:55:6
7581
|
7682
LL | <str as Foo<u8>>::bar;
7783
| ^^^ the trait `Sized` is not implemented for `str`, which is required by `str: Foo<'?0, '?1, u8>`
7884
|
7985
note: required for `str` to implement `Foo<'?0, '?1, u8>`
80-
--> $DIR/substs-ppaux.rs:11:17
86+
--> $DIR/substs-ppaux.rs:15:20
8187
|
82-
LL | impl<'a,'b,T,S> Foo<'a, 'b, S> for T {}
83-
| - ^^^^^^^^^^^^^^ ^
84-
| |
85-
| unsatisfied trait bound introduced here
88+
LL | impl<'a, 'b, T, S> Foo<'a, 'b, S> for T {}
89+
| - ^^^^^^^^^^^^^^ ^
90+
| |
91+
| unsatisfied trait bound introduced here
8692

8793
error: aborting due to 5 previous errors
8894

‎tests/ui/coherence/occurs-check/associated-type.next.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(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, ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) }
3-
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(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, ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) }
1+
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, '^0.Named(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), "'a")], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) }
3+
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, '^0.Named(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), "'a")], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) }
55
error[E0119]: conflicting implementations of trait `Overlap<for<'a> fn(&'a (), ())>` for type `for<'a> fn(&'a (), ())`
66
--> $DIR/associated-type.rs:31:1
77
|

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

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(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, RePlaceholder(!2_BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) }
3-
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(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, RePlaceholder(!2_BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) }
5-
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(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, RePlaceholder(!2_BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) }
7-
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [*const ?1t, ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(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, RePlaceholder(!2_BoundRegion { var: 0, kind: BrNamed(DefId(0:27 ~ associated_type[f554]::{impl#3}::'a#1), 'a) })], def_id: DefId(0:5 ~ associated_type[f554]::ToUnit::Unit) }
1+
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) }
3+
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) }
5+
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) }
7+
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) }
99
error[E0119]: conflicting implementations of trait `Overlap<for<'a> fn(&'a (), _)>` for type `for<'a> fn(&'a (), _)`
1010
--> $DIR/associated-type.rs:31:1
1111
|

‎tests/ui/impl-trait/erased-regions-in-hidden-ty.current.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
error: {foo<ReEarlyParam(DefId(..), 0, 'a)>::{closure#0} closure_kind_ty=i8 closure_sig_as_fn_ptr_ty=extern "rust-call" fn(()) upvar_tys=()}
1+
error: {foo<DefId(..)_'a/#0>::{closure#0} closure_kind_ty=i8 closure_sig_as_fn_ptr_ty=extern "rust-call" fn(()) upvar_tys=()}
22
--> $DIR/erased-regions-in-hidden-ty.rs:12:36
33
|
44
LL | fn foo<'a: 'a>(x: &'a Vec<i32>) -> impl Fn() + 'static {
55
| ^^^^^^^^^^^^^^^^^^^
66

7-
error: Opaque(DefId(..), [ReErased])
7+
error: Opaque(DefId(..), ['{erased}])
88
--> $DIR/erased-regions-in-hidden-ty.rs:18:13
99
|
1010
LL | fn bar() -> impl Fn() + 'static {

‎tests/ui/impl-trait/erased-regions-in-hidden-ty.next.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
error: {foo<ReEarlyParam(DefId(..), 0, 'a)>::{closure#0} closure_kind_ty=i8 closure_sig_as_fn_ptr_ty=extern "rust-call" fn(()) upvar_tys=()}
1+
error: {foo<DefId(..)_'a/#0>::{closure#0} closure_kind_ty=i8 closure_sig_as_fn_ptr_ty=extern "rust-call" fn(()) upvar_tys=()}
22
--> $DIR/erased-regions-in-hidden-ty.rs:12:36
33
|
44
LL | fn foo<'a: 'a>(x: &'a Vec<i32>) -> impl Fn() + 'static {
55
| ^^^^^^^^^^^^^^^^^^^
66

7-
error: Opaque(DefId(..), [ReErased])
7+
error: Opaque(DefId(..), ['{erased}])
88
--> $DIR/erased-regions-in-hidden-ty.rs:18:13
99
|
1010
LL | fn bar() -> impl Fn() + 'static {

‎tests/ui/impl-trait/erased-regions-in-hidden-ty.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
// Make sure that the compiler can handle `ReErased` in the hidden type of an opaque.
1111

1212
fn foo<'a: 'a>(x: &'a Vec<i32>) -> impl Fn() + 'static {
13-
//~^ ERROR 0, 'a)>::{closure#0} closure_kind_ty=i8 closure_sig_as_fn_ptr_ty=extern "rust-call" fn(()) upvar_tys=()}
14-
// Can't write whole type because of lack of path sanitization
13+
//~^ ERROR 'a/#0>::{closure#0} closure_kind_ty=i8 closure_sig_as_fn_ptr_ty=extern "rust-call" fn(()) upvar_tys=()}
14+
// Can't write whole type because of lack of path sanitization
1515
|| ()
1616
}
1717

1818
fn bar() -> impl Fn() + 'static {
19-
//~^ ERROR , [ReErased])
20-
// Can't write whole type because of lack of path sanitization
19+
//~^ ERROR , ['{erased}])
20+
// Can't write whole type because of lack of path sanitization
2121
foo(&vec![])
2222
}
2323

‎tests/ui/nll/closure-requirements/escape-argument-callee.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | let mut closure = expect_sig(|p, y| *p = y);
66
|
77
= note: defining type: test::{closure#0} with closure args [
88
i16,
9-
for<Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) mut &ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) i32, &ReBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrAnon }) i32)),
9+
for<Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&'^0 mut &'^1 i32, &'^2 i32)),
1010
(),
1111
]
1212

‎tests/ui/nll/closure-requirements/escape-argument.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | let mut closure = expect_sig(|p, y| *p = y);
66
|
77
= note: defining type: test::{closure#0} with closure args [
88
i16,
9-
for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) mut &ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) i32, &ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) i32)),
9+
for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&'^0 mut &'^1 i32, &'^1 i32)),
1010
(),
1111
]
1212

‎tests/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | |_outlives1, _outlives2, _outlives3, x, y| {
66
|
77
= note: defining type: supply::{closure#0} with closure args [
88
i16,
9-
for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((std::cell::Cell<&'?1 &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&'?2 &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) &'?3 u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>)),
9+
for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((std::cell::Cell<&'?1 &'^0 u32>, std::cell::Cell<&'?2 &'^0 u32>, std::cell::Cell<&'^1 &'?3 u32>, std::cell::Cell<&'^0 u32>, std::cell::Cell<&'^1 u32>)),
1010
(),
1111
]
1212
= note: late-bound region is '?4

‎tests/ui/nll/closure-requirements/propagate-approximated-ref.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y
66
|
77
= note: defining type: supply::{closure#0} with closure args [
88
i16,
9-
for<Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) std::cell::Cell<&'?1 &ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) &'?2 u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 5, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) u32>)),
9+
for<Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&'^0 std::cell::Cell<&'?1 &'^1 u32>, &'^2 std::cell::Cell<&'^3 &'?2 u32>, &'^4 std::cell::Cell<&'^1 u32>, &'^5 std::cell::Cell<&'^3 u32>)),
1010
(),
1111
]
1212
= note: late-bound region is '?3

‎tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | foo(cell, |cell_a, cell_x| {
66
|
77
= note: defining type: case1::{closure#0} with closure args [
88
i32,
9-
for<Region(BrAnon)> extern "rust-call" fn((std::cell::Cell<&'?1 u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>)),
9+
for<Region(BrAnon)> extern "rust-call" fn((std::cell::Cell<&'?1 u32>, std::cell::Cell<&'^0 u32>)),
1010
(),
1111
]
1212

@@ -36,7 +36,7 @@ LL | foo(cell, |cell_a, cell_x| {
3636
|
3737
= note: defining type: case2::{closure#0} with closure args [
3838
i32,
39-
for<Region(BrAnon)> extern "rust-call" fn((std::cell::Cell<&'?1 u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>)),
39+
for<Region(BrAnon)> extern "rust-call" fn((std::cell::Cell<&'?1 u32>, std::cell::Cell<&'^0 u32>)),
4040
(),
4141
]
4242
= note: number of external vids: 2

‎tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
66
|
77
= note: defining type: supply::{closure#0} with closure args [
88
i16,
9-
for<Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) std::cell::Cell<&'?1 &ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrAnon }) u32>)),
9+
for<Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&'^0 std::cell::Cell<&'?1 &'^1 u32>, &'^2 std::cell::Cell<&'^1 u32>, &'^3 std::cell::Cell<&'^4 u32>)),
1010
(),
1111
]
1212
= note: late-bound region is '?2

‎tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y
66
|
77
= note: defining type: supply::{closure#0} with closure args [
88
i16,
9-
for<Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) std::cell::Cell<&'?1 &ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrAnon }) std::cell::Cell<&'?2 &ReBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 5, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) u32>)),
9+
for<Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&'^0 std::cell::Cell<&'?1 &'^1 u32>, &'^2 std::cell::Cell<&'?2 &'^3 u32>, &'^4 std::cell::Cell<&'^1 u32>, &'^5 std::cell::Cell<&'^3 u32>)),
1010
(),
1111
]
1212
= note: late-bound region is '?3

‎tests/ui/nll/closure-requirements/propagate-approximated-val.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| {
66
|
77
= note: defining type: test::{closure#0} with closure args [
88
i16,
9-
for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((std::cell::Cell<&'?1 &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) &'?2 u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>)),
9+
for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((std::cell::Cell<&'?1 &'^0 u32>, std::cell::Cell<&'^1 &'?2 u32>, std::cell::Cell<&'^0 u32>, std::cell::Cell<&'^1 u32>)),
1010
(),
1111
]
1212
= note: late-bound region is '?3

‎tests/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | |_outlives1, _outlives2, x, y| {
66
|
77
= note: defining type: supply::{closure#0} with closure args [
88
i16,
9-
for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((std::cell::Cell<&'?1 &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) &'?2 u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) u32>, std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>)),
9+
for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((std::cell::Cell<&'?1 &'^0 u32>, std::cell::Cell<&'^1 &'?2 u32>, std::cell::Cell<&'^0 u32>, std::cell::Cell<&'^1 u32>)),
1010
(),
1111
]
1212
= note: late-bound region is '?3

‎tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
66
|
77
= note: defining type: supply::{closure#0} with closure args [
88
i16,
9-
for<Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) &'?1 u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>)),
9+
for<Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&'^0 std::cell::Cell<&'^1 &'?1 u32>, &'^2 std::cell::Cell<&'^3 u32>, &'^4 std::cell::Cell<&'^1 u32>)),
1010
(),
1111
]
1212
= note: late-bound region is '?2

‎tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y
66
|
77
= note: defining type: supply::{closure#0} with closure args [
88
i16,
9-
for<Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) &'?1 u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) &'?2 u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 4, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) u32>, &ReBound(DebruijnIndex(0), BoundRegion { var: 5, kind: BrAnon }) std::cell::Cell<&ReBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrAnon }) u32>)),
9+
for<Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&'^0 std::cell::Cell<&'^1 &'?1 u32>, &'^2 std::cell::Cell<&'^3 &'?2 u32>, &'^4 std::cell::Cell<&'^1 u32>, &'^5 std::cell::Cell<&'^3 u32>)),
1010
(),
1111
]
1212
= note: late-bound region is '?3

‎tests/ui/nll/closure-requirements/return-wrong-bound-region.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | expect_sig(|a, b| b); // ought to return `a`
66
|
77
= note: defining type: test::{closure#0} with closure args [
88
i16,
9-
for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) i32, &ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) i32)) -> &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) i32,
9+
for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((&'^0 i32, &'^1 i32)) -> &'^0 i32,
1010
(),
1111
]
1212

‎tests/ui/nll/ty-outlives/impl-trait-captures.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0700]: hidden type for `Opaque(DefId(0:13 ~ impl_trait_captures[aeb9]::foo::{opaque#0}), [ReEarlyParam(DefId(0:9 ~ impl_trait_captures[aeb9]::foo::'a), 0, 'a), T, ReEarlyParam(DefId(0:9 ~ impl_trait_captures[aeb9]::foo::'a), 0, 'a)])` captures lifetime that does not appear in bounds
1+
error[E0700]: hidden type for `Opaque(DefId(0:13 ~ impl_trait_captures[aeb9]::foo::{opaque#0}), [DefId(0:9 ~ impl_trait_captures[aeb9]::foo::'a)_'a/#0, T, DefId(0:9 ~ impl_trait_captures[aeb9]::foo::'a)_'a/#0])` captures lifetime that does not appear in bounds
22
--> $DIR/impl-trait-captures.rs:11:5
33
|
44
LL | fn foo<'a, T>(x: &T) -> impl Foo<'a> {
@@ -8,7 +8,7 @@ LL | fn foo<'a, T>(x: &T) -> impl Foo<'a> {
88
LL | x
99
| ^
1010
|
11-
help: to declare that `Opaque(DefId(0:13 ~ impl_trait_captures[aeb9]::foo::{opaque#0}), [ReEarlyParam(DefId(0:9 ~ impl_trait_captures[aeb9]::foo::'a), 0, 'a), T, ReEarlyParam(DefId(0:14 ~ impl_trait_captures[aeb9]::foo::{opaque#0}::'a), 2, 'a)])` captures `ReLateParam(DefId(0:8 ~ impl_trait_captures[aeb9]::foo), BrNamed(DefId(0:12 ~ impl_trait_captures[aeb9]::foo::'_), '_))`, you can add an explicit `ReLateParam(DefId(0:8 ~ impl_trait_captures[aeb9]::foo), BrNamed(DefId(0:12 ~ impl_trait_captures[aeb9]::foo::'_), '_))` lifetime bound
11+
help: to declare that `Opaque(DefId(0:13 ~ impl_trait_captures[aeb9]::foo::{opaque#0}), [DefId(0:9 ~ impl_trait_captures[aeb9]::foo::'a)_'a/#0, T, DefId(0:14 ~ impl_trait_captures[aeb9]::foo::{opaque#0}::'a)_'a/#2])` captures `ReLateParam(DefId(0:8 ~ impl_trait_captures[aeb9]::foo), BrNamed(DefId(0:12 ~ impl_trait_captures[aeb9]::foo::'_), '_))`, you can add an explicit `ReLateParam(DefId(0:8 ~ impl_trait_captures[aeb9]::foo), BrNamed(DefId(0:12 ~ impl_trait_captures[aeb9]::foo::'_), '_))` lifetime bound
1212
|
1313
LL | fn foo<'a, T>(x: &T) -> impl Foo<'a> + ReLateParam(DefId(0:8 ~ impl_trait_captures[aeb9]::foo), BrNamed(DefId(0:12 ~ impl_trait_captures[aeb9]::foo::'_), '_)) {
1414
| +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

‎tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | twice(cell, value, |a, b| invoke(a, b));
66
|
77
= note: defining type: generic::<T>::{closure#0} with closure args [
88
i16,
9-
for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'?1 &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) ()>>, &ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) T)),
9+
for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'?1 &'^0 ()>>, &'^1 T)),
1010
(),
1111
]
1212
= note: number of external vids: 2
@@ -28,7 +28,7 @@ LL | twice(cell, value, |a, b| invoke(a, b));
2828
|
2929
= note: defining type: generic_fail::<T>::{closure#0} with closure args [
3030
i16,
31-
for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'?1 &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon }) ()>>, &ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrAnon }) T)),
31+
for<Region(BrAnon), Region(BrAnon)> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'?1 &'^0 ()>>, &'^1 T)),
3232
(),
3333
]
3434
= note: late-bound region is '?2

‎tests/ui/nll/user-annotations/dump-adt-brace-struct.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
#![allow(warnings)]
77
#![feature(rustc_attrs)]
88

9-
struct SomeStruct<T> { t: T }
9+
struct SomeStruct<T> {
10+
t: T,
11+
}
1012

1113
#[rustc_dump_user_args]
1214
fn main() {
@@ -16,5 +18,5 @@ fn main() {
1618

1719
SomeStruct::<u32> { t: 22 }; // No lifetime bounds given.
1820

19-
SomeStruct::<&'static u32> { t: &22 }; //~ ERROR [&ReStatic u32]
21+
SomeStruct::<&'static u32> { t: &22 }; //~ ERROR [&'static u32]
2022
}

‎tests/ui/nll/user-annotations/dump-adt-brace-struct.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
error: user args: UserArgs { args: [&ReStatic u32], user_self_ty: None }
2-
--> $DIR/dump-adt-brace-struct.rs:19:5
1+
error: user args: UserArgs { args: [&'static u32], user_self_ty: None }
2+
--> $DIR/dump-adt-brace-struct.rs:21:5
33
|
44
LL | SomeStruct::<&'static u32> { t: &22 };
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

‎tests/ui/nll/user-annotations/dump-fn-method.rs

+5-6
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@
77

88
// Note: we reference the names T and U in the comments below.
99
trait Bazoom<T> {
10-
fn method<U>(&self, arg: T, arg2: U) { }
10+
fn method<U>(&self, arg: T, arg2: U) {}
1111
}
1212

13-
impl<S, T> Bazoom<T> for S {
14-
}
13+
impl<S, T> Bazoom<T> for S {}
1514

16-
fn foo<'a, T>(_: T) { }
15+
fn foo<'a, T>(_: T) {}
1716

1817
#[rustc_dump_user_args]
1918
fn main() {
@@ -26,7 +25,7 @@ fn main() {
2625
let x = foo::<u32>;
2726
x(22);
2827

29-
let x = foo::<&'static u32>; //~ ERROR [&ReStatic u32]
28+
let x = foo::<&'static u32>; //~ ERROR [&'static u32]
3029
x(&22);
3130

3231
// Here: we only want the `T` to be given, the rest should be variables.
@@ -41,7 +40,7 @@ fn main() {
4140
x(&22, 44, 66);
4241

4342
// Here: all are given and we have a lifetime.
44-
let x = <u8 as Bazoom<&'static u16>>::method::<u32>; //~ ERROR [u8, &ReStatic u16, u32]
43+
let x = <u8 as Bazoom<&'static u16>>::method::<u32>; //~ ERROR [u8, &'static u16, u32]
4544
x(&22, &44, 66);
4645

4746
// Here: we want in particular that *only* the method `U`

‎tests/ui/nll/user-annotations/dump-fn-method.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
error: user args: UserArgs { args: [&ReStatic u32], user_self_ty: None }
2-
--> $DIR/dump-fn-method.rs:29:13
1+
error: user args: UserArgs { args: [&'static u32], user_self_ty: None }
2+
--> $DIR/dump-fn-method.rs:28:13
33
|
44
LL | let x = foo::<&'static u32>;
55
| ^^^^^^^^^^^^^^^^^^^
66

77
error: user args: UserArgs { args: [^0, u32, ^1], user_self_ty: None }
8-
--> $DIR/dump-fn-method.rs:35:13
8+
--> $DIR/dump-fn-method.rs:34:13
99
|
1010
LL | let x = <_ as Bazoom<u32>>::method::<_>;
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1212

13-
error: user args: UserArgs { args: [u8, &ReStatic u16, u32], user_self_ty: None }
14-
--> $DIR/dump-fn-method.rs:44:13
13+
error: user args: UserArgs { args: [u8, &'static u16, u32], user_self_ty: None }
14+
--> $DIR/dump-fn-method.rs:43:13
1515
|
1616
LL | let x = <u8 as Bazoom<&'static u16>>::method::<u32>;
1717
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1818

1919
error: user args: UserArgs { args: [^0, ^1, u32], user_self_ty: None }
20-
--> $DIR/dump-fn-method.rs:52:5
20+
--> $DIR/dump-fn-method.rs:51:5
2121
|
2222
LL | y.method::<u32>(44, 66);
2323
| ^^^^^^^^^^^^^^^^^^^^^^^

‎tests/ui/traits/next-solver/issue-118950-root-region.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ error: the type `<*const T as ToUnit<'a>>::Unit` is not well-formed
1919
LL | type Assoc<'a, T> = <*const T as ToUnit<'a>>::Unit;
2020
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2121

22-
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:15 ~ issue_118950_root_region[d54f]::{impl#1}::'a), 'a) }), ?1t], def_id: DefId(0:8 ~ issue_118950_root_region[d54f]::Assoc) }
23-
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:15 ~ issue_118950_root_region[d54f]::{impl#1}::'a), 'a) }), ?1t], def_id: DefId(0:8 ~ issue_118950_root_region[d54f]::Assoc) }
24-
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:15 ~ issue_118950_root_region[d54f]::{impl#1}::'a), 'a) }), ?1t], def_id: DefId(0:8 ~ issue_118950_root_region[d54f]::Assoc) }
25-
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:15 ~ issue_118950_root_region[d54f]::{impl#1}::'a), 'a) }), ?1t], def_id: DefId(0:8 ~ issue_118950_root_region[d54f]::Assoc) }
22+
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: ['^0.Named(DefId(0:15 ~ issue_118950_root_region[d54f]::{impl#1}::'a), "'a"), ?1t], def_id: DefId(0:8 ~ issue_118950_root_region[d54f]::Assoc) }
23+
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: ['^0.Named(DefId(0:15 ~ issue_118950_root_region[d54f]::{impl#1}::'a), "'a"), ?1t], def_id: DefId(0:8 ~ issue_118950_root_region[d54f]::Assoc) }
24+
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: ['^0.Named(DefId(0:15 ~ issue_118950_root_region[d54f]::{impl#1}::'a), "'a"), ?1t], def_id: DefId(0:8 ~ issue_118950_root_region[d54f]::Assoc) }
25+
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: ['^0.Named(DefId(0:15 ~ issue_118950_root_region[d54f]::{impl#1}::'a), "'a"), ?1t], def_id: DefId(0:8 ~ issue_118950_root_region[d54f]::Assoc) }
2626
error[E0119]: conflicting implementations of trait `Overlap<fn(_)>` for type `fn(_)`
2727
--> $DIR/issue-118950-root-region.rs:19:1
2828
|

‎tests/ui/where-clauses/higher-ranked-fn-type.verbose.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error[E0277]: the trait bound `for<Region(BrNamed(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), 'b))> fn(&ReBound(DebruijnIndex(1), BoundRegion { var: 0, kind: BrNamed(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), 'b) }) ()): Foo` is not satisfied
1+
error[E0277]: the trait bound `for<Region(BrNamed(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), 'b))> fn(&'^1_0.Named(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), "'b") ()): Foo` is not satisfied
22
--> $DIR/higher-ranked-fn-type.rs:20:5
33
|
44
LL | called()
5-
| ^^^^^^^^ the trait `for<Region(BrNamed(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), 'b))> Foo` is not implemented for `fn(&ReBound(DebruijnIndex(1), BoundRegion { var: 0, kind: BrNamed(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), 'b) }) ())`
5+
| ^^^^^^^^ the trait `for<Region(BrNamed(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), 'b))> Foo` is not implemented for `fn(&'^1_0.Named(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), "'b") ())`
66
|
77
help: this trait has no implementations, consider adding one
88
--> $DIR/higher-ranked-fn-type.rs:6:1

0 commit comments

Comments
 (0)
Please sign in to comment.