rustc_mir: track inlined callees in SourceScopeData.

This commit is contained in:
Eduard-Mihai Burtescu 2020-02-08 21:31:09 +02:00
parent 708fc0b692
commit 6bc5eafbce
41 changed files with 124 additions and 74 deletions

View File

@ -161,7 +161,7 @@ pub struct Body<'tcx> {
/// A list of source scopes; these are referenced by statements
/// and used for debuginfo. Indexed by a `SourceScope`.
pub source_scopes: IndexVec<SourceScope, SourceScopeData>,
pub source_scopes: IndexVec<SourceScope, SourceScopeData<'tcx>>,
/// The yield type of the function, if it is a generator.
pub yield_ty: Option<Ty<'tcx>>,
@ -244,7 +244,7 @@ impl<'tcx> Body<'tcx> {
pub fn new(
source: MirSource<'tcx>,
basic_blocks: IndexVec<BasicBlock, BasicBlockData<'tcx>>,
source_scopes: IndexVec<SourceScope, SourceScopeData>,
source_scopes: IndexVec<SourceScope, SourceScopeData<'tcx>>,
local_decls: LocalDecls<'tcx>,
user_type_annotations: ty::CanonicalUserTypeAnnotations<'tcx>,
arg_count: usize,
@ -1868,11 +1868,16 @@ rustc_index::newtype_index! {
}
}
#[derive(Clone, Debug, TyEncodable, TyDecodable, HashStable)]
pub struct SourceScopeData {
#[derive(Clone, Debug, TyEncodable, TyDecodable, HashStable, TypeFoldable)]
pub struct SourceScopeData<'tcx> {
pub span: Span,
pub parent_scope: Option<SourceScope>,
/// Whether this scope is the root of a scope tree of another body,
/// inlined into this body by the MIR inliner.
/// `ty::Instance` is the callee, and the `Span` is the call site.
pub inlined: Option<(ty::Instance<'tcx>, Span)>,
/// Crate-local information for this source scope, that can't (and
/// needn't) be tracked across crates.
pub local_data: ClearCrossCrate<SourceScopeLocalData>,

View File

@ -10,7 +10,6 @@ CloneTypeFoldableAndLiftImpls! {
FakeReadCause,
RetagKind,
SourceScope,
SourceScopeData,
SourceScopeLocalData,
UserTypeAnnotationIndex,
}

View File

@ -85,7 +85,7 @@ macro_rules! make_mir_visitor {
}
fn visit_source_scope_data(&mut self,
scope_data: & $($mutability)? SourceScopeData) {
scope_data: & $($mutability)? SourceScopeData<'tcx>) {
self.super_source_scope_data(scope_data);
}
@ -317,10 +317,14 @@ macro_rules! make_mir_visitor {
}
}
fn super_source_scope_data(&mut self, scope_data: & $($mutability)? SourceScopeData) {
fn super_source_scope_data(
&mut self,
scope_data: & $($mutability)? SourceScopeData<'tcx>,
) {
let SourceScopeData {
span,
parent_scope,
inlined,
local_data: _,
} = scope_data;
@ -328,6 +332,31 @@ macro_rules! make_mir_visitor {
if let Some(parent_scope) = parent_scope {
self.visit_source_scope(parent_scope);
}
if let Some((callee, callsite_span)) = inlined {
let location = START_BLOCK.start_location();
self.visit_span(callsite_span);
let ty::Instance { def: callee_def, substs: callee_substs } = callee;
match callee_def {
ty::InstanceDef::Item(_def_id) => {}
ty::InstanceDef::Intrinsic(_def_id) |
ty::InstanceDef::VtableShim(_def_id) |
ty::InstanceDef::ReifyShim(_def_id) |
ty::InstanceDef::Virtual(_def_id, _) |
ty::InstanceDef::ClosureOnceShim { call_once: _def_id } |
ty::InstanceDef::DropGlue(_def_id, None) => {}
ty::InstanceDef::FnPtrShim(_def_id, ty) |
ty::InstanceDef::DropGlue(_def_id, Some(ty)) |
ty::InstanceDef::CloneShim(_def_id, ty) => {
// FIXME(eddyb) use a better `TyContext` here.
self.visit_ty(ty, TyContext::Location(location));
}
}
self.visit_substs(callee_substs, location);
}
}
fn super_statement(&mut self,

View File

@ -212,7 +212,12 @@ fn new_body<'tcx>(
source,
basic_blocks,
IndexVec::from_elem_n(
SourceScopeData { span, parent_scope: None, local_data: ClearCrossCrate::Clear },
SourceScopeData {
span,
parent_scope: None,
inlined: None,
local_data: ClearCrossCrate::Clear,
},
1,
),
local_decls,

View File

@ -313,7 +313,7 @@ struct ConstPropagator<'mir, 'tcx> {
param_env: ParamEnv<'tcx>,
// FIXME(eddyb) avoid cloning these two fields more than once,
// by accessing them through `ecx` instead.
source_scopes: IndexVec<SourceScope, SourceScopeData>,
source_scopes: IndexVec<SourceScope, SourceScopeData<'tcx>>,
local_decls: IndexVec<Local, LocalDecl<'tcx>>,
// Because we have `MutVisitor` we can't obtain the `SourceInfo` from a `Location`. So we store
// the last known `SourceInfo` here and just keep revisiting it.

View File

@ -112,7 +112,7 @@ impl Inliner<'tcx> {
let callee_body = if let Some(callee_def_id) = callsite.callee.def_id().as_local() {
let callee_hir_id = self.tcx.hir().local_def_id_to_hir_id(callee_def_id);
// Avoid a cycle here by only using `optimized_mir` only if we have
// Avoid a cycle here by only using `instance_mir` only if we have
// a lower `HirId` than the callee. This ensures that the callee will
// not inline us. This trick only works without incremental compilation.
// So don't do it if that is enabled. Also avoid inlining into generators,
@ -442,15 +442,11 @@ impl Inliner<'tcx> {
for mut scope in callee_body.source_scopes.iter().cloned() {
if scope.parent_scope.is_none() {
scope.parent_scope = Some(callsite.source_info.scope);
// FIXME(eddyb) is this really needed?
// (also note that it's always overwritten below)
scope.span = callee_body.span;
}
// FIXME(eddyb) this doesn't seem right at all.
// The inlined source scopes should probably be annotated as
// such, but also contain all of the original information.
scope.span = callsite.source_info.span;
// Mark the outermost callee scope as an inlined one.
assert_eq!(scope.inlined, None);
scope.inlined = Some((callsite.callee, callsite.source_info.span));
}
let idx = caller_body.source_scopes.push(scope);
scope_map.push(idx);

View File

@ -548,8 +548,23 @@ fn write_scope_tree(
};
for &child in children {
assert_eq!(body.source_scopes[child].parent_scope, Some(parent));
writeln!(w, "{0:1$}scope {2} {{", "", indent, child.index())?;
let child_data = &body.source_scopes[child];
assert_eq!(child_data.parent_scope, Some(parent));
if let Some((callee, callsite_span)) = child_data.inlined {
let indented_header =
format!("{0:1$}scope {2} (inlined {3}) {{", "", indent, child.index(), callee);
writeln!(
w,
"{0:1$} // at {2}",
indented_header,
ALIGN,
tcx.sess.source_map().span_to_string(callsite_span),
)?;
} else {
writeln!(w, "{0:1$}scope {2} {{", "", indent, child.index())?;
}
write_scope_tree(tcx, body, scope_tree, w, child, depth + 1)?;
writeln!(w, "{0:1$}}}", "", depth * INDENT.len())?;
}

View File

@ -334,7 +334,7 @@ struct Builder<'a, 'tcx> {
/// The vector of all scopes that we have created thus far;
/// we track this for debuginfo later.
source_scopes: IndexVec<SourceScope, SourceScopeData>,
source_scopes: IndexVec<SourceScope, SourceScopeData<'tcx>>,
source_scope: SourceScope,
/// The guard-context: each time we build the guard expression for

View File

@ -705,6 +705,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
self.source_scopes.push(SourceScopeData {
span,
parent_scope: Some(parent),
inlined: None,
local_data: ClearCrossCrate::Set(scope_local_data),
})
}

View File

@ -18,7 +18,7 @@
scope 3 {
- debug z => _3; // in scope 3 at $DIR/cycle.rs:11:9: 11:10
+ debug z => _4; // in scope 3 at $DIR/cycle.rs:11:9: 11:10
scope 4 {
scope 4 (inlined std::mem::drop::<i32>) { // at $DIR/cycle.rs:14:5: 14:12
debug _x => _6; // in scope 4 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
}
}

View File

@ -11,7 +11,7 @@
debug un => _1; // in scope 1 at $DIR/union.rs:13:9: 13:11
scope 2 {
}
scope 3 {
scope 3 (inlined std::mem::drop::<u32>) { // at $DIR/union.rs:15:5: 15:27
debug _x => _4; // in scope 3 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
}
}

View File

@ -26,9 +26,9 @@ fn main::{closure#0}(_1: *mut [generator@$DIR/generator-drop-cleanup.rs:10:15: 1
scope 1 {
debug _s => (((*_1) as variant#3).0: std::string::String); // in scope 1 at $DIR/generator-drop-cleanup.rs:11:13: 11:15
}
scope 2 {
scope 2 (inlined String::new) { // at $DIR/generator-drop-cleanup.rs:11:18: 11:31
let mut _6: std::vec::Vec<u8>; // in scope 2 at $DIR/generator-drop-cleanup.rs:11:18: 11:31
scope 3 {
scope 3 (inlined Vec::<u8>::new) { // at $SRC_DIR/alloc/src/string.rs:LL:COL
}
}

View File

@ -8,7 +8,7 @@ fn bar() -> bool {
let mut _6: i32; // in scope 0 at $DIR/inline-any-operand.rs:12:5: 12:13
scope 1 {
debug f => _1; // in scope 1 at $DIR/inline-any-operand.rs:11:9: 11:10
scope 2 {
scope 2 (inlined foo) { // at $DIR/inline-any-operand.rs:12:5: 12:13
debug x => _5; // in scope 2 at $DIR/inline-any-operand.rs:16:8: 16:9
debug y => _6; // in scope 2 at $DIR/inline-any-operand.rs:16:16: 16:17
let mut _3: i32; // in scope 2 at $DIR/inline-any-operand.rs:12:5: 12:13

View File

@ -13,7 +13,7 @@ fn foo(_1: T, _2: i32) -> i32 {
let mut _9: i32; // in scope 0 at $DIR/inline-closure.rs:12:5: 12:12
scope 1 {
debug x => _3; // in scope 1 at $DIR/inline-closure.rs:11:9: 11:10
scope 2 {
scope 2 (inlined foo::<T>::{closure#0}) { // at $DIR/inline-closure.rs:12:5: 12:12
debug _t => _8; // in scope 2 at $DIR/inline-closure.rs:11:14: 11:16
debug _q => _9; // in scope 2 at $DIR/inline-closure.rs:11:18: 11:20
}

View File

@ -13,7 +13,7 @@ fn foo(_1: T, _2: &i32) -> i32 {
let mut _10: &i32; // in scope 0 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12
scope 1 {
debug x => _3; // in scope 1 at $DIR/inline-closure-borrows-arg.rs:12:9: 12:10
scope 2 {
scope 2 (inlined foo::<T>::{closure#0}) { // at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12
debug r => _9; // in scope 2 at $DIR/inline-closure-borrows-arg.rs:12:14: 12:15
debug _s => _10; // in scope 2 at $DIR/inline-closure-borrows-arg.rs:12:23: 12:25
let _8: &i32; // in scope 2 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12

View File

@ -13,7 +13,7 @@ fn foo(_1: T, _2: i32) -> (i32, T) {
let mut _10: i32; // in scope 0 at $DIR/inline-closure-captures.rs:12:5: 12:9
scope 1 {
debug x => _3; // in scope 1 at $DIR/inline-closure-captures.rs:11:9: 11:10
scope 2 {
scope 2 (inlined foo::<T>::{closure#0}) { // at $DIR/inline-closure-captures.rs:12:5: 12:9
debug _q => _10; // in scope 2 at $DIR/inline-closure-captures.rs:11:14: 11:16
debug q => (*((*_6).0: &i32)); // in scope 2 at $DIR/inline-closure-captures.rs:10:23: 10:24
debug t => (*((*_6).1: &T)); // in scope 2 at $DIR/inline-closure-captures.rs:10:17: 10:18

View File

@ -4,7 +4,7 @@
fn inlined_no_sanitize() -> () {
let mut _0: (); // return place in scope 0 at $DIR/inline-compatibility.rs:24:37: 24:37
let _1: (); // in scope 0 at $DIR/inline-compatibility.rs:25:5: 25:18
+ scope 1 {
+ scope 1 (inlined no_sanitize) { // at $DIR/inline-compatibility.rs:25:5: 25:18
+ }
bb0: {

View File

@ -4,7 +4,7 @@
fn inlined_target_feature() -> () {
let mut _0: (); // return place in scope 0 at $DIR/inline-compatibility.rs:13:40: 13:40
let _1: (); // in scope 0 at $DIR/inline-compatibility.rs:14:5: 14:21
+ scope 1 {
+ scope 1 (inlined target_feature) { // at $DIR/inline-compatibility.rs:14:5: 14:21
+ }
bb0: {

View File

@ -10,7 +10,7 @@
scope 1 {
debug _x => _1; // in scope 1 at $DIR/inline-into-box-place.rs:8:9: 8:11
}
+ scope 2 {
+ scope 2 (inlined Vec::<u32>::new) { // at $DIR/inline-into-box-place.rs:8:33: 8:43
+ }
bb0: {

View File

@ -10,7 +10,7 @@
scope 1 {
debug _x => _1; // in scope 1 at $DIR/inline-into-box-place.rs:8:9: 8:11
}
+ scope 2 {
+ scope 2 (inlined Vec::<u32>::new) { // at $DIR/inline-into-box-place.rs:8:33: 8:43
+ }
bb0: {

View File

@ -14,7 +14,7 @@ fn bar() -> bool {
debug f => _1; // in scope 1 at $DIR/inline-retag.rs:11:9: 11:10
let mut _9: &i32; // in scope 1 at $DIR/inline-retag.rs:12:11: 12:14
let mut _10: &i32; // in scope 1 at $DIR/inline-retag.rs:12:7: 12:9
scope 2 {
scope 2 (inlined foo) { // at $DIR/inline-retag.rs:12:5: 12:15
debug x => _3; // in scope 2 at $DIR/inline-retag.rs:16:8: 16:9
debug y => _6; // in scope 2 at $DIR/inline-retag.rs:16:17: 16:18
let mut _11: i32; // in scope 2 at $DIR/inline-retag.rs:12:5: 12:15

View File

@ -7,7 +7,7 @@
scope 1 {
debug x => _1; // in scope 1 at $DIR/inline-specialization.rs:5:9: 5:10
}
+ scope 2 {
+ scope 2 (inlined <Vec<()> as Foo>::bar) { // at $DIR/inline-specialization.rs:5:13: 5:38
+ }
bb0: {

View File

@ -5,7 +5,7 @@ fn test2(_1: &dyn X) -> bool {
let mut _0: bool; // return place in scope 0 at $DIR/inline-trait-method_2.rs:4:24: 4:28
let mut _2: &dyn X; // in scope 0 at $DIR/inline-trait-method_2.rs:5:10: 5:11
let mut _3: &dyn X; // in scope 0 at $DIR/inline-trait-method_2.rs:5:10: 5:11
scope 1 {
scope 1 (inlined test) { // at $DIR/inline-trait-method_2.rs:5:5: 5:12
debug x => _2; // in scope 1 at $DIR/inline-trait-method_2.rs:9:9: 9:10
let mut _4: &dyn X; // in scope 1 at $DIR/inline-trait-method_2.rs:5:5: 5:12
}

View File

@ -6,7 +6,7 @@ fn a(_1: &mut [T]) -> &mut [T] {
let mut _2: &mut [T]; // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15
let mut _3: &mut [T]; // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15
let mut _4: &mut [T]; // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:6
scope 1 {
scope 1 (inlined <[T] as AsMut<[T]>>::as_mut) { // at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15
debug self => _4; // in scope 1 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
let mut _5: &mut [T]; // in scope 1 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15
}

View File

@ -6,7 +6,7 @@ fn b(_1: &mut Box<T>) -> &mut T {
let mut _2: &mut T; // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15
let mut _3: &mut T; // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15
let mut _4: &mut std::boxed::Box<T>; // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:6
scope 1 {
scope 1 (inlined <Box<T> as AsMut<T>>::as_mut) { // at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15
debug self => _4; // in scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
let mut _5: &mut T; // in scope 1 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15
let mut _6: &mut T; // in scope 1 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15

View File

@ -5,7 +5,7 @@ fn c(_1: &[T]) -> &[T] {
let mut _0: &[T]; // return place in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:12:25: 12:29
let _2: &[T]; // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:13:5: 13:15
let mut _3: &[T]; // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:13:5: 13:6
scope 1 {
scope 1 (inlined <[T] as AsRef<[T]>>::as_ref) { // at $DIR/issue-58867-inline-as-ref-as-mut.rs:13:5: 13:15
debug self => _3; // in scope 1 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
}

View File

@ -5,7 +5,7 @@ fn d(_1: &Box<T>) -> &T {
let mut _0: &T; // return place in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:17:28: 17:30
let _2: &T; // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:18:5: 18:15
let mut _3: &std::boxed::Box<T>; // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:18:5: 18:6
scope 1 {
scope 1 (inlined <Box<T> as AsRef<T>>::as_ref) { // at $DIR/issue-58867-inline-as-ref-as-mut.rs:18:5: 18:15
debug self => _3; // in scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
}

View File

@ -35,14 +35,14 @@
scope 5 {
debug arg0 => _25; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
debug arg1 => _28; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
scope 6 {
scope 6 (inlined ArgumentV1::new::<&i32>) { // at $SRC_DIR/std/src/macros.rs:LL:COL
debug x => _25; // in scope 6 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
debug f => _24; // in scope 6 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
let mut _23: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL
let mut _24: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL
let mut _25: &&i32; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL
}
scope 8 {
scope 8 (inlined ArgumentV1::new::<&i32>) { // at $SRC_DIR/std/src/macros.rs:LL:COL
debug x => _28; // in scope 8 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
debug f => _27; // in scope 8 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
let mut _26: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL
@ -50,7 +50,7 @@
let mut _28: &&i32; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL
}
}
scope 10 {
scope 10 (inlined Arguments::new_v1) { // at $SRC_DIR/std/src/macros.rs:LL:COL
debug pieces => _29; // in scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
debug args => _31; // in scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
let mut _29: &[&str]; // in scope 10 at $SRC_DIR/std/src/macros.rs:LL:COL

View File

@ -35,14 +35,14 @@
scope 5 {
debug arg0 => _25; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
debug arg1 => _28; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
scope 6 {
scope 6 (inlined ArgumentV1::new::<&i32>) { // at $SRC_DIR/std/src/macros.rs:LL:COL
debug x => _25; // in scope 6 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
debug f => _24; // in scope 6 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
let mut _23: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL
let mut _24: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL
let mut _25: &&i32; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL
}
scope 8 {
scope 8 (inlined ArgumentV1::new::<&i32>) { // at $SRC_DIR/std/src/macros.rs:LL:COL
debug x => _28; // in scope 8 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
debug f => _27; // in scope 8 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
let mut _26: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL
@ -50,7 +50,7 @@
let mut _28: &&i32; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL
}
}
scope 10 {
scope 10 (inlined Arguments::new_v1) { // at $SRC_DIR/std/src/macros.rs:LL:COL
debug pieces => _29; // in scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
debug args => _31; // in scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
let mut _29: &[&str]; // in scope 10 at $SRC_DIR/std/src/macros.rs:LL:COL

View File

@ -58,7 +58,7 @@
scope 5 {
debug arg0 => _36; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
debug arg1 => _37; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
scope 6 {
scope 6 (inlined ArgumentV1::new::<&i32>) { // at $SRC_DIR/std/src/macros.rs:LL:COL
debug x => _39; // in scope 6 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
debug f => _40; // in scope 6 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
let mut _46: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL
@ -66,7 +66,7 @@
let mut _48: &core::fmt::Opaque; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL
let mut _49: &&i32; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL
}
scope 8 {
scope 8 (inlined ArgumentV1::new::<&i32>) { // at $SRC_DIR/std/src/macros.rs:LL:COL
debug x => _42; // in scope 8 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
debug f => _43; // in scope 8 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
let mut _50: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL
@ -75,7 +75,7 @@
let mut _53: &&i32; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL
}
}
scope 10 {
scope 10 (inlined Arguments::new_v1) { // at $SRC_DIR/std/src/macros.rs:LL:COL
debug pieces => _23; // in scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
debug args => _27; // in scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
let mut _54: &[&str]; // in scope 10 at $SRC_DIR/std/src/macros.rs:LL:COL

View File

@ -58,7 +58,7 @@
scope 5 {
debug arg0 => _36; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
debug arg1 => _37; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
scope 6 {
scope 6 (inlined ArgumentV1::new::<&i32>) { // at $SRC_DIR/std/src/macros.rs:LL:COL
debug x => _39; // in scope 6 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
debug f => _40; // in scope 6 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
let mut _46: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL
@ -66,7 +66,7 @@
let mut _48: &core::fmt::Opaque; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL
let mut _49: &&i32; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL
}
scope 8 {
scope 8 (inlined ArgumentV1::new::<&i32>) { // at $SRC_DIR/std/src/macros.rs:LL:COL
debug x => _42; // in scope 8 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
debug f => _43; // in scope 8 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
let mut _50: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL
@ -75,7 +75,7 @@
let mut _53: &&i32; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL
}
}
scope 10 {
scope 10 (inlined Arguments::new_v1) { // at $SRC_DIR/std/src/macros.rs:LL:COL
debug pieces => _23; // in scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
debug args => _27; // in scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
let mut _54: &[&str]; // in scope 10 at $SRC_DIR/std/src/macros.rs:LL:COL

View File

@ -6,7 +6,7 @@
let mut _0: (); // return place in scope 0 at $DIR/remove_unneeded_drops.rs:20:32: 20:32
let _2: (); // in scope 0 at $DIR/remove_unneeded_drops.rs:21:5: 21:12
let mut _3: T; // in scope 0 at $DIR/remove_unneeded_drops.rs:21:10: 21:11
scope 1 {
scope 1 (inlined std::mem::drop::<T>) { // at $DIR/remove_unneeded_drops.rs:21:5: 21:12
debug _x => _3; // in scope 1 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
}

View File

@ -6,7 +6,7 @@
let mut _0: (); // return place in scope 0 at $DIR/remove_unneeded_drops.rs:8:27: 8:27
let _2: (); // in scope 0 at $DIR/remove_unneeded_drops.rs:9:5: 9:12
let mut _3: std::vec::Vec<bool>; // in scope 0 at $DIR/remove_unneeded_drops.rs:9:10: 9:11
scope 1 {
scope 1 (inlined std::mem::drop::<Vec<bool>>) { // at $DIR/remove_unneeded_drops.rs:9:5: 9:12
debug _x => _3; // in scope 1 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
}

View File

@ -6,7 +6,7 @@
let mut _0: (); // return place in scope 0 at $DIR/remove_unneeded_drops.rs:3:17: 3:17
let _2: (); // in scope 0 at $DIR/remove_unneeded_drops.rs:4:5: 4:12
let mut _3: bool; // in scope 0 at $DIR/remove_unneeded_drops.rs:4:10: 4:11
scope 1 {
scope 1 (inlined std::mem::drop::<bool>) { // at $DIR/remove_unneeded_drops.rs:4:5: 4:12
debug _x => _3; // in scope 1 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
}

View File

@ -6,7 +6,7 @@
let mut _0: (); // return place in scope 0 at $DIR/remove_unneeded_drops.rs:13:36: 13:36
let _2: (); // in scope 0 at $DIR/remove_unneeded_drops.rs:14:5: 14:12
let mut _3: T; // in scope 0 at $DIR/remove_unneeded_drops.rs:14:10: 14:11
scope 1 {
scope 1 (inlined std::mem::drop::<T>) { // at $DIR/remove_unneeded_drops.rs:14:5: 14:12
debug _x => _3; // in scope 1 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
}

View File

@ -22,11 +22,11 @@
- debug err => _6; // in scope 2 at $DIR/simplify-arm.rs:24:14: 24:15
+ debug err => ((_0 as Err).0: i32); // in scope 2 at $DIR/simplify-arm.rs:24:14: 24:15
scope 3 {
scope 7 {
scope 7 (inlined <i32 as From<i32>>::from) { // at $DIR/simplify-arm.rs:24:14: 24:15
- debug t => _9; // in scope 7 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
+ debug t => ((_0 as Err).0: i32); // in scope 7 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
}
scope 8 {
scope 8 (inlined <std::result::Result<u8, i32> as Try>::from_error) { // at $DIR/simplify-arm.rs:24:13: 24:15
- debug v => _8; // in scope 8 at $SRC_DIR/core/src/result.rs:LL:COL
+ debug v => ((_0 as Err).0: i32); // in scope 8 at $SRC_DIR/core/src/result.rs:LL:COL
let mut _12: i32; // in scope 8 at $DIR/simplify-arm.rs:24:13: 24:15
@ -39,7 +39,7 @@
scope 5 {
}
}
scope 6 {
scope 6 (inlined <std::result::Result<u8, i32> as Try>::into_result) { // at $DIR/simplify-arm.rs:24:13: 24:15
debug self => _4; // in scope 6 at $SRC_DIR/core/src/result.rs:LL:COL
}

View File

@ -20,10 +20,10 @@
scope 2 {
debug err => ((_0 as Err).0: i32); // in scope 2 at $DIR/simplify-arm.rs:24:14: 24:15
scope 3 {
scope 7 {
scope 7 (inlined <i32 as From<i32>>::from) { // at $DIR/simplify-arm.rs:24:14: 24:15
debug t => ((_0 as Err).0: i32); // in scope 7 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
}
scope 8 {
scope 8 (inlined <std::result::Result<u8, i32> as Try>::from_error) { // at $DIR/simplify-arm.rs:24:13: 24:15
debug v => ((_0 as Err).0: i32); // in scope 8 at $SRC_DIR/core/src/result.rs:LL:COL
let mut _12: i32; // in scope 8 at $DIR/simplify-arm.rs:24:13: 24:15
}
@ -34,7 +34,7 @@
scope 5 {
}
}
scope 6 {
scope 6 (inlined <std::result::Result<u8, i32> as Try>::into_result) { // at $DIR/simplify-arm.rs:24:13: 24:15
debug self => _4; // in scope 6 at $SRC_DIR/core/src/result.rs:LL:COL
}

View File

@ -20,10 +20,10 @@
scope 2 {
debug err => ((_0 as Err).0: i32); // in scope 2 at $DIR/simplify_try.rs:8:14: 8:15
scope 3 {
scope 7 {
scope 7 (inlined <i32 as From<i32>>::from) { // at $DIR/simplify_try.rs:8:14: 8:15
debug t => ((_0 as Err).0: i32); // in scope 7 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
}
scope 8 {
scope 8 (inlined <std::result::Result<u32, i32> as Try>::from_error) { // at $DIR/simplify_try.rs:8:13: 8:15
debug v => ((_0 as Err).0: i32); // in scope 8 at $SRC_DIR/core/src/result.rs:LL:COL
let mut _12: i32; // in scope 8 at $DIR/simplify_try.rs:8:13: 8:15
}
@ -34,7 +34,7 @@
scope 5 {
}
}
scope 6 {
scope 6 (inlined <std::result::Result<u32, i32> as Try>::into_result) { // at $DIR/simplify_try.rs:8:13: 8:15
- debug self => _4; // in scope 6 at $SRC_DIR/core/src/result.rs:LL:COL
+ debug self => _0; // in scope 6 at $SRC_DIR/core/src/result.rs:LL:COL
}

View File

@ -22,11 +22,11 @@
- debug err => _6; // in scope 2 at $DIR/simplify_try.rs:8:14: 8:15
+ debug err => ((_0 as Err).0: i32); // in scope 2 at $DIR/simplify_try.rs:8:14: 8:15
scope 3 {
scope 7 {
scope 7 (inlined <i32 as From<i32>>::from) { // at $DIR/simplify_try.rs:8:14: 8:15
- debug t => _9; // in scope 7 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
+ debug t => ((_0 as Err).0: i32); // in scope 7 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
}
scope 8 {
scope 8 (inlined <std::result::Result<u32, i32> as Try>::from_error) { // at $DIR/simplify_try.rs:8:13: 8:15
- debug v => _8; // in scope 8 at $SRC_DIR/core/src/result.rs:LL:COL
+ debug v => ((_0 as Err).0: i32); // in scope 8 at $SRC_DIR/core/src/result.rs:LL:COL
let mut _12: i32; // in scope 8 at $DIR/simplify_try.rs:8:13: 8:15
@ -39,7 +39,7 @@
scope 5 {
}
}
scope 6 {
scope 6 (inlined <std::result::Result<u32, i32> as Try>::into_result) { // at $DIR/simplify_try.rs:8:13: 8:15
debug self => _4; // in scope 6 at $SRC_DIR/core/src/result.rs:LL:COL
}

View File

@ -19,10 +19,10 @@ fn try_identity(_1: std::result::Result<u32, i32>) -> std::result::Result<u32, i
scope 2 {
debug err => ((_0 as Err).0: i32); // in scope 2 at $DIR/simplify_try.rs:8:14: 8:15
scope 3 {
scope 7 {
scope 7 (inlined <i32 as From<i32>>::from) { // at $DIR/simplify_try.rs:8:14: 8:15
debug t => ((_0 as Err).0: i32); // in scope 7 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
}
scope 8 {
scope 8 (inlined <std::result::Result<u32, i32> as Try>::from_error) { // at $DIR/simplify_try.rs:8:13: 8:15
debug v => ((_0 as Err).0: i32); // in scope 8 at $SRC_DIR/core/src/result.rs:LL:COL
let mut _12: i32; // in scope 8 at $DIR/simplify_try.rs:8:13: 8:15
}
@ -33,7 +33,7 @@ fn try_identity(_1: std::result::Result<u32, i32>) -> std::result::Result<u32, i
scope 5 {
}
}
scope 6 {
scope 6 (inlined <std::result::Result<u32, i32> as Try>::into_result) { // at $DIR/simplify_try.rs:8:13: 8:15
debug self => _4; // in scope 6 at $SRC_DIR/core/src/result.rs:LL:COL
}

View File

@ -9,10 +9,10 @@ fn try_identity(_1: std::result::Result<u32, i32>) -> std::result::Result<u32, i
scope 2 {
debug err => ((_0 as Err).0: i32); // in scope 2 at $DIR/simplify_try.rs:8:14: 8:15
scope 3 {
scope 7 {
scope 7 (inlined <i32 as From<i32>>::from) { // at $DIR/simplify_try.rs:8:14: 8:15
debug t => ((_0 as Err).0: i32); // in scope 7 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
}
scope 8 {
scope 8 (inlined <std::result::Result<u32, i32> as Try>::from_error) { // at $DIR/simplify_try.rs:8:13: 8:15
debug v => ((_0 as Err).0: i32); // in scope 8 at $SRC_DIR/core/src/result.rs:LL:COL
}
}
@ -22,7 +22,7 @@ fn try_identity(_1: std::result::Result<u32, i32>) -> std::result::Result<u32, i
scope 5 {
}
}
scope 6 {
scope 6 (inlined <std::result::Result<u32, i32> as Try>::into_result) { // at $DIR/simplify_try.rs:8:13: 8:15
debug self => _0; // in scope 6 at $SRC_DIR/core/src/result.rs:LL:COL
}