]> git.lizzy.rs Git - rust.git/commitdiff
Update src/librustc_typeck/check/op.rs
authorDan Aloni <alonid@gmail.com>
Sat, 18 Jul 2020 11:31:44 +0000 (14:31 +0300)
committerGitHub <noreply@github.com>
Sat, 18 Jul 2020 11:31:44 +0000 (14:31 +0300)
Co-authored-by: Bastian Kauschke <bastian_kauschke@hotmail.de>
src/librustc_typeck/check/op.rs

index 72464289713676ea072755ccecab22117d66a78c..fd516c88ec61aac2896f340e66d4baee1236c065 100644 (file)
@@ -563,7 +563,7 @@ fn check_str_addition(
                    requires ownership of the string on the left";
 
         let string_type = self.tcx.get_diagnostic_item(sym::string_type);
-        let is_std_string = |ty: Ty<'tcx>| match &ty.ty_adt_def() {
+        let is_std_string = |ty: Ty<'tcx>| match ty.ty_adt_def() {
             Some(ty_def) => Some(ty_def.did) == string_type,
             None => false,
         };