Skip to content

Commit be746f7

Browse files
tidy
1 parent 329d892 commit be746f7

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

src/librustc/middle/resolve_lifetime.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1230,7 +1230,8 @@ fn object_lifetime_defaults_for_item(
12301230
}
12311231

12321232
let def = match data.bounded_ty.node {
1233-
hir::TyPath(hir::QPath::Resolved(None, ref path)) => path.defs.assert_single_ns(),
1233+
hir::TyPath(hir::QPath::Resolved(None, ref path)) =>
1234+
path.defs.assert_single_ns(),
12341235
_ => continue,
12351236
};
12361237

src/librustc_typeck/check/compare_method.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,9 @@ fn compare_synthetic_generics<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
822822
hir::intravisit::walk_ty(self, ty);
823823
match ty.node {
824824
hir::TyPath(hir::QPath::Resolved(None, ref path)) => {
825-
if let hir::def::Def::TyParam(def_id) = path.defs.assert_single_ns() {
825+
if let hir::def::Def::TyParam(def_id) =
826+
path.defs.assert_single_ns()
827+
{
826828
if def_id == self.1 {
827829
self.0 = Some(ty.span);
828830
}

src/librustc_typeck/check/method/suggest.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,9 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
260260
}
261261
hir::ExprPath(ref qpath) => { // local binding
262262
if let &hir::QPath::Resolved(_, ref path) = &qpath {
263-
if let hir::def::Def::Local(node_id) = path.defs.assert_single_ns() {
263+
if let hir::def::Def::Local(node_id) =
264+
path.defs.assert_single_ns()
265+
{
264266
let span = tcx.hir.span(node_id);
265267
let snippet = tcx.sess.codemap().span_to_snippet(span)
266268
.unwrap();

src/librustdoc/clean/mod.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -2791,7 +2791,9 @@ impl Clean<Type> for hir::Ty {
27912791
},
27922792
TyTup(ref tys) => Tuple(tys.clean(cx)),
27932793
TyPath(hir::QPath::Resolved(None, ref path)) => {
2794-
if let Some(new_ty) = cx.ty_substs.borrow().get(&path.defs.assert_single_ns()).cloned() {
2794+
if let Some(new_ty) =
2795+
cx.ty_substs.borrow().get(&path.defs.assert_single_ns()).cloned()
2796+
{
27952797
return new_ty;
27962798
}
27972799

0 commit comments

Comments
 (0)