Skip to content

Commit 786fc90

Browse files
Tweak debug outputs to make debugging new solver easier
1 parent 7c96e40 commit 786fc90

12 files changed

+76
-52
lines changed

compiler/rustc_middle/src/infer/canonical.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ use std::ops::Index;
3535
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, TyDecodable, TyEncodable)]
3636
#[derive(HashStable, TypeFoldable, TypeVisitable, Lift)]
3737
pub struct Canonical<'tcx, V> {
38+
pub value: V,
3839
pub max_universe: ty::UniverseIndex,
3940
pub variables: CanonicalVarInfos<'tcx>,
40-
pub value: V,
4141
}
4242

4343
pub type CanonicalVarInfos<'tcx> = &'tcx List<CanonicalVarInfo<'tcx>>;

compiler/rustc_middle/src/traits/solve.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ pub type EvaluationCache<'tcx> = Cache<CanonicalGoal<'tcx>, QueryResult<'tcx>>;
2020
/// we're currently typechecking while the `predicate` is some trait bound.
2121
#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash, TypeFoldable, TypeVisitable)]
2222
pub struct Goal<'tcx, P> {
23-
pub param_env: ty::ParamEnv<'tcx>,
2423
pub predicate: P,
24+
pub param_env: ty::ParamEnv<'tcx>,
2525
}
2626

2727
impl<'tcx, P> Goal<'tcx, P> {
@@ -41,10 +41,10 @@ impl<'tcx, P> Goal<'tcx, P> {
4141

4242
#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash, TypeFoldable, TypeVisitable)]
4343
pub struct Response<'tcx> {
44+
pub certainty: Certainty,
4445
pub var_values: CanonicalVarValues<'tcx>,
4546
/// Additional constraints returned by this query.
4647
pub external_constraints: ExternalConstraints<'tcx>,
47-
pub certainty: Certainty,
4848
}
4949

5050
#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash, TypeFoldable, TypeVisitable)]

compiler/rustc_trait_selection/src/solve/assembly.rs

+7
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
270270
/// To deal with this, we first try to normalize the self type and add the candidates for the normalized
271271
/// self type to the list of candidates in case that succeeds. We also have to consider candidates with the
272272
/// projection as a self type as well
273+
#[instrument(level = "debug", skip_all)]
273274
fn assemble_candidates_after_normalizing_self_ty<G: GoalKind<'tcx>>(
274275
&mut self,
275276
goal: Goal<'tcx, G>,
@@ -315,6 +316,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
315316
}
316317
}
317318

319+
#[instrument(level = "debug", skip_all)]
318320
fn assemble_impl_candidates<G: GoalKind<'tcx>>(
319321
&mut self,
320322
goal: Goal<'tcx, G>,
@@ -333,6 +335,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
333335
);
334336
}
335337

338+
#[instrument(level = "debug", skip_all)]
336339
fn assemble_builtin_impl_candidates<G: GoalKind<'tcx>>(
337340
&mut self,
338341
goal: Goal<'tcx, G>,
@@ -390,6 +393,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
390393
}
391394
}
392395

396+
#[instrument(level = "debug", skip_all)]
393397
fn assemble_param_env_candidates<G: GoalKind<'tcx>>(
394398
&mut self,
395399
goal: Goal<'tcx, G>,
@@ -405,6 +409,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
405409
}
406410
}
407411

412+
#[instrument(level = "debug", skip_all)]
408413
fn assemble_alias_bound_candidates<G: GoalKind<'tcx>>(
409414
&mut self,
410415
goal: Goal<'tcx, G>,
@@ -452,6 +457,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
452457
}
453458
}
454459

460+
#[instrument(level = "debug", skip_all)]
455461
fn assemble_object_bound_candidates<G: GoalKind<'tcx>>(
456462
&mut self,
457463
goal: Goal<'tcx, G>,
@@ -514,6 +520,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
514520
}
515521
}
516522

523+
#[instrument(level = "debug", skip_all)]
517524
fn assemble_coherence_unknowable_candidates<G: GoalKind<'tcx>>(
518525
&mut self,
519526
goal: Goal<'tcx, G>,

compiler/rustc_trait_selection/src/solve/eval_ctxt.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ pub trait InferCtxtEvalExt<'tcx> {
106106
}
107107

