Skip to content

Commit fff08cb

Browse files
committed
Run rustfmt --file-lines ... for changes from previous commits.
1 parent 21ac960 commit fff08cb

File tree

176 files changed

+2212
-2132
lines changed

Some content is hidden

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

176 files changed

+2212
-2132
lines changed

src/librustc/cfg/construct.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ struct LoopScope {
3030
break_index: CFGIndex, // where to go on a `break`
3131
}
3232

33-
pub fn construct<'tcx>(tcx: TyCtxt<'tcx, 'tcx>,
34-
body: &hir::Body) -> CFG {
33+
pub fn construct<'tcx>(tcx: TyCtxt<'tcx, 'tcx>, body: &hir::Body) -> CFG {
3534
let mut graph = graph::Graph::new();
3635
let entry = graph.add_node(CFGNodeData::Entry);
3736

src/librustc/cfg/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ pub type CFGNode = graph::Node<CFGNodeData>;
4949
pub type CFGEdge = graph::Edge<CFGEdgeData>;
5050

5151
impl CFG {
52-
pub fn new<'tcx>(tcx: TyCtxt<'tcx, 'tcx>,
53-
body: &hir::Body) -> CFG {
52+
pub fn new<'tcx>(tcx: TyCtxt<'tcx, 'tcx>, body: &hir::Body) -> CFG {
5453
construct::construct(tcx, body)
5554
}
5655

src/librustc/dep_graph/dep_node.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,8 @@ trait DepNodeParams<'gcx: 'tcx, 'tcx>: fmt::Debug {
480480
}
481481

482482
impl<'gcx: 'tcx, 'tcx, T> DepNodeParams<'gcx, 'tcx> for T
483-
where T: HashStable<StableHashingContext<'tcx>> + fmt::Debug
483+
where
484+
T: HashStable<StableHashingContext<'tcx>> + fmt::Debug,
484485
{
485486
default const CAN_RECONSTRUCT_QUERY_KEY: bool = false;
486487

src/librustc/dep_graph/graph.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ where
9090
}
9191

