diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-09-11 10:31:56 +0200 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2021-09-11 10:32:38 +0200 |
| commit | 545d8d675c44a3b6fb4b840aca17fc34e885e353 (patch) | |
| tree | b946d9ee68eb9d2769fb1cca0aaaf79035471486 /compiler/rustc_hir_pretty/src | |
| parent | 22719efcc570b043f2e519d6025e5f36eab38fe2 (diff) | |
| download | rust-545d8d675c44a3b6fb4b840aca17fc34e885e353.tar.gz rust-545d8d675c44a3b6fb4b840aca17fc34e885e353.zip | |
don't convert types into identical types
example: let x: String = String::new().into();
Diffstat (limited to 'compiler/rustc_hir_pretty/src')
| -rw-r--r-- | compiler/rustc_hir_pretty/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_hir_pretty/src/lib.rs b/compiler/rustc_hir_pretty/src/lib.rs index 36054c04847..67f92bc0a51 100644 --- a/compiler/rustc_hir_pretty/src/lib.rs +++ b/compiler/rustc_hir_pretty/src/lib.rs @@ -1036,7 +1036,7 @@ impl<'a> State<'a> { self.maybe_print_comment(st.span.lo()); match st.kind { hir::StmtKind::Local(ref loc) => { - self.print_local(loc.init.as_deref(), |this| this.print_local_decl(&loc)); + self.print_local(loc.init, |this| this.print_local_decl(&loc)); } hir::StmtKind::Item(item) => self.ann.nested(self, Nested::Item(item)), hir::StmtKind::Expr(ref expr) => { |
