make Sized
coinductive
This commit is contained in:
parent
a3c0a02361
commit
0f2e45b18f
3 changed files with 46 additions and 1 deletions
|
@ -959,7 +959,10 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
|
||||
fn coinductive_predicate(&self, predicate: ty::Predicate<'tcx>) -> bool {
|
||||
let result = match predicate.kind().skip_binder() {
|
||||
ty::PredicateKind::Trait(ref data) => self.tcx().trait_is_auto(data.def_id()),
|
||||
ty::PredicateKind::Trait(ref data) => {
|
||||
self.tcx().trait_is_auto(data.def_id())
|
||||
|| self.tcx().lang_items().sized_trait() == Some(data.def_id())
|
||||
}
|
||||
ty::PredicateKind::WellFormed(_) => true,
|
||||
_ => false,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue