1
Fork 0

Rollup merge of #104786 - WaffleLapkin:amp-mut-help, r=compiler-errors

Use the power of adding helper function to simplify code w/ `Mutability`

r? `@compiler-errors`
This commit is contained in:
Guillaume Gomez 2022-11-26 17:47:23 +01:00 committed by GitHub
commit a2e485c25c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 144 additions and 218 deletions

View file

@ -622,7 +622,7 @@ impl<'tcx> Printer<'tcx> for &mut SymbolMangler<'tcx> {
});
match inner_ty.kind() {
ty::Str if *mutbl == hir::Mutability::Not => {
ty::Str if mutbl.is_not() => {
match ct.kind() {
ty::ConstKind::Value(valtree) => {
let slice =