9292
impl DepGraph {
93-
9493
pub fn new(prev_graph: PreviousDepGraph,
9594
prev_work_products: FxHashMap<WorkProductId, WorkProduct>) -> DepGraph {
9695
let prev_graph_node_count = prev_graph.node_count();
@@ -559,7 +558,7 @@ impl DepGraph {
559558
pub fn try_mark_green_and_read(
560559
&self,
561560
tcx: TyCtxt<'_, '_>,
562-
dep_node: &DepNode
561+
dep_node: &DepNode,
563562
) -> Option<(SerializedDepNodeIndex, DepNodeIndex)> {
564563
self.try_mark_green(tcx, dep_node).map(|(prev_index, dep_node_index)| {
565564
debug_assert!(self.is_green(&dep_node));
@@ -571,7 +570,7 @@ impl DepGraph {
571570
pub fn try_mark_green(
572571
&self,
573572
tcx: TyCtxt<'_, '_>,
574-
dep_node: &DepNode
573+
dep_node: &DepNode,
575574
) -> Option<(SerializedDepNodeIndex, DepNodeIndex)> {
576575
debug_assert!(!dep_node.kind.is_eval_always());
577576

@@ -607,7 +606,7 @@ impl DepGraph {
607606
tcx: TyCtxt<'tcx, 'tcx>,
608607
data: &DepGraphData,
609608
prev_dep_node_index: SerializedDepNodeIndex,
610-
dep_node: &DepNode
609+
dep_node: &DepNode,
611610
) -> Option<DepNodeIndex> {
612611
debug!("try_mark_previous_green({:?}) - BEGIN", dep_node);
613612

src/librustc/dep_graph/safe.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ impl DepGraphSafe for DefId {
3333

3434
/// The type context itself can be used to access all kinds of tracked
3535
/// state, but those accesses should always generate read events.
36-
impl<'gcx, 'tcx> DepGraphSafe for TyCtxt<'gcx, 'tcx> {
37-
}
36+
impl<'gcx, 'tcx> DepGraphSafe for TyCtxt<'gcx, 'tcx> {}
3837

3938
/// Tuples make it easy to build up state.
4039
impl<A, B> DepGraphSafe for (A, B)

src/librustc/infer/canonical/substitute.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,7 @@ use crate::ty::{self, TyCtxt};
1414
impl<'tcx, V> Canonical<'tcx, V> {
1515
/// Instantiate the wrapped value, replacing each canonical value
1616
/// with the value given in `var_values`.
17-
pub fn substitute(
18-
&self,
19-
tcx: TyCtxt<'_, 'tcx>,
20-
var_values: &CanonicalVarValues<'tcx>,
21-
) -> V
17+
pub fn substitute(&self, tcx: TyCtxt<'_, 'tcx>, var_values: &CanonicalVarValues<'tcx>) -> V
2218
where
2319
V: TypeFoldable<'tcx>,
2420
{

src/librustc/infer/combine.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,14 @@ pub enum RelationDir {
5858
}
5959

6060
impl<'infcx, 'gcx, 'tcx> InferCtxt<'infcx, 'gcx, 'tcx> {
61-
pub fn super_combine_tys<R>(&self,
62-
relation: &mut R,
63-
a: Ty<'tcx>,
64-
b: Ty<'tcx>)
65-
-> RelateResult<'tcx, Ty<'tcx>>
66-
where R: TypeRelation<'gcx, 'tcx>
61+
pub fn super_combine_tys<R>(
62+
&self,
63+
relation: &mut R,
64+
a: Ty<'tcx>,
65+
b: Ty<'tcx>,
66+
) -> RelateResult<'tcx, Ty<'tcx>>
67+
where
68+
R: TypeRelation<'gcx, 'tcx>,
6769
{
6870
let a_is_expected = relation.a_is_expected();
6971

src/librustc/infer/error_reporting/nice_region_error/placeholder_error.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,10 @@ impl NiceRegionError<'me, 'gcx, 'tcx> {
338338
}
339339

340340
impl<'gcx, 'tcx, T> fmt::Display for Highlighted<'gcx, 'tcx, T>
341-
where T: for<'a, 'b, 'c> Print<'gcx, 'tcx,
341+
where
342+
T: for<'a, 'b, 'c> Print<
343+
'gcx,
344+
'tcx,
342345
FmtPrinter<'a, 'gcx, 'tcx, &'b mut fmt::Formatter<'c>>,
343346
Error = fmt::Error,
344347
>,

src/librustc/infer/lattice.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use crate::ty::TyVar;
2727
use crate::ty::{self, Ty};
2828
use crate::ty::relate::{RelateResult, TypeRelation};
2929

30-
pub trait LatticeDir<'f, 'gcx: 'f+'tcx, 'tcx: 'f> : TypeRelation<'gcx, 'tcx> {
30+
pub trait LatticeDir<'f, 'gcx: 'f + 'tcx, 'tcx: 'f>: TypeRelation<'gcx, 'tcx> {
3131
fn infcx(&self) -> &'f InferCtxt<'f, 'gcx, 'tcx>;
3232

3333
fn cause(&self) -> &ObligationCause<'tcx>;

src/librustc/infer/outlives/free_region_map.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ impl<'tcx> FreeRegionMap<'tcx> {
2828
/// cases, this is more conservative than necessary, in order to
2929
/// avoid making arbitrary choices. See
3030
/// `TransitiveRelation::postdom_upper_bound` for more details.
31-
pub fn lub_free_regions<'gcx>(&self,
32-
tcx: TyCtxt<'gcx, 'tcx>,
33-
r_a: Region<'tcx>,
34-
r_b: Region<'tcx>)
35-
-> Region<'tcx> {
31+
pub fn lub_free_regions<'gcx>(
32+
&self,
33+
tcx: TyCtxt<'gcx, 'tcx>,
34+
r_a: Region<'tcx>,
35+
r_b: Region<'tcx>,
36+
) -> Region<'tcx> {
3637
debug!("lub_free_regions(r_a={:?}, r_b={:?})", r_a, r_b);
3738
assert!(is_free(r_a));
3839
assert!(is_free(r_b));

0 commit comments

Comments
 (0)