108108
impl<'tcx> InferCtxtEvalExt<'tcx> for InferCtxt<'tcx> {
109-
#[instrument(level = "debug", skip(self))]
109+
#[instrument(level = "debug", skip(self), ret)]
110110
fn evaluate_root_goal(
111111
&self,
112112
goal: Goal<'tcx, ty::Predicate<'tcx>>,
@@ -552,7 +552,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
552552
///
553553
/// If possible, try using `eq` instead which automatically handles nested
554554
/// goals correctly.
555-
#[instrument(level = "debug", skip(self, param_env), ret)]
555+
#[instrument(level = "trace", skip(self, param_env), ret)]
556556
pub(super) fn eq_and_get_goals<T: ToTrace<'tcx>>(
557557
&self,
558558
param_env: ty::ParamEnv<'tcx>,

compiler/rustc_trait_selection/src/solve/mod.rs

+21-5
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,22 @@ impl<'a, 'tcx> EvalCtxt<'a, 'tcx> {
153153
) -> QueryResult<'tcx> {
154154
let tcx = self.tcx();
155155
// We may need to invert the alias relation direction if dealing an alias on the RHS.
156+
#[derive(Debug)]
156157
enum Invert {
157158
No,
158159
Yes,
159160
}
160161
let evaluate_normalizes_to =
161162
|ecx: &mut EvalCtxt<'_, 'tcx>, alias, other, direction, invert| {
162-
debug!("evaluate_normalizes_to(alias={:?}, other={:?})", alias, other);
163+
let span = tracing::span!(
164+
tracing::Level::DEBUG,
165+
"compute_alias_relate_goal(evaluate_normalizes_to)",
166+
?alias,
167+
?other,
168+
?direction,
169+
?invert
170+
);
171+
let _enter = span.enter();
163172
let result = ecx.probe(|ecx| {
164173
let other = match direction {
165174
// This is purely an optimization.
@@ -184,7 +193,7 @@ impl<'a, 'tcx> EvalCtxt<'a, 'tcx> {
184193
));
185194
ecx.evaluate_added_goals_and_make_canonical_response(Certainty::Yes)
186195
});
187-
debug!("evaluate_normalizes_to({alias}, {other}, {direction:?}) -> {result:?}");
196+
debug!(?result);
188197
result
189198
};
190199

@@ -210,7 +219,7 @@ impl<'a, 'tcx> EvalCtxt<'a, 'tcx> {
210219
}
211220

212221
(Some(alias_lhs), Some(alias_rhs)) => {
213-
debug!("compute_alias_relate_goal: both sides are aliases");
222+
debug!("both sides are aliases");
214223

215224
let candidates = vec![
216225
// LHS normalizes-to RHS
@@ -219,9 +228,14 @@ impl<'a, 'tcx> EvalCtxt<'a, 'tcx> {
219228
evaluate_normalizes_to(self, alias_rhs, lhs, direction, Invert::Yes),
220229
// Relate via substs
221230
self.probe(|ecx| {
222-
debug!(
223-
"compute_alias_relate_goal: alias defids are equal, equating substs"
231+
let span = tracing::span!(
232+
tracing::Level::DEBUG,
233+
"compute_alias_relate_goal(relate_via_substs)",
234+
?alias_lhs,
235+
?alias_rhs,
236+
?direction
224237
);
238+
let _enter = span.enter();
225239

226240
match direction {
227241
ty::AliasRelationDirection::Equate => {
@@ -275,6 +289,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
275289
debug!("added_goals={:?}", &self.nested_goals.goals[current_len..]);
276290
}
277291

292+
#[instrument(level = "debug", skip(self, responses))]
278293
fn try_merge_responses(
279294
&mut self,
280295
responses: impl Iterator<Item = QueryResult<'tcx>>,
@@ -304,6 +319,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
304319
});
305320
// FIXME(-Ztrait-solver=next): We should take the intersection of the constraints on all the
306321
// responses and use that for the constraints of this ambiguous response.
322+
debug!(">1 response, bailing with {certainty:?}");
307323
let response = self.evaluate_added_goals_and_make_canonical_response(certainty);
308324
if let Ok(response) = &response {
309325
assert!(response.has_no_inference_or_external_constraints());

compiler/rustc_trait_selection/src/solve/search_graph/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ impl<'tcx> SearchGraph<'tcx> {
209209
) -> QueryResult<'tcx> {
210210
if self.should_use_global_cache() {
211211
if let Some(result) = tcx.new_solver_evaluation_cache.get(&canonical_goal, tcx) {
212+
debug!(?canonical_goal, ?result, "cache hit");
212213
return result;
213214
}
214215
}

tests/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir

+30-30
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
// MIR for `address_of_reborrow` after SimplifyCfg-initial
22

33
| User Type Annotations
4-
| 0: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], value: Ty(*const ^0) }, span: $DIR/address_of.rs:7:5: 7:18, inferred_ty: *const [i32; 10]
5-
| 1: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], value: Ty(*const dyn std::marker::Send) }, span: $DIR/address_of.rs:9:5: 9:25, inferred_ty: *const dyn std::marker::Send
6-
| 2: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], value: Ty(*const ^0) }, span: $DIR/address_of.rs:13:12: 13:20, inferred_ty: *const [i32; 10]
7-
| 3: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], value: Ty(*const ^0) }, span: $DIR/address_of.rs:13:12: 13:20, inferred_ty: *const [i32; 10]
8-
| 4: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*const [i32; 10]) }, span: $DIR/address_of.rs:14:12: 14:28, inferred_ty: *const [i32; 10]
9-
| 5: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*const [i32; 10]) }, span: $DIR/address_of.rs:14:12: 14:28, inferred_ty: *const [i32; 10]
10-
| 6: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], value: Ty(*const dyn std::marker::Send) }, span: $DIR/address_of.rs:15:12: 15:27, inferred_ty: *const dyn std::marker::Send
11-
| 7: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], value: Ty(*const dyn std::marker::Send) }, span: $DIR/address_of.rs:15:12: 15:27, inferred_ty: *const dyn std::marker::Send
12-
| 8: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*const [i32]) }, span: $DIR/address_of.rs:16:12: 16:24, inferred_ty: *const [i32]
13-
| 9: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*const [i32]) }, span: $DIR/address_of.rs:16:12: 16:24, inferred_ty: *const [i32]
14-
| 10: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], value: Ty(*const ^0) }, span: $DIR/address_of.rs:18:5: 18:18, inferred_ty: *const [i32; 10]
15-
| 11: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], value: Ty(*const dyn std::marker::Send) }, span: $DIR/address_of.rs:20:5: 20:25, inferred_ty: *const dyn std::marker::Send
16-
| 12: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], value: Ty(*const ^0) }, span: $DIR/address_of.rs:23:12: 23:20, inferred_ty: *const [i32; 10]
17-
| 13: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], value: Ty(*const ^0) }, span: $DIR/address_of.rs:23:12: 23:20, inferred_ty: *const [i32; 10]
18-
| 14: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*const [i32; 10]) }, span: $DIR/address_of.rs:24:12: 24:28, inferred_ty: *const [i32; 10]
19-
| 15: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*const [i32; 10]) }, span: $DIR/address_of.rs:24:12: 24:28, inferred_ty: *const [i32; 10]
20-
| 16: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], value: Ty(*const dyn std::marker::Send) }, span: $DIR/address_of.rs:25:12: 25:27, inferred_ty: *const dyn std::marker::Send
21-
| 17: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], value: Ty(*const dyn std::marker::Send) }, span: $DIR/address_of.rs:25:12: 25:27, inferred_ty: *const dyn std::marker::Send
22-
| 18: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*const [i32]) }, span: $DIR/address_of.rs:26:12: 26:24, inferred_ty: *const [i32]
23-
| 19: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*const [i32]) }, span: $DIR/address_of.rs:26:12: 26:24, inferred_ty: *const [i32]
24-
| 20: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], value: Ty(*mut ^0) }, span: $DIR/address_of.rs:28:5: 28:16, inferred_ty: *mut [i32; 10]
25-
| 21: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], value: Ty(*mut dyn std::marker::Send) }, span: $DIR/address_of.rs:30:5: 30:23, inferred_ty: *mut dyn std::marker::Send
26-
| 22: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], value: Ty(*mut ^0) }, span: $DIR/address_of.rs:33:12: 33:18, inferred_ty: *mut [i32; 10]
27-
| 23: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], value: Ty(*mut ^0) }, span: $DIR/address_of.rs:33:12: 33:18, inferred_ty: *mut [i32; 10]
28-
| 24: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*mut [i32; 10]) }, span: $DIR/address_of.rs:34:12: 34:26, inferred_ty: *mut [i32; 10]
29-
| 25: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*mut [i32; 10]) }, span: $DIR/address_of.rs:34:12: 34:26, inferred_ty: *mut [i32; 10]
30-
| 26: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], value: Ty(*mut dyn std::marker::Send) }, span: $DIR/address_of.rs:35:12: 35:25, inferred_ty: *mut dyn std::marker::Send
31-
| 27: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], value: Ty(*mut dyn std::marker::Send) }, span: $DIR/address_of.rs:35:12: 35:25, inferred_ty: *mut dyn std::marker::Send
32-
| 28: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*mut [i32]) }, span: $DIR/address_of.rs:36:12: 36:22, inferred_ty: *mut [i32]
33-
| 29: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*mut [i32]) }, span: $DIR/address_of.rs:36:12: 36:22, inferred_ty: *mut [i32]
4+
| 0: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:7:5: 7:18, inferred_ty: *const [i32; 10]
5+
| 1: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:9:5: 9:25, inferred_ty: *const dyn std::marker::Send
6+
| 2: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:13:12: 13:20, inferred_ty: *const [i32; 10]
7+
| 3: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:13:12: 13:20, inferred_ty: *const [i32; 10]
8+
| 4: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:14:12: 14:28, inferred_ty: *const [i32; 10]
9+
| 5: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:14:12: 14:28, inferred_ty: *const [i32; 10]
10+
| 6: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:15:12: 15:27, inferred_ty: *const dyn std::marker::Send
11+
| 7: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:15:12: 15:27, inferred_ty: *const dyn std::marker::Send
12+
| 8: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:16:12: 16:24, inferred_ty: *const [i32]
13+
| 9: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:16:12: 16:24, inferred_ty: *const [i32]
14+
| 10: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:18:5: 18:18, inferred_ty: *const [i32; 10]
15+
| 11: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:20:5: 20:25, inferred_ty: *const dyn std::marker::Send
16+
| 12: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:23:12: 23:20, inferred_ty: *const [i32; 10]
17+
| 13: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:23:12: 23:20, inferred_ty: *const [i32; 10]
18+
| 14: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:24:12: 24:28, inferred_ty: *const [i32; 10]
19+
| 15: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:24:12: 24:28, inferred_ty: *const [i32; 10]
20+
| 16: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:25:12: 25:27, inferred_ty: *const dyn std::marker::Send
21+
| 17: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:25:12: 25:27, inferred_ty: *const dyn std::marker::Send
22+
| 18: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:26:12: 26:24, inferred_ty: *const [i32]
23+
| 19: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:26:12: 26:24, inferred_ty: *const [i32]
24+
| 20: user_ty: Canonical { value: Ty(*mut ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:28:5: 28:16, inferred_ty: *mut [i32; 10]
25+
| 21: user_ty: Canonical { value: Ty(*mut dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:30:5: 30:23, inferred_ty: *mut dyn std::marker::Send
26+
| 22: user_ty: Canonical { value: Ty(*mut ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:33:12: 33:18, inferred_ty: *mut [i32; 10]
27+
| 23: user_ty: Canonical { value: Ty(*mut ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:33:12: 33:18, inferred_ty: *mut [i32; 10]
28+
| 24: user_ty: Canonical { value: Ty(*mut [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:34:12: 34:26, inferred_ty: *mut [i32; 10]
29+
| 25: user_ty: Canonical { value: Ty(*mut [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:34:12: 34:26, inferred_ty: *mut [i32; 10]
30+
| 26: user_ty: Canonical { value: Ty(*mut dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:35:12: 35:25, inferred_ty: *mut dyn std::marker::Send
31+
| 27: user_ty: Canonical { value: Ty(*mut dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:35:12: 35:25, inferred_ty: *mut dyn std::marker::Send
32+
| 28: user_ty: Canonical { value: Ty(*mut [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:36:12: 36:22, inferred_ty: *mut [i32]
33+
| 29: user_ty: Canonical { value: Ty(*mut [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:36:12: 36:22, inferred_ty: *mut [i32]
3434
|
3535
fn address_of_reborrow() -> () {
3636
let mut _0: (); // return place in scope 0 at $DIR/address_of.rs:+0:26: +0:26

tests/mir-opt/basic_assignment.main.SimplifyCfg-initial.after.mir

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// MIR for `main` after SimplifyCfg-initial
22

33
| User Type Annotations
4-
| 0: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(std::option::Option<std::boxed::Box<u32>>) }, span: $DIR/basic_assignment.rs:20:17: 20:33, inferred_ty: std::option::Option<std::boxed::Box<u32>>
5-
| 1: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(std::option::Option<std::boxed::Box<u32>>) }, span: $DIR/basic_assignment.rs:20:17: 20:33, inferred_ty: std::option::Option<std::boxed::Box<u32>>
4+
| 0: user_ty: Canonical { value: Ty(std::option::Option<std::boxed::Box<u32>>), max_universe: U0, variables: [] }, span: $DIR/basic_assignment.rs:20:17: 20:33, inferred_ty: std::option::Option<std::boxed::Box<u32>>
5+
| 1: user_ty: Canonical { value: Ty(std::option::Option<std::boxed::Box<u32>>), max_universe: U0, variables: [] }, span: $DIR/basic_assignment.rs:20:17: 20:33, inferred_ty: std::option::Option<std::boxed::Box<u32>>
66
|
77
fn main() -> () {
88
let mut _0: (); // return place in scope 0 at $DIR/basic_assignment.rs:+0:11: +0:11

0 commit comments

Comments
 (0)