1
Fork 0

Rollup merge of #90642 - matthiaskrgr:clippy_matches, r=cjgillot

use matches!() macro in more places
This commit is contained in:
Matthias Krüger 2021-11-06 23:12:05 +01:00 committed by GitHub
commit 5f0e6ca6a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 49 additions and 86 deletions

View file

@ -124,10 +124,7 @@ fn push_debuginfo_type_name<'tcx>(
// info for MSVC debugger. However, wrapping these types' names in a synthetic type
// causes the .natvis engine for WinDbg to fail to display their data, so we opt these
// types out to aid debugging in MSVC.
let is_slice_or_str = match *inner_type.kind() {
ty::Slice(_) | ty::Str => true,
_ => false,
};
let is_slice_or_str = matches!(*inner_type.kind(), ty::Slice(_) | ty::Str);
if !cpp_like_names {
output.push('&');