about summary refs log tree commit diff
diff options
context:
space:
mode:
authorsurechen <surechen17@huawei.com>2021-07-21 12:01:03 +0800
committersurechen <surechen17@huawei.com>2021-07-21 12:01:03 +0800
commit0f5bfc22423f8b0a313a19fef92fdeb872f8cd11 (patch)
treea26576dc99405e370e63cd6da4d093bbb1b38fa4
parent7af840f62e95f0a4300cdef2a623c0b6b59c524c (diff)
downloadrust-0f5bfc22423f8b0a313a19fef92fdeb872f8cd11.tar.gz
rust-0f5bfc22423f8b0a313a19fef92fdeb872f8cd11.zip
Correct fmt
-rw-r--r--compiler/rustc_ast_lowering/src/item.rs17
1 files changed, 7 insertions, 10 deletions
diff --git a/compiler/rustc_ast_lowering/src/item.rs b/compiler/rustc_ast_lowering/src/item.rs
index d1428f3b6c1..880692516e9 100644
--- a/compiler/rustc_ast_lowering/src/item.rs
+++ b/compiler/rustc_ast_lowering/src/item.rs
@@ -1385,18 +1385,15 @@ impl<'hir> LoweringContext<'_, 'hir> {
                             .map(|d| (d.base_res(), d.unresolved_segments()))
                         {
                             Some((Res::Def(DefKind::TyParam, def_id), 0))
-                            if bound_pred.bound_generic_params.is_empty() =>
-                                {
-                                    for param in &generics.params {
-                                        if def_id == self.resolver.local_def_id(param.id).to_def_id() {
-                                            add_bounds
-                                                .entry(param.id)
-                                                .or_default()
-                                                .push(bound.clone());
-                                            continue 'next_bound;
-                                        }
+                                if bound_pred.bound_generic_params.is_empty() =>
+                            {
+                                for param in &generics.params {
+                                    if def_id == self.resolver.local_def_id(param.id).to_def_id() {
+                                        add_bounds.entry(param.id).or_default().push(bound.clone());
+                                        continue 'next_bound;
                                     }
                                 }
+                            }
                             _ => {}
                         }
                         self.diagnostic().span_err(