Update src/librustc_typeck/check/op.rs

Co-authored-by: Bastian Kauschke <bastian_kauschke@hotmail.de>
This commit is contained in:
Dan Aloni 2020-07-18 14:31:44 +03:00 committed by GitHub
parent 28e2756678
commit d077767ee7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -563,7 +563,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
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,
};