Add test case that evals to EvaluatedToOkModuloRegions
This commit is contained in:
parent
98e9b3283e
commit
6fe13f62c1
|
@ -9,6 +9,10 @@ fn main() {
|
|||
test::<MaskedStorage<GenericComp<Pos>>>(make());
|
||||
//~^ ERROR evaluate(Binder(TraitPredicate(<MaskedStorage<GenericComp<Pos>> as std::marker::Sized>, polarity:Positive), [])) = Ok(EvaluatedToOk)
|
||||
//~| ERROR evaluate(Binder(TraitPredicate(<MaskedStorage<GenericComp<Pos>> as std::marker::Sized>, polarity:Positive), [])) = Ok(EvaluatedToOk)
|
||||
|
||||
test::<MaskedStorage<GenericComp2<Pos>>>(make());
|
||||
//~^ ERROR evaluate(Binder(TraitPredicate(<MaskedStorage<GenericComp2<Pos>> as std::marker::Sized>, polarity:Positive), [])) = Ok(EvaluatedToOkModuloRegions)
|
||||
//~| ERROR evaluate(Binder(TraitPredicate(<MaskedStorage<GenericComp2<Pos>> as std::marker::Sized>, polarity:Positive), [])) = Ok(EvaluatedToOkModuloRegions)
|
||||
}
|
||||
|
||||
#[rustc_evaluate_where_clauses]
|
||||
|
@ -52,6 +56,15 @@ struct GenericComp<T> {
|
|||
impl<T: 'static> Component for GenericComp<T> {
|
||||
type Storage = VecStorage;
|
||||
}
|
||||
|
||||
struct GenericComp2<T> {
|
||||
_t: T,
|
||||
}
|
||||
|
||||
impl<T: 'static> Component for GenericComp2<T> where for<'a> &'a bool: 'a {
|
||||
type Storage = VecStorage;
|
||||
}
|
||||
|
||||
struct ReadData {
|
||||
pos_interpdata: ReadStorage<GenericComp<Pos>>,
|
||||
}
|
||||
|
|
|
@ -16,5 +16,23 @@ LL | test::<MaskedStorage<GenericComp<Pos>>>(make());
|
|||
LL | fn test<T: Sized>(_: T) {}
|
||||
| ----- predicate
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error: evaluate(Binder(TraitPredicate(<MaskedStorage<GenericComp2<Pos>> as std::marker::Sized>, polarity:Positive), [])) = Ok(EvaluatedToOkModuloRegions)
|
||||
--> $DIR/issue-85360-eval-obligation-ice.rs:13:5
|
||||
|
|
||||
LL | test::<MaskedStorage<GenericComp2<Pos>>>(make());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
...
|
||||
LL | fn test<T: Sized>(_: T) {}
|
||||
| - predicate
|
||||
|
||||
error: evaluate(Binder(TraitPredicate(<MaskedStorage<GenericComp2<Pos>> as std::marker::Sized>, polarity:Positive), [])) = Ok(EvaluatedToOkModuloRegions)
|
||||
--> $DIR/issue-85360-eval-obligation-ice.rs:13:5
|
||||
|
|
||||
LL | test::<MaskedStorage<GenericComp2<Pos>>>(make());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
...
|
||||
LL | fn test<T: Sized>(_: T) {}
|
||||
| ----- predicate
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
|
|
Loading…
Reference in a new issue