Skip to content

Commit 1d720ec

Browse files
committed
Run rustfmt --file-lines ... for changes from previous commits.
1 parent 630ec88 commit 1d720ec

File tree

13 files changed

+54
-77
lines changed

13 files changed

+54
-77
lines changed

src/librustc/hir/map/collector.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,8 @@ struct HirItemLike<T> {
590590
}
591591

592592
impl<'hir, T> HashStable<StableHashingContext<'hir>> for HirItemLike<T>
593-
where T: HashStable<StableHashingContext<'hir>>
593+
where
594+
T: HashStable<StableHashingContext<'hir>>,
594595
{
595596
fn hash_stable<W: StableHasherResult>(&self,
596597
hcx: &mut StableHashingContext<'hir>,

src/librustc/ich/hcx.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -397,8 +397,9 @@ pub fn hash_stable_trait_impls<'a, W>(
397397
hcx: &mut StableHashingContext<'a>,
398398
hasher: &mut StableHasher<W>,
399399
blanket_impls: &[DefId],
400-
non_blanket_impls: &FxHashMap<fast_reject::SimplifiedType, Vec<DefId>>)
401-
where W: StableHasherResult
400+
non_blanket_impls: &FxHashMap<fast_reject::SimplifiedType, Vec<DefId>>,
401+
) where
402+
W: StableHasherResult,
402403
{
403404
{
404405
let mut blanket_impls: SmallVec<[_; 8]> = blanket_impls

src/librustc/ich/impls_ty.rs

+8-13
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ impl<'gcx> HashStable<StableHashingContext<'gcx>> for ty::BoundVar {
136136
}
137137

138138
impl<'a, T> HashStable<StableHashingContext<'a>> for ty::Binder<T>
139-
where T: HashStable<StableHashingContext<'a>>
139+
where
140+
T: HashStable<StableHashingContext<'a>>,
140141
{
141142
fn hash_stable<W: StableHasherResult>(&self,
142143
hcx: &mut StableHashingContext<'a>,
@@ -192,9 +193,7 @@ impl<'a> ToStableHashKey<StableHashingContext<'a>> for region::Scope {
192193
}
193194
}
194195

195-
impl<'a> HashStable<StableHashingContext<'a>>
196-
for ty::TyVid
197-
{
196+
impl<'a> HashStable<StableHashingContext<'a>> for ty::TyVid {
198197
fn hash_stable<W: StableHasherResult>(&self,
199198
_hcx: &mut StableHashingContext<'a>,
200199
_hasher: &mut StableHasher<W>) {
@@ -204,9 +203,7 @@ for ty::TyVid
204203
}
205204
}
206205

207-
impl<'a> HashStable<StableHashingContext<'a>>
208-
for ty::IntVid
209-
{
206+
impl<'a> HashStable<StableHashingContext<'a>> for ty::IntVid {
210207
fn hash_stable<W: StableHasherResult>(&self,
211208
_hcx: &mut StableHashingContext<'a>,
212209
_hasher: &mut StableHasher<W>) {
@@ -216,9 +213,7 @@ for ty::IntVid
216213
}
217214
}
218215

219-
impl<'a> HashStable<StableHashingContext<'a>>
220-
for ty::FloatVid
221-
{
216+
impl<'a> HashStable<StableHashingContext<'a>> for ty::FloatVid {
222217
fn hash_stable<W: StableHasherResult>(&self,
223218
_hcx: &mut StableHashingContext<'a>,
224219
_hasher: &mut StableHasher<W>) {
@@ -228,9 +223,9 @@ for ty::FloatVid
228223
}
229224
}
230225

231-
impl<'a, T> HashStable<StableHashingContext<'a>>
232-
for ty::steal::Steal<T>
233-
where T: HashStable<StableHashingContext<'a>>
226+
impl<'a, T> HashStable<StableHashingContext<'a>> for ty::steal::Steal<T>
227+
where
228+
T: HashStable<StableHashingContext<'a>>,
234229
{
235230
fn hash_stable<W: StableHasherResult>(&self,
236231
hcx: &mut StableHashingContext<'a>,

src/librustc/traits/select.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,7 @@ pub enum IntercrateAmbiguityCause {
104104
impl IntercrateAmbiguityCause {
105105
/// Emits notes when the overlap is caused by complex intercrate ambiguities.
106106
/// See #23980 for details.
107-
pub fn add_intercrate_ambiguity_hint(
108-
&self,
109-
err: &mut errors::DiagnosticBuilder<'_>,
110-
) {
107+
pub fn add_intercrate_ambiguity_hint(&self, err: &mut errors::DiagnosticBuilder<'_>) {
111108
err.note(&self.intercrate_ambiguity_hint());
112109
}
113110

src/librustc/ty/fast_reject.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ impl<D: Copy + Debug + Ord + Eq + Hash> SimplifiedTypeGen<D> {
155155
}
156156

157157
impl<'a, D> HashStable<StableHashingContext<'a>> for SimplifiedTypeGen<D>
158-
where D: Copy + Debug + Ord + Eq + Hash +
159-
HashStable<StableHashingContext<'a>>,
158+
where
159+
D: Copy + Debug + Ord + Eq + Hash + HashStable<StableHashingContext<'a>>,
160160
{
161161
fn hash_stable<W: StableHasherResult>(&self,
162162
hcx: &mut StableHashingContext<'a>,

src/librustc/ty/instance.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -442,10 +442,10 @@ fn resolve_associated_item<'a, 'tcx>(
442442
}
443443
}
444444

445-
fn needs_fn_once_adapter_shim(actual_closure_kind: ty::ClosureKind,
446-
trait_closure_kind: ty::ClosureKind)
447-
-> Result<bool, ()>
448-
{
445+
fn needs_fn_once_adapter_shim(
446+
actual_closure_kind: ty::ClosureKind,
447+
trait_closure_kind: ty::ClosureKind,
448+
) -> Result<bool, ()> {
449449
match (actual_closure_kind, trait_closure_kind) {
450450
(ty::ClosureKind::Fn, ty::ClosureKind::Fn) |
451451
(ty::ClosureKind::FnMut, ty::ClosureKind::FnMut) |

src/librustc/ty/layout.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -1679,9 +1679,10 @@ impl ty::query::TyCtxtAt<'a, 'tcx, '_> {
16791679
}
16801680

16811681
impl<'tcx, C> TyLayoutMethods<'tcx, C> for Ty<'tcx>
1682-
where C: LayoutOf<Ty = Ty<'tcx>> + HasTyCtxt<'tcx>,
1683-
C::TyLayout: MaybeResult<TyLayout<'tcx>>,
1684-
C: HasParamEnv<'tcx>
1682+
where
1683+
C: LayoutOf<Ty = Ty<'tcx>> + HasTyCtxt<'tcx>,
1684+
C::TyLayout: MaybeResult<TyLayout<'tcx>>,
1685+
C: HasParamEnv<'tcx>,
16851686
{
16861687
fn for_variant(this: TyLayout<'tcx>, cx: &C, variant_index: VariantIdx) -> TyLayout<'tcx> {
16871688
let details = match this.variants {

src/librustc/ty/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1615,7 +1615,8 @@ pub struct Placeholder<T> {
16151615
}
16161616

16171617
impl<'a, T> HashStable<StableHashingContext<'a>> for Placeholder<T>
1618-
where T: HashStable<StableHashingContext<'a>>
1618+
where
1619+
T: HashStable<StableHashingContext<'a>>,
16191620
{
16201621
fn hash_stable<W: StableHasherResult>(
16211622
&self,

src/librustc_codegen_ssa/mir/block.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,7 @@ impl<'a, 'tcx: 'a, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
223223
}
224224
}
225225

226-
fn codegen_return_terminator(
227-
&mut self,
228-
mut bx: Bx,
229-
) {
226+
fn codegen_return_terminator(&mut self, mut bx: Bx) {
230227
if self.fn_ty.c_variadic {
231228
match self.va_list_ref {
232229
Some(va_list) => {

src/librustc_lint/types.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,7 @@ fn report_bin_hex_error(
202202
// - `uX` => `uY`
203203
//
204204
// No suggestion for: `isize`, `usize`.
205-
fn get_type_suggestion(
206-
t: Ty<'_>,
207-
val: u128,
208-
negative: bool,
209-
) -> Option<String> {
205+
fn get_type_suggestion(t: Ty<'_>, val: u128, negative: bool) -> Option<String> {
210206
use syntax::ast::IntTy::*;
211207
use syntax::ast::UintTy::*;
212208
macro_rules! find_fit {

src/librustc_mir/build/matches/mod.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -1575,11 +1575,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
15751575

15761576
/// Append `AscribeUserType` statements onto the end of `block`
15771577
/// for each ascription
1578-
fn ascribe_types(
1579-
&mut self,
1580-
block: BasicBlock,
1581-
ascriptions: &[Ascription<'tcx>],
1582-
) {
1578+
fn ascribe_types(&mut self, block: BasicBlock, ascriptions: &[Ascription<'tcx>]) {
15831579
for ascription in ascriptions {
15841580
let source_info = self.source_info(ascription.span);
15851581

src/librustc_mir/util/elaborate_drops.rs

+20-29
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ pub fn elaborate_drop<'b, 'tcx, D>(
119119
}
120120

121121
impl<'l, 'b, 'tcx, D> DropCtxt<'l, 'b, 'tcx, D>
122-
where D: DropElaborator<'b, 'tcx>
122+
where
123+
D: DropElaborator<'b, 'tcx>,
123124
{
124125
fn place_ty(&self, place: &Place<'tcx>) -> Ty<'tcx> {
125126
place.ty(self.elaborator.body(), self.tcx()).ty
@@ -285,12 +286,12 @@ impl<'l, 'b, 'tcx, D> DropCtxt<'l, 'b, 'tcx, D>
285286
///
286287
/// NOTE: this does not clear the master drop flag, so you need
287288
/// to point succ/unwind on a `drop_ladder_bottom`.
288-
fn drop_ladder(&mut self,
289-
fields: Vec<(Place<'tcx>, Option<D::Path>)>,
290-
succ: BasicBlock,
291-
unwind: Unwind)
292-
-> (BasicBlock, Unwind)
293-
{
289+
fn drop_ladder(
290+
&mut self,
291+
fields: Vec<(Place<'tcx>, Option<D::Path>)>,
292+
succ: BasicBlock,
293+
unwind: Unwind,
294+
) -> (BasicBlock, Unwind) {
294295
debug!("drop_ladder({:?}, {:?})", self, fields);
295296

296297
let mut fields = fields;
@@ -314,9 +315,7 @@ impl<'l, 'b, 'tcx, D> DropCtxt<'l, 'b, 'tcx, D>
314315
(*normal_ladder.last().unwrap(), *unwind_ladder.last().unwrap())
315316
}
316317

317-
fn open_drop_for_tuple(&mut self, tys: &[Ty<'tcx>])
318-
-> BasicBlock
319-
{
318+
fn open_drop_for_tuple(&mut self, tys: &[Ty<'tcx>]) -> BasicBlock {
320319
debug!("open_drop_for_tuple({:?}, {:?})", self, tys);
321320

322321
let fields = tys.iter().enumerate().map(|(i, &ty)| {
@@ -328,9 +327,7 @@ impl<'l, 'b, 'tcx, D> DropCtxt<'l, 'b, 'tcx, D>
328327
self.drop_ladder(fields, succ, unwind).0
329328
}
330329

331-
fn open_drop_for_box(&mut self, adt: &'tcx ty::AdtDef, substs: SubstsRef<'tcx>)
332-
-> BasicBlock
333-
{
330+
fn open_drop_for_box(&mut self, adt: &'tcx ty::AdtDef, substs: SubstsRef<'tcx>) -> BasicBlock {
334331
debug!("open_drop_for_box({:?}, {:?}, {:?})", self, adt, substs);
335332

336333
let interior = self.place.clone().deref();
@@ -346,8 +343,7 @@ impl<'l, 'b, 'tcx, D> DropCtxt<'l, 'b, 'tcx, D>
346343
self.drop_subpath(&interior, interior_path, succ, unwind_succ)
347344
}
348345

349-
fn open_drop_for_adt(&mut self, adt: &'tcx ty::AdtDef, substs: SubstsRef<'tcx>)
350-
-> BasicBlock {
346+
fn open_drop_for_adt(&mut self, adt: &'tcx ty::AdtDef, substs: SubstsRef<'tcx>) -> BasicBlock {
351347
debug!("open_drop_for_adt({:?}, {:?}, {:?})", self, adt, substs);
352348
if adt.variants.len() == 0 {
353349
return self.elaborator.patch().new_block(BasicBlockData {
@@ -505,9 +501,7 @@ impl<'l, 'b, 'tcx, D> DropCtxt<'l, 'b, 'tcx, D>
505501
self.drop_flag_test_block(switch_block, succ, unwind)
506502
}
507503

508-
fn destructor_call_block(&mut self, (succ, unwind): (BasicBlock, Unwind))
509-
-> BasicBlock
510-
{
504+
fn destructor_call_block(&mut self, (succ, unwind): (BasicBlock, Unwind)) -> BasicBlock {
511505
debug!("destructor_call_block({:?}, {:?})", self, succ);
512506
let tcx = self.tcx();
513507
let drop_trait = tcx.lang_items().drop_trait().unwrap();
@@ -837,11 +831,12 @@ impl<'l, 'b, 'tcx, D> DropCtxt<'l, 'b, 'tcx, D>
837831
/// if FLAG(self.path)
838832
/// if let Some(mode) = mode: FLAG(self.path)[mode] = false
839833
/// drop(self.place)
840-
fn complete_drop(&mut self,
841-
drop_mode: Option<DropFlagMode>,
842-
succ: BasicBlock,
843-
unwind: Unwind) -> BasicBlock
844-
{
834+
fn complete_drop(
835+
&mut self,
836+
drop_mode: Option<DropFlagMode>,
837+
succ: BasicBlock,
838+
unwind: Unwind,
839+
) -> BasicBlock {
845840
debug!("complete_drop({:?},{:?})", self, drop_mode);
846841

847842
let drop_block = self.drop_block(succ, unwind);
@@ -892,7 +887,7 @@ impl<'l, 'b, 'tcx, D> DropCtxt<'l, 'b, 'tcx, D>
892887
adt: &'tcx ty::AdtDef,
893888
substs: SubstsRef<'tcx>,
894889
target: BasicBlock,
895-
unwind: Unwind
890+
unwind: Unwind,
896891
) -> BasicBlock {
897892
let tcx = self.tcx();
898893
let unit_temp = Place::Base(PlaceBase::Local(self.new_temp(tcx.mk_unit())));
@@ -947,11 +942,7 @@ impl<'l, 'b, 'tcx, D> DropCtxt<'l, 'b, 'tcx, D>
947942
}
948943
}
949944

950-
fn new_block(&mut self,
951-
unwind: Unwind,
952-
k: TerminatorKind<'tcx>)
953-
-> BasicBlock
954-
{
945+
fn new_block(&mut self, unwind: Unwind, k: TerminatorKind<'tcx>) -> BasicBlock {
955946
self.elaborator.patch().new_block(BasicBlockData {
956947
statements: vec![],
957948
terminator: Some(Terminator {

src/libsyntax_ext/cfg.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ use syntax::tokenstream;
1212
use syntax::parse::token;
1313
use syntax_pos::Span;
1414

15-
pub fn expand_cfg(cx: &mut ExtCtxt<'_>,
16-
sp: Span,
17-
tts: &[tokenstream::TokenTree])
18-
-> Box<dyn base::MacResult + 'static> {
15+
pub fn expand_cfg(
16+
cx: &mut ExtCtxt<'_>,
17+
sp: Span,
18+
tts: &[tokenstream::TokenTree],
19+
) -> Box<dyn base::MacResult + 'static> {
1920
let sp = sp.apply_mark(cx.current_expansion.mark);
2021

2122
match parse_cfg(cx, sp, tts) {

0 commit comments

Comments
 (0)