Update w/ comments

Removes uses of ty() where a method is implemented on TypeFoldable, and also directly formats
a Term.
This commit is contained in:
kadmin 2022-01-11 19:18:18 +00:00
parent e7529d6a38
commit f396888c4d
10 changed files with 21 additions and 32 deletions

View file

@ -779,8 +779,7 @@ impl<'tcx> AutoTraitFinder<'tcx> {
// However, we should always make progress (either by generating
// subobligations or getting an error) when we started off with
// inference variables
if p.term().skip_binder().ty().map_or(false, |ty| ty.has_infer_types())
{
if p.term().skip_binder().ty().has_infer_types() {
panic!("Unexpected result when selecting {:?} {:?}", ty, obligation)
}
}