Skip to content

Commit f33379b

Browse files
committed
Auto merge of #110811 - compiler-errors:vars-are-question-mark, r=WaffleLapkin
Use `?0` notation for ty/ct/int/float/region vars Aligns the notation for infer vars that T-types and friends most often uses for inference variables with the notation in the compiler (which is kinda a sigil nightmare IMO: `_#`) by adopting `?0` style infer vars. This mostly affects debug output since verbose infer vars shouldn't show up in user-facing places. Does this need an MCP? It's debug output, so I'm thinking no, but happy to open one. 🤔 r? types
2 parents 458d4da + bb99cdc commit f33379b

File tree

46 files changed

+307
-307
lines changed

Some content is hidden

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

46 files changed

+307
-307
lines changed

compiler/rustc_middle/src/ty/structural_impls.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ impl<'tcx> fmt::Debug for ty::FnSig<'tcx> {
9595

9696
impl<'tcx> fmt::Debug for ty::ConstVid<'tcx> {
9797
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
98-
write!(f, "_#{}c", self.index)
98+
write!(f, "?{}c", self.index)
9999
}
100100
}
101101

compiler/rustc_middle/src/ty/sty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1436,7 +1436,7 @@ pub struct ConstVid<'tcx> {
14361436
rustc_index::newtype_index! {
14371437
/// A **region** (lifetime) **v**ariable **ID**.
14381438
#[derive(HashStable)]
1439-
#[debug_format = "'_#{}r"]
1439+
#[debug_format = "'?{}"]
14401440
pub struct RegionVid {}
14411441
}
14421442

compiler/rustc_type_ir/src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ pub struct FloatVarValue(pub FloatTy);
537537

538538
rustc_index::newtype_index! {
539539
/// A **ty**pe **v**ariable **ID**.
540-
#[debug_format = "_#{}t"]
540+
#[debug_format = "?{}t"]
541541
pub struct TyVid {}
542542
}
543543

@@ -739,13 +739,13 @@ impl fmt::Debug for FloatVarValue {
739739

740740
impl fmt::Debug for IntVid {
741741
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
742-
write!(f, "_#{}i", self.index)
742+
write!(f, "?{}i", self.index)
743743
}
744744
}
745745

746746
impl fmt::Debug for FloatVid {
747747
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
748-
write!(f, "_#{}f", self.index)
748+
write!(f, "?{}f", self.index)
749749
}
750750
}
751751

tests/mir-opt/nll/named_lifetimes_basic.use_x.nll.0.mir

+28-28
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
// MIR for `use_x` 0 nll
22

33
| Free Region Mapping
4-
| '_#0r | Global | ['_#2r, '_#1r, '_#0r, '_#4r, '_#3r]
5-
| '_#1r | Local | ['_#1r, '_#4r]
6-
| '_#2r | Local | ['_#2r, '_#1r, '_#4r]
7-
| '_#3r | Local | ['_#4r, '_#3r]
8-
| '_#4r | Local | ['_#4r]
4+
| '?0 | Global | ['?2, '?1, '?0, '?4, '?3]
5+
| '?1 | Local | ['?1, '?4]
6+
| '?2 | Local | ['?2, '?1, '?4]
7+
| '?3 | Local | ['?4, '?3]
8+
| '?4 | Local | ['?4]
99
|
1010
| Inferred Region Values
11-
| '_#0r | U0 | {bb0[0..=1], '_#0r, '_#1r, '_#2r, '_#3r, '_#4r}
12-
| '_#1r | U0 | {bb0[0..=1], '_#1r}
13-
| '_#2r | U0 | {bb0[0..=1], '_#2r}
14-
| '_#3r | U0 | {bb0[0..=1], '_#3r}
15-
| '_#4r | U0 | {bb0[0..=1], '_#4r}
16-
| '_#5r | U0 | {bb0[0..=1], '_#1r}
17-
| '_#6r | U0 | {bb0[0..=1], '_#2r}
18-
| '_#7r | U0 | {bb0[0..=1], '_#1r}
19-
| '_#8r | U0 | {bb0[0..=1], '_#3r}
11+
| '?0 | U0 | {bb0[0..=1], '?0, '?1, '?2, '?3, '?4}
12+
| '?1 | U0 | {bb0[0..=1], '?1}
13+
| '?2 | U0 | {bb0[0..=1], '?2}
14+
| '?3 | U0 | {bb0[0..=1], '?3}
15+
| '?4 | U0 | {bb0[0..=1], '?4}
16+
| '?5 | U0 | {bb0[0..=1], '?1}
17+
| '?6 | U0 | {bb0[0..=1], '?2}
18+
| '?7 | U0 | {bb0[0..=1], '?1}
19+
| '?8 | U0 | {bb0[0..=1], '?3}
2020
|
2121
| Inference Constraints
22-
| '_#0r live at {bb0[0..=1]}
23-
| '_#1r live at {bb0[0..=1]}
24-
| '_#2r live at {bb0[0..=1]}
25-
| '_#3r live at {bb0[0..=1]}
26-
| '_#4r live at {bb0[0..=1]}
27-
| '_#1r: '_#5r due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:26: 12:27) ($DIR/named_lifetimes_basic.rs:12:26: 12:27 (#0)
28-
| '_#1r: '_#7r due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:54: 12:55) ($DIR/named_lifetimes_basic.rs:12:54: 12:55 (#0)
29-
| '_#2r: '_#6r due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:42: 12:43) ($DIR/named_lifetimes_basic.rs:12:42: 12:43 (#0)
30-
| '_#3r: '_#8r due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:66: 12:67) ($DIR/named_lifetimes_basic.rs:12:66: 12:67 (#0)
31-
| '_#5r: '_#1r due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:26: 12:27) ($DIR/named_lifetimes_basic.rs:12:26: 12:27 (#0)
32-
| '_#6r: '_#2r due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:42: 12:43) ($DIR/named_lifetimes_basic.rs:12:42: 12:43 (#0)
33-
| '_#7r: '_#1r due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:54: 12:55) ($DIR/named_lifetimes_basic.rs:12:54: 12:55 (#0)
34-
| '_#8r: '_#3r due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:66: 12:67) ($DIR/named_lifetimes_basic.rs:12:66: 12:67 (#0)
22+
| '?0 live at {bb0[0..=1]}
23+
| '?1 live at {bb0[0..=1]}
24+
| '?2 live at {bb0[0..=1]}
25+
| '?3 live at {bb0[0..=1]}
26+
| '?4 live at {bb0[0..=1]}
27+
| '?1: '?5 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:26: 12:27) ($DIR/named_lifetimes_basic.rs:12:26: 12:27 (#0)
28+
| '?1: '?7 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:54: 12:55) ($DIR/named_lifetimes_basic.rs:12:54: 12:55 (#0)
29+
| '?2: '?6 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:42: 12:43) ($DIR/named_lifetimes_basic.rs:12:42: 12:43 (#0)
30+
| '?3: '?8 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:66: 12:67) ($DIR/named_lifetimes_basic.rs:12:66: 12:67 (#0)
31+
| '?5: '?1 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:26: 12:27) ($DIR/named_lifetimes_basic.rs:12:26: 12:27 (#0)
32+
| '?6: '?2 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:42: 12:43) ($DIR/named_lifetimes_basic.rs:12:42: 12:43 (#0)
33+
| '?7: '?1 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:54: 12:55) ($DIR/named_lifetimes_basic.rs:12:54: 12:55 (#0)
34+
| '?8: '?3 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:66: 12:67) ($DIR/named_lifetimes_basic.rs:12:66: 12:67 (#0)
3535
|
36-
fn use_x(_1: &'_#5r mut i32, _2: &'_#6r u32, _3: &'_#7r u32, _4: &'_#8r u32) -> bool {
36+
fn use_x(_1: &'?5 mut i32, _2: &'?6 u32, _3: &'?7 u32, _4: &'?8 u32) -> bool {
3737
debug w => _1; // in scope 0 at $DIR/named_lifetimes_basic.rs:+0:26: +0:27
3838
debug x => _2; // in scope 0 at $DIR/named_lifetimes_basic.rs:+0:42: +0:43
3939
debug y => _3; // in scope 0 at $DIR/named_lifetimes_basic.rs:+0:54: +0:55

tests/mir-opt/nll/region_subtyping_basic.main.nll.0.32bit.mir

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
// MIR for `main` 0 nll
22

33
| Free Region Mapping
4-
| '_#0r | Global | ['_#0r, '_#1r]
5-
| '_#1r | Local | ['_#1r]
4+
| '?0 | Global | ['?0, '?1]
5+
| '?1 | Local | ['?1]
66
|
77
| Inferred Region Values
8-
| '_#0r | U0 | {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=3], bb4[0..=1], bb5[0..=2], bb6[0..=5], bb7[0], '_#0r, '_#1r}
9-
| '_#1r | U0 | {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=3], bb4[0..=1], bb5[0..=2], bb6[0..=5], bb7[0], '_#1r}
10-
| '_#2r | U0 | {bb1[0..=7], bb2[0..=2]}
11-
| '_#3r | U0 | {bb1[1..=7], bb2[0..=2]}
12-
| '_#4r | U0 | {bb1[4..=7], bb2[0..=2]}
8+
| '?0 | U0 | {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=3], bb4[0..=1], bb5[0..=2], bb6[0..=5], bb7[0], '?0, '?1}
9+
| '?1 | U0 | {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=3], bb4[0..=1], bb5[0..=2], bb6[0..=5], bb7[0], '?1}
10+
| '?2 | U0 | {bb1[0..=7], bb2[0..=2]}
11+
| '?3 | U0 | {bb1[1..=7], bb2[0..=2]}
12+
| '?4 | U0 | {bb1[4..=7], bb2[0..=2]}
1313
|
1414
| Inference Constraints
15-
| '_#0r live at {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=3], bb4[0..=1], bb5[0..=2], bb6[0..=5], bb7[0]}
16-
| '_#1r live at {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=3], bb4[0..=1], bb5[0..=2], bb6[0..=5], bb7[0]}
17-
| '_#2r live at {bb1[0]}
18-
| '_#3r live at {bb1[1..=3]}
19-
| '_#4r live at {bb1[4..=7], bb2[0..=2]}
20-
| '_#2r: '_#3r due to Assignment at Single(bb1[0]) ($DIR/region_subtyping_basic.rs:18:13: 18:18 (#0)
21-
| '_#3r: '_#4r due to Assignment at Single(bb1[3]) ($DIR/region_subtyping_basic.rs:19:13: 19:14 (#0)
15+
| '?0 live at {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=3], bb4[0..=1], bb5[0..=2], bb6[0..=5], bb7[0]}
16+
| '?1 live at {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=3], bb4[0..=1], bb5[0..=2], bb6[0..=5], bb7[0]}
17+
| '?2 live at {bb1[0]}
18+
| '?3 live at {bb1[1..=3]}
19+
| '?4 live at {bb1[4..=7], bb2[0..=2]}
20+
| '?2: '?3 due to Assignment at Single(bb1[0]) ($DIR/region_subtyping_basic.rs:18:13: 18:18 (#0)
21+
| '?3: '?4 due to Assignment at Single(bb1[3]) ($DIR/region_subtyping_basic.rs:19:13: 19:14 (#0)
2222
|
2323
fn main() -> () {
2424
let mut _0: (); // return place in scope 0 at $DIR/region_subtyping_basic.rs:+0:11: +0:11
@@ -32,10 +32,10 @@ fn main() -> () {
3232
let _10: bool; // in scope 0 at $DIR/region_subtyping_basic.rs:+7:9: +7:18
3333
scope 1 {
3434
debug v => _1; // in scope 1 at $DIR/region_subtyping_basic.rs:+1:9: +1:14
35-
let _2: &'_#3r usize; // in scope 1 at $DIR/region_subtyping_basic.rs:+2:9: +2:10
35+
let _2: &'?3 usize; // in scope 1 at $DIR/region_subtyping_basic.rs:+2:9: +2:10
3636
scope 2 {
3737
debug p => _2; // in scope 2 at $DIR/region_subtyping_basic.rs:+2:9: +2:10
38-
let _6: &'_#4r usize; // in scope 2 at $DIR/region_subtyping_basic.rs:+3:9: +3:10
38+
let _6: &'?4 usize; // in scope 2 at $DIR/region_subtyping_basic.rs:+3:9: +3:10
3939
scope 3 {
4040
debug q => _6; // in scope 3 at $DIR/region_subtyping_basic.rs:+3:9: +3:10
4141
}
@@ -55,7 +55,7 @@ fn main() -> () {
5555
}
5656

5757
bb1: {
58-
_2 = &'_#2r _1[_3]; // bb1[0]: scope 1 at $DIR/region_subtyping_basic.rs:+2:13: +2:18
58+
_2 = &'?2 _1[_3]; // bb1[0]: scope 1 at $DIR/region_subtyping_basic.rs:+2:13: +2:18
5959
FakeRead(ForLet(None), _2); // bb1[1]: scope 1 at $DIR/region_subtyping_basic.rs:+2:9: +2:10
6060
StorageLive(_6); // bb1[2]: scope 2 at $DIR/region_subtyping_basic.rs:+3:9: +3:10
6161
_6 = _2; // bb1[3]: scope 2 at $DIR/region_subtyping_basic.rs:+3:13: +3:14

tests/mir-opt/nll/region_subtyping_basic.main.nll.0.64bit.mir

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
// MIR for `main` 0 nll
22

33
| Free Region Mapping
4-
| '_#0r | Global | ['_#0r, '_#1r]
5-
| '_#1r | Local | ['_#1r]
4+
| '?0 | Global | ['?0, '?1]
5+
| '?1 | Local | ['?1]
66
|
77
| Inferred Region Values
8-
| '_#0r | U0 | {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=3], bb4[0..=1], bb5[0..=2], bb6[0..=5], bb7[0], '_#0r, '_#1r}
9-
| '_#1r | U0 | {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=3], bb4[0..=1], bb5[0..=2], bb6[0..=5], bb7[0], '_#1r}
10-
| '_#2r | U0 | {bb1[0..=7], bb2[0..=2]}
11-
| '_#3r | U0 | {bb1[1..=7], bb2[0..=2]}
12-
| '_#4r | U0 | {bb1[4..=7], bb2[0..=2]}
8+
| '?0 | U0 | {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=3], bb4[0..=1], bb5[0..=2], bb6[0..=5], bb7[0], '?0, '?1}
9+
| '?1 | U0 | {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=3], bb4[0..=1], bb5[0..=2], bb6[0..=5], bb7[0], '?1}
10+
| '?2 | U0 | {bb1[0..=7], bb2[0..=2]}
11+
| '?3 | U0 | {bb1[1..=7], bb2[0..=2]}
12+
| '?4 | U0 | {bb1[4..=7], bb2[0..=2]}
1313
|
1414
| Inference Constraints
15-
| '_#0r live at {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=3], bb4[0..=1], bb5[0..=2], bb6[0..=5], bb7[0]}
16-
| '_#1r live at {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=3], bb4[0..=1], bb5[0..=2], bb6[0..=5], bb7[0]}
17-
| '_#2r live at {bb1[0]}
18-
| '_#3r live at {bb1[1..=3]}
19-
| '_#4r live at {bb1[4..=7], bb2[0..=2]}
20-
| '_#2r: '_#3r due to Assignment at Single(bb1[0]) ($DIR/region_subtyping_basic.rs:18:13: 18:18 (#0)
21-
| '_#3r: '_#4r due to Assignment at Single(bb1[3]) ($DIR/region_subtyping_basic.rs:19:13: 19:14 (#0)
15+
| '?0 live at {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=3], bb4[0..=1], bb5[0..=2], bb6[0..=5], bb7[0]}
16+
| '?1 live at {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=3], bb4[0..=1], bb5[0..=2], bb6[0..=5], bb7[0]}
17+
| '?2 live at {bb1[0]}
18+
| '?3 live at {bb1[1..=3]}
19+
| '?4 live at {bb1[4..=7], bb2[0..=2]}
20+
| '?2: '?3 due to Assignment at Single(bb1[0]) ($DIR/region_subtyping_basic.rs:18:13: 18:18 (#0)
21+
| '?3: '?4 due to Assignment at Single(bb1[3]) ($DIR/region_subtyping_basic.rs:19:13: 19:14 (#0)
2222
|
2323
fn main() -> () {
2424
let mut _0: (); // return place in scope 0 at $DIR/region_subtyping_basic.rs:+0:11: +0:11
@@ -32,10 +32,10 @@ fn main() -> () {
3232
let _10: bool; // in scope 0 at $DIR/region_subtyping_basic.rs:+7:9: +7:18
3333
scope 1 {
3434
debug v => _1; // in scope 1 at $DIR/region_subtyping_basic.rs:+1:9: +1:14
35-
let _2: &'_#3r usize; // in scope 1 at $DIR/region_subtyping_basic.rs:+2:9: +2:10
35+
let _2: &'?3 usize; // in scope 1 at $DIR/region_subtyping_basic.rs:+2:9: +2:10
3636
scope 2 {
3737
debug p => _2; // in scope 2 at $DIR/region_subtyping_basic.rs:+2:9: +2:10
38-
let _6: &'_#4r usize; // in scope 2 at $DIR/region_subtyping_basic.rs:+3:9: +3:10
38+
let _6: &'?4 usize; // in scope 2 at $DIR/region_subtyping_basic.rs:+3:9: +3:10
3939
scope 3 {
4040
debug q => _6; // in scope 3 at $DIR/region_subtyping_basic.rs:+3:9: +3:10
4141
}
@@ -55,7 +55,7 @@ fn main() -> () {
5555
}
5656

5757
bb1: {
58-
_2 = &'_#2r _1[_3]; // bb1[0]: scope 1 at $DIR/region_subtyping_basic.rs:+2:13: +2:18
58+
_2 = &'?2 _1[_3]; // bb1[0]: scope 1 at $DIR/region_subtyping_basic.rs:+2:13: +2:18
5959
FakeRead(ForLet(None), _2); // bb1[1]: scope 1 at $DIR/region_subtyping_basic.rs:+2:9: +2:10
6060
StorageLive(_6); // bb1[2]: scope 2 at $DIR/region_subtyping_basic.rs:+3:9: +3:10
6161
_6 = _2; // bb1[3]: scope 2 at $DIR/region_subtyping_basic.rs:+3:13: +3:14

tests/mir-opt/storage_ranges.main.nll.0.mir

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
// MIR for `main` 0 nll
22

33
| Free Region Mapping
4-
| '_#0r | Global | ['_#0r, '_#1r]
5-
| '_#1r | Local | ['_#1r]
4+
| '?0 | Global | ['?0, '?1]
5+
| '?1 | Local | ['?1]
66
|
77
| Inferred Region Values
8-
| '_#0r | U0 | {bb0[0..=22], '_#0r, '_#1r}
9-
| '_#1r | U0 | {bb0[0..=22], '_#1r}
10-
| '_#2r | U0 | {bb0[10..=11]}
11-
| '_#3r | U0 | {bb0[11]}
8+
| '?0 | U0 | {bb0[0..=22], '?0, '?1}
9+
| '?1 | U0 | {bb0[0..=22], '?1}
10+
| '?2 | U0 | {bb0[10..=11]}
11+
| '?3 | U0 | {bb0[11]}
1212
|
1313
| Inference Constraints
14-
| '_#0r live at {bb0[0..=22]}
15-
| '_#1r live at {bb0[0..=22]}
16-
| '_#2r live at {bb0[10]}
17-
| '_#3r live at {bb0[11]}
18-
| '_#2r: '_#3r due to Assignment at Single(bb0[10]) ($DIR/storage_ranges.rs:6:17: 6:25 (#0)
14+
| '?0 live at {bb0[0..=22]}
15+
| '?1 live at {bb0[0..=22]}
16+
| '?2 live at {bb0[10]}
17+
| '?3 live at {bb0[11]}
18+
| '?2: '?3 due to Assignment at Single(bb0[10]) ($DIR/storage_ranges.rs:6:17: 6:25 (#0)
1919
|
2020
fn main() -> () {
2121
let mut _0: (); // return place in scope 0 at $DIR/storage_ranges.rs:+0:11: +0:11

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ LL | <str as Foo<u8>>::bar;
7777
| ^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
7878
|
7979
= help: the trait `Sized` is not implemented for `str`
80-
note: required for `str` to implement `Foo<'_#0r, '_#1r, u8>`
80+
note: required for `str` to implement `Foo<'?0, '?1, u8>`
8181
--> $DIR/substs-ppaux.rs:11:17
8282
|
8383
LL | impl<'a,'b,T,S> Foo<'a, 'b, S> for T {}

tests/ui/closures/binder/nested-closures-regions.stderr

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ LL | for<'a> || -> () { for<'c> |_: &'a ()| -> () {}; };
99
extern "rust-call" fn((&(),)),
1010
(),
1111
]
12-
= note: late-bound region is '_#4r
13-
= note: late-bound region is '_#2r
12+
= note: late-bound region is '?4
13+
= note: late-bound region is '?2
1414
= note: number of external vids: 3
15-
= note: where '_#1r: '_#2r
16-
= note: where '_#2r: '_#1r
15+
= note: where '?1: '?2
16+
= note: where '?2: '?1
1717

1818
note: no external requirements
1919
--> $DIR/nested-closures-regions.rs:8:5
@@ -26,7 +26,7 @@ LL | for<'a> || -> () { for<'c> |_: &'a ()| -> () {}; };
2626
extern "rust-call" fn(()),
2727
(),
2828
]
29-
= note: late-bound region is '_#2r
29+
= note: late-bound region is '?2
3030

3131
note: no external requirements
3232
--> $DIR/nested-closures-regions.rs:7:1

tests/ui/closures/print/closure-print-generic-trim-off-verbose-2.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ LL | let c1 : () = c;
99
| expected due to this
1010
|
1111
= note: expected unit type `()`
12-
found closure `[mod1::f<T>::{closure#0} closure_substs=(unavailable) substs=[T, _#16t, extern "rust-call" fn(()), _#15t]]`
12+
found closure `[mod1::f<T>::{closure#0} closure_substs=(unavailable) substs=[T, ?16t, extern "rust-call" fn(()), ?15t]]`
1313
help: use parentheses to call this closure
1414
|
1515
LL | let c1 : () = c();

tests/ui/closures/print/closure-print-generic-verbose-1.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0382]: use of moved value: `c`
22
--> $DIR/closure-print-generic-verbose-1.rs:17:5
33
|
44
LL | let c = to_fn_once(move|| {
5-
| - move occurs because `c` has type `[f<T>::{closure#0} closure_kind_ty=i32 closure_sig_as_fn_ptr_ty=extern "rust-call" fn(()) upvar_tys=(Foo<&'_#9r str>, T)]`, which does not implement the `Copy` trait
5+
| - move occurs because `c` has type `[f<T>::{closure#0} closure_kind_ty=i32 closure_sig_as_fn_ptr_ty=extern "rust-call" fn(()) upvar_tys=(Foo<&'?9 str>, T)]`, which does not implement the `Copy` trait
66
...
77
LL | c();
88
| --- `c` moved due to this call

tests/ui/closures/print/closure-print-generic-verbose-2.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ LL | let c1 : () = c;
99
| expected due to this
1010
|
1111
= note: expected unit type `()`
12-
found closure `[f<T>::{closure#0} closure_substs=(unavailable) substs=[T, _#16t, extern "rust-call" fn(()), _#15t]]`
12+
found closure `[f<T>::{closure#0} closure_substs=(unavailable) substs=[T, ?16t, extern "rust-call" fn(()), ?15t]]`
1313
help: use parentheses to call this closure
1414
|
1515
LL | let c1 : () = c();

tests/ui/closures/print/closure-print-verbose.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | let foo: fn(u8) -> u8 = |v: u8| { a += v; a };
77
| expected due to this
88
|
99
= note: expected fn pointer `fn(u8) -> u8`
10-
found closure `[main::{closure#0} closure_substs=(unavailable) substs=[i8, extern "rust-call" fn((u8,)) -> u8, _#6t]]`
10+
found closure `[main::{closure#0} closure_substs=(unavailable) substs=[i8, extern "rust-call" fn((u8,)) -> u8, ?6t]]`
1111
note: closures can only be coerced to `fn` types if they do not capture any variables
1212
--> $DIR/closure-print-verbose.rs:10:39
1313
|

tests/ui/const-generics/occurs-check/unused-substs-2.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#![feature(generic_const_exprs)]
22
#![allow(incomplete_features)]
33

4-
// The goal is to get an unevaluated const `ct` with a `Ty::Infer(TyVar(_#1t)` subst.
4+
// The goal is to get an unevaluated const `ct` with a `Ty::Infer(TyVar(?1t)` subst.
55
//
6-
// If we are then able to infer `ty::Infer(TyVar(_#1t) := Ty<ct>` we introduced an
6+
// If we are then able to infer `ty::Infer(TyVar(?1t) := Ty<ct>` we introduced an
77
// artificial inference cycle.
88
struct Foo<const N: usize>;
99

@@ -20,8 +20,8 @@ impl<T> Bind<T> for Foo<{ 6 + 1 }> {
2020

2121
fn main() {
2222
let (mut t, foo) = Foo::bind();
23-
// `t` is `ty::Infer(TyVar(_#1t))`
24-
// `foo` contains `ty::Infer(TyVar(_#1t))` in its substs
23+
// `t` is `ty::Infer(TyVar(?1t))`
24+
// `foo` contains `ty::Infer(TyVar(?1t))` in its substs
2525
t = foo;
2626
//~^ ERROR mismatched types
2727
//~| NOTE cyclic type

tests/ui/const-generics/occurs-check/unused-substs-3.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
#![feature(generic_const_exprs)]
22
#![allow(incomplete_features)]
33

4-
// The goal is to get an unevaluated const `ct` with a `Ty::Infer(TyVar(_#1t)` subst.
4+
// The goal is to get an unevaluated const `ct` with a `Ty::Infer(TyVar(?1t)` subst.
55
//
6-
// If we are then able to infer `ty::Infer(TyVar(_#1t) := Ty<ct>` we introduced an
6+
// If we are then able to infer `ty::Infer(TyVar(?1t) := Ty<ct>` we introduced an
77
// artificial inference cycle.
88
fn bind<T>() -> (T, [u8; 6 + 1]) {
99
todo!()
1010
}
1111

1212
fn main() {
1313
let (mut t, foo) = bind();
14-
// `t` is `ty::Infer(TyVar(_#1t))`
15-
// `foo` contains `ty::Infer(TyVar(_#1t))` in its substs
14+
// `t` is `ty::Infer(TyVar(?1t))`
15+
// `foo` contains `ty::Infer(TyVar(?1t))` in its substs
1616
t = foo;
1717
//~^ ERROR mismatched types
1818
//~| NOTE cyclic type

tests/ui/generator/issue-57084.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// This issue reproduces an ICE on compile (E.g. fails on 2018-12-19 nightly).
2-
// "cannot relate bound region: ReLateBound(DebruijnIndex(1), BrAnon(1)) <= '_#1r"
2+
// "cannot relate bound region: ReLateBound(DebruijnIndex(1), BrAnon(1)) <= '?1"
33
// run-pass
44
// edition:2018
55
#![feature(generators,generator_trait)]

0 commit comments

Comments
 (0)