diff --git a/compiler/rustc_builtin_macros/src/alloc_error_handler.rs b/compiler/rustc_builtin_macros/src/alloc_error_handler.rs index 09d892768b464..1df2812e0c887 100644 --- a/compiler/rustc_builtin_macros/src/alloc_error_handler.rs +++ b/compiler/rustc_builtin_macros/src/alloc_error_handler.rs @@ -80,7 +80,7 @@ fn generate_handler(cx: &ExtCtxt<'_>, handler: Ident, span: Span, sig_span: Span let params = thin_vec![cx.param(span, size, ty_usize.clone()), cx.param(span, align, ty_usize)]; let decl = cx.fn_decl(params, never); let header = FnHeader { safety: Safety::Unsafe(span), ..FnHeader::default() }; - let sig = FnSig { decl, header, span: span }; + let sig = FnSig { decl, header, span }; let body = Some(cx.block_expr(call)); let kind = ItemKind::Fn(Box::new(Fn { diff --git a/compiler/rustc_query_system/src/query/job.rs b/compiler/rustc_query_system/src/query/job.rs index 761d6acdbaeb9..ca3efc11201e1 100644 --- a/compiler/rustc_query_system/src/query/job.rs +++ b/compiler/rustc_query_system/src/query/job.rs @@ -588,7 +588,7 @@ pub fn report_cycle<'a>( cycle_stack, stack_bottom: stack[0].query.description.to_owned(), alias, - cycle_usage: cycle_usage, + cycle_usage, stack_count, note_span: (), }; diff --git a/tests/ui-fulldeps/regions-mock-tcx.rs b/tests/ui-fulldeps/regions-mock-tcx.rs index 71c0aa2d59629..a342bebd176d1 100644 --- a/tests/ui-fulldeps/regions-mock-tcx.rs +++ b/tests/ui-fulldeps/regions-mock-tcx.rs @@ -59,11 +59,11 @@ struct TypeContext<'tcx, 'ast> { impl<'tcx,'ast> TypeContext<'tcx, 'ast> { fn new(ty_arena: &'tcx TyArena<'tcx>, ast_arena: &'ast AstArena<'ast>) -> TypeContext<'tcx, 'ast> { - TypeContext { ty_arena: ty_arena, + TypeContext { ty_arena, types: Vec::new(), type_table: HashMap::new(), - ast_arena: ast_arena, + ast_arena, ast_counter: 0 } } diff --git a/tests/ui/drop/dropck_legal_cycles.rs b/tests/ui/drop/dropck_legal_cycles.rs index 8acf98a03b51d..70abbe713d8fe 100644 --- a/tests/ui/drop/dropck_legal_cycles.rs +++ b/tests/ui/drop/dropck_legal_cycles.rs @@ -450,7 +450,7 @@ struct S<'a> { impl<'a> Named for S<'a> { fn new(name: &'static str) -> S<'a> { - S { name: name, mark: Cell::new(0), next: Cell::new(None) } + S { name, mark: Cell::new(0), next: Cell::new(None) } } fn name(&self) -> &str { self.name } } @@ -468,7 +468,7 @@ struct S2<'a> { impl<'a> Named for S2<'a> { fn new(name: &'static str) -> S2<'a> { - S2 { name: name, mark: Cell::new(0), next: Cell::new((None, None)) } + S2 { name, mark: Cell::new(0), next: Cell::new((None, None)) } } fn name(&self) -> &str { self.name } } @@ -488,7 +488,7 @@ struct V<'a> { impl<'a> Named for V<'a> { fn new(name: &'static str) -> V<'a> { - V { name: name, + V { name, mark: Cell::new(0), contents: vec![Cell::new(None), Cell::new(None)] } @@ -510,7 +510,7 @@ struct H<'a> { impl<'a> Named for H<'a> { fn new(name: &'static str) -> H<'a> { - H { name: name, mark: Cell::new(0), next: Cell::new(None) } + H { name, mark: Cell::new(0), next: Cell::new(None) } } fn name(&self) -> &str { self.name } } @@ -541,7 +541,7 @@ struct HM<'a> { impl<'a> Named for HM<'a> { fn new(name: &'static str) -> HM<'a> { - HM { name: name, + HM { name, mark: Cell::new(0), contents: Cell::new(None) } @@ -575,7 +575,7 @@ struct VD<'a> { impl<'a> Named for VD<'a> { fn new(name: &'static str) -> VD<'a> { - VD { name: name, + VD { name, mark: Cell::new(0), contents: Cell::new(None) } @@ -596,7 +596,7 @@ struct VM<'a> { impl<'a> Named for VM<'a> { fn new(name: &'static str) -> VM<'a> { - VM { name: name, + VM { name, mark: Cell::new(0), contents: Cell::new(None) } @@ -617,7 +617,7 @@ struct LL<'a> { impl<'a> Named for LL<'a> { fn new(name: &'static str) -> LL<'a> { - LL { name: name, + LL { name, mark: Cell::new(0), contents: Cell::new(None) } @@ -638,7 +638,7 @@ struct BH<'a> { impl<'a> Named for BH<'a> { fn new(name: &'static str) -> BH<'a> { - BH { name: name, + BH { name, mark: Cell::new(0), contents: Cell::new(None) } @@ -679,7 +679,7 @@ struct BTM<'a> { impl<'a> Named for BTM<'a> { fn new(name: &'static str) -> BTM<'a> { - BTM { name: name, + BTM { name, mark: Cell::new(0), contents: Cell::new(None) } @@ -720,7 +720,7 @@ struct BTS<'a> { impl<'a> Named for BTS<'a> { fn new(name: &'static str) -> BTS<'a> { - BTS { name: name, + BTS { name, mark: Cell::new(0), contents: Cell::new(None) } @@ -765,7 +765,7 @@ struct RCRC<'a>(Rc>>); impl<'a> Named for RCRC<'a> { fn new(name: &'static str) -> Self { RCRC(Rc::new(RefCell::new(RCRCData { - name: name, mark: Cell::new(0), children: (None, None), }))) + name, mark: Cell::new(0), children: (None, None), }))) } fn name(&self) -> &str { self.0.borrow().name } } @@ -802,7 +802,7 @@ struct ARCRC<'a>(Arc>>); impl<'a> Named for ARCRC<'a> { fn new(name: &'static str) -> Self { ARCRC(Arc::new(RefCell::new(ARCRCData { - name: name, mark: Cell::new(0), children: (None, None), }))) + name, mark: Cell::new(0), children: (None, None), }))) } fn name(&self) -> &str { self.0.borrow().name } } @@ -885,7 +885,7 @@ struct ARCRW<'a>(Arc>>); impl<'a> Named for ARCRW<'a> { fn new(name: &'static str) -> Self { ARCRW(Arc::new(RwLock::new(ARCRWData { - name: name, mark: Cell::new(0), children: (None, None), }))) + name, mark: Cell::new(0), children: (None, None), }))) } fn name(&self) -> &str { self.0.read().unwrap().name } }