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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 3 additions & 2 deletions
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

Lines changed: 8 additions & 13 deletions
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

Lines changed: 1 addition & 4 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 4 additions & 4 deletions
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

Lines changed: 4 additions & 3 deletions
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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 1 addition & 4 deletions
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

Lines changed: 1 addition & 5 deletions
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 {

0 commit comments

Comments
 (0)