Make Ty wrap TyKind in an Arc

... like it will be in Chalk. We still keep `interned_mut` and
`into_inner` methods that will probably not exist with Chalk.

This worsens performance slightly (5ginstr inference on RA), but doesn't
include other simplifications we can do yet.
This commit is contained in:
Florian Diebold 2021-03-14 17:25:29 +01:00
parent 1954147834
commit af466f8542
8 changed files with 53 additions and 27 deletions

View file

@ -800,7 +800,7 @@ impl<'a> InferenceContext<'a> {
// we don't even make an attempt at coercion
self.table.new_maybe_never_var()
} else {
self.coerce(&Ty::unit(), expected.coercion_target());
self.coerce(&Ty::unit(), &expected.coercion_target());
Ty::unit()
}
};