diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-01-02 20:09:17 +0100 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2021-01-02 20:09:17 +0100 |
| commit | 8a90626a4608907a7be01dd0c9f9d7cfeb63e2f9 (patch) | |
| tree | 24487a0744e7067e455bbb997418c925ef7bf553 /compiler/rustc_passes/src | |
| parent | 90ccf4f5adfb2562fc95c996b97faac7775a34bb (diff) | |
| download | rust-8a90626a4608907a7be01dd0c9f9d7cfeb63e2f9.tar.gz rust-8a90626a4608907a7be01dd0c9f9d7cfeb63e2f9.zip | |
reduce borrowing and (de)referencing around match patterns (clippy::match_ref_pats)
Diffstat (limited to 'compiler/rustc_passes/src')
| -rw-r--r-- | compiler/rustc_passes/src/naked_functions.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_passes/src/naked_functions.rs b/compiler/rustc_passes/src/naked_functions.rs index 5b50ef8627b..788f1df328c 100644 --- a/compiler/rustc_passes/src/naked_functions.rs +++ b/compiler/rustc_passes/src/naked_functions.rs @@ -149,7 +149,7 @@ impl<'tcx> Visitor<'tcx> for CheckParameters<'tcx> { fn check_asm<'tcx>(tcx: TyCtxt<'tcx>, hir_id: HirId, body: &'tcx hir::Body<'tcx>, fn_span: Span) { let mut this = CheckInlineAssembly { tcx, items: Vec::new() }; this.visit_body(body); - if let &[(ItemKind::Asm, _)] = &this.items[..] { + if let [(ItemKind::Asm, _)] = this.items[..] { // Ok. } else { tcx.struct_span_lint_hir(UNSUPPORTED_NAKED_FUNCTIONS, hir_id, fn_span, |lint| { |
