Skip to content

Commit 7c4ad1f

Browse files
committed
A few drive-by changes.
1 parent 4752c05 commit 7c4ad1f

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

src/librustc/traits/util.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -365,12 +365,15 @@ impl<'tcx> TraitAliasExpander<'tcx> {
365365

366366
// Don't recurse if this trait alias is already on the stack for the DFS search.
367367
let anon_pred = anonymize_predicate(tcx, &pred);
368-
if item.path.iter().rev().skip(1)
369-
.any(|(tr, _)| anonymize_predicate(tcx, &tr.to_predicate()) == anon_pred) {
368+
if item.path.iter()
369+
.rev()
370+
.skip(1)
371+
.any(|(tr, _)| anonymize_predicate(tcx, &tr.to_predicate()) == anon_pred)
372+
{
370373
return false;
371374
}
372375

373-
// Get components of trait alias.
376+
// Get the components of this trait alias.
374377
let predicates = tcx.super_predicates_of(trait_ref.def_id());
375378

376379
let items = predicates.predicates

src/librustc_typeck/astconv.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
//! The main routine here is `ast_ty_to_ty()`; each use is parameterized by an
33
//! instance of `AstConv`.
44
5-
use errors::{Applicability, DiagnosticId};
65
use crate::hir::{self, GenericArg, GenericArgs, ExprKind};
76
use crate::hir::def::{CtorOf, Res, DefKind};
87
use crate::hir::def_id::DefId;
@@ -12,32 +11,34 @@ use crate::lint;
1211
use crate::middle::lang_items::SizedTraitLangItem;
1312
use crate::middle::resolve_lifetime as rl;
1413
use crate::namespace::Namespace;
14+
use crate::require_c_abi_if_c_variadic;
15+
use crate::util::common::ErrorReported;
16+
use crate::util::nodemap::FxHashMap;
17+
1518
use rustc::lint::builtin::AMBIGUOUS_ASSOCIATED_ITEMS;
1619
use rustc::traits;
1720
use rustc::ty::{self, DefIdTree, Ty, TyCtxt, Const, ToPredicate, TypeFoldable};
1821
use rustc::ty::{GenericParamDef, GenericParamDefKind};
1922
use rustc::ty::subst::{self, Subst, InternalSubsts, SubstsRef};
2023
use rustc::ty::wf::object_region_bounds;
2124
use rustc_target::spec::abi;
22-
use crate::require_c_abi_if_c_variadic;
23-
use smallvec::SmallVec;
25+
2426
use syntax::ast;
2527
use syntax::errors::pluralize;
2628
use syntax::feature_gate::{GateIssue, emit_feature_err};
2729
use syntax::util::lev_distance::find_best_match_for_name;
2830
use syntax::symbol::sym;
2931
use syntax_pos::{DUMMY_SP, Span, MultiSpan};
30-
use crate::util::common::ErrorReported;
31-
use crate::util::nodemap::FxHashMap;
32+
33+
use errors::{Applicability, DiagnosticId};
34+
use rustc_data_structures::fx::FxHashSet;
35+
use rustc_error_codes::*;
36+
use smallvec::SmallVec;
3237

3338
use std::collections::BTreeSet;
3439
use std::iter;
3540
use std::slice;
3641

37-
use rustc_data_structures::fx::FxHashSet;
38-
39-
use rustc_error_codes::*;
40-
4142
#[derive(Debug)]
4243
pub struct PathSeg(pub DefId, pub usize);
4344

@@ -64,8 +65,7 @@ pub trait AstConv<'tcx> {
6465
&self,
6566
param: Option<&ty::GenericParamDef>,
6667
span: Span,
67-
)
68-
-> Option<ty::Region<'tcx>>;
68+
) -> Option<ty::Region<'tcx>>;
6969

7070
/// Returns the type to use when a type is omitted.
7171
fn ty_infer(&self, param: Option<&ty::GenericParamDef>, span: Span) -> Ty<'tcx>;

0 commit comments

Comments
 (0)