1
Fork 0

Add another case of fallback to () avoid breakage

This adds src/test/ui/never_type/fallback-closure-ret.rs as a test case which
showcases the failure mode fixed by this commit.
This commit is contained in:
Mark Rousskov 2021-04-26 19:00:55 -04:00
parent 59dc2013e2
commit 078e3fd4ba
9 changed files with 239 additions and 9 deletions

View file

@ -1,5 +1,6 @@
use crate::infer::InferCtxt;
use crate::traits::Obligation;
use rustc_data_structures::fx::FxHashMap;
use rustc_hir as hir;
use rustc_hir::def_id::DefId;
use rustc_middle::ty::{self, ToPredicate, Ty, WithConstness};
@ -73,6 +74,8 @@ pub trait TraitEngine<'tcx>: 'tcx {
}
fn pending_obligations(&self) -> Vec<PredicateObligation<'tcx>>;
fn relationships(&mut self) -> &mut FxHashMap<ty::TyVid, ty::FoundRelationships>;
}
pub trait TraitEngineExt<'tcx> {