Reformat using the new identifier sorting from rustfmt
This commit is contained in:
parent
1173204b36
commit
c682aa162b
1455 changed files with 7152 additions and 8384 deletions
|
@ -7,17 +7,17 @@ use rustc_data_structures::work_queue::WorkQueue;
|
|||
use rustc_hir::def_id::DefId;
|
||||
use rustc_index::{Idx, IndexVec};
|
||||
use rustc_middle::bug;
|
||||
use rustc_middle::mir::{self, create_dump_file, dump_enabled, traversal, BasicBlock};
|
||||
use rustc_middle::ty::print::with_no_trimmed_paths;
|
||||
use rustc_middle::mir::{self, BasicBlock, create_dump_file, dump_enabled, traversal};
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_span::symbol::{sym, Symbol};
|
||||
use rustc_middle::ty::print::with_no_trimmed_paths;
|
||||
use rustc_span::symbol::{Symbol, sym};
|
||||
use tracing::{debug, error};
|
||||
use {rustc_ast as ast, rustc_graphviz as dot};
|
||||
|
||||
use super::fmt::DebugWithContext;
|
||||
use super::{
|
||||
graphviz, visit_results, Analysis, AnalysisDomain, Direction, GenKill, GenKillAnalysis,
|
||||
GenKillSet, JoinSemiLattice, ResultsCursor, ResultsVisitor,
|
||||
Analysis, AnalysisDomain, Direction, GenKill, GenKillAnalysis, GenKillSet, JoinSemiLattice,
|
||||
ResultsCursor, ResultsVisitor, graphviz, visit_results,
|
||||
};
|
||||
use crate::errors::{
|
||||
DuplicateValuesFor, PathMustEndInFilename, RequiresAnArgument, UnknownFormatter,
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
use std::fmt;
|
||||
|
||||
use rustc_index::bit_set::{BitSet, ChunkedBitSet, HybridBitSet};
|
||||
use rustc_index::Idx;
|
||||
use rustc_index::bit_set::{BitSet, ChunkedBitSet, HybridBitSet};
|
||||
|
||||
use super::lattice::MaybeReachable;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ use std::{io, ops, str};
|
|||
use regex::Regex;
|
||||
use rustc_graphviz as dot;
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_middle::mir::{self, graphviz_safe_def_name, BasicBlock, Body, Location};
|
||||
use rustc_middle::mir::{self, BasicBlock, Body, Location, graphviz_safe_def_name};
|
||||
|
||||
use super::fmt::{DebugDiffWithAdapter, DebugWithAdapter, DebugWithContext};
|
||||
use super::{Analysis, CallReturnPlaces, Direction, Results, ResultsCursor, ResultsVisitor};
|
||||
|
@ -502,10 +502,10 @@ where
|
|||
r#"<td colspan="{colspan}" {fmt} align="left">{state}</td>"#,
|
||||
colspan = this.style.num_state_columns(),
|
||||
fmt = fmt,
|
||||
state = dot::escape_html(&format!(
|
||||
"{:?}",
|
||||
DebugWithAdapter { this: state, ctxt: analysis }
|
||||
)),
|
||||
state = dot::escape_html(&format!("{:?}", DebugWithAdapter {
|
||||
this: state,
|
||||
ctxt: analysis
|
||||
})),
|
||||
)
|
||||
})
|
||||
}
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
|
||||
use std::cmp::Ordering;
|
||||
|
||||
use rustc_index::bit_set::{BitSet, ChunkedBitSet, HybridBitSet};
|
||||
use rustc_index::Idx;
|
||||
use rustc_index::bit_set::{BitSet, ChunkedBitSet, HybridBitSet};
|
||||
use rustc_middle::mir::{self, BasicBlock, CallReturnPlaces, Location, TerminatorEdges};
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
|
||||
|
@ -49,7 +49,7 @@ pub use self::cursor::ResultsCursor;
|
|||
pub use self::direction::{Backward, Direction, Forward};
|
||||
pub use self::engine::{Engine, Results};
|
||||
pub use self::lattice::{JoinSemiLattice, MaybeReachable};
|
||||
pub use self::visitor::{visit_results, ResultsVisitable, ResultsVisitor};
|
||||
pub use self::visitor::{ResultsVisitable, ResultsVisitor, visit_results};
|
||||
|
||||
/// Analysis domains are all bitsets of various kinds. This trait holds
|
||||
/// operations needed by all of them.
|
||||
|
|
|
@ -30,32 +30,26 @@ fn mock_body<'tcx>() -> mir::Body<'tcx> {
|
|||
|
||||
block(4, mir::TerminatorKind::Return);
|
||||
block(1, mir::TerminatorKind::Return);
|
||||
block(
|
||||
2,
|
||||
mir::TerminatorKind::Call {
|
||||
func: mir::Operand::Copy(dummy_place.clone()),
|
||||
args: [].into(),
|
||||
destination: dummy_place.clone(),
|
||||
target: Some(mir::START_BLOCK),
|
||||
unwind: mir::UnwindAction::Continue,
|
||||
call_source: mir::CallSource::Misc,
|
||||
fn_span: DUMMY_SP,
|
||||
},
|
||||
);
|
||||
block(2, mir::TerminatorKind::Call {
|
||||
func: mir::Operand::Copy(dummy_place.clone()),
|
||||
args: [].into(),
|
||||
destination: dummy_place.clone(),
|
||||
target: Some(mir::START_BLOCK),
|
||||
unwind: mir::UnwindAction::Continue,
|
||||
call_source: mir::CallSource::Misc,
|
||||
fn_span: DUMMY_SP,
|
||||
});
|
||||
block(3, mir::TerminatorKind::Return);
|
||||
block(0, mir::TerminatorKind::Return);
|
||||
block(
|
||||
4,
|
||||
mir::TerminatorKind::Call {
|
||||
func: mir::Operand::Copy(dummy_place.clone()),
|
||||
args: [].into(),
|
||||
destination: dummy_place.clone(),
|
||||
target: Some(mir::START_BLOCK),
|
||||
unwind: mir::UnwindAction::Continue,
|
||||
call_source: mir::CallSource::Misc,
|
||||
fn_span: DUMMY_SP,
|
||||
},
|
||||
);
|
||||
block(4, mir::TerminatorKind::Call {
|
||||
func: mir::Operand::Copy(dummy_place.clone()),
|
||||
args: [].into(),
|
||||
destination: dummy_place.clone(),
|
||||
target: Some(mir::START_BLOCK),
|
||||
unwind: mir::UnwindAction::Continue,
|
||||
call_source: mir::CallSource::Misc,
|
||||
fn_span: DUMMY_SP,
|
||||
});
|
||||
|
||||
mir::Body::new_cfg_only(blocks)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue