Adjust tests
This commit is contained in:
parent
f918b89f61
commit
38c05a68ee
8 changed files with 53 additions and 27 deletions
|
|
@ -1243,7 +1243,9 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
self.infcx.tcx.trait_is_coinductive(data.def_id())
|
||||
}
|
||||
ty::PredicateKind::Clause(ty::ClauseKind::WellFormed(_)) => {
|
||||
// TODO: GCE is going away
|
||||
// FIXME(generic_const_exprs): GCE needs well-formedness predicates to be
|
||||
// coinductive, but GCE is on the way out anyways, so this should eventually
|
||||
// be replaced with `false`.
|
||||
self.infcx.tcx.features().generic_const_exprs()
|
||||
}
|
||||
_ => false,
|
||||
|
|
|
|||
|
|
@ -1,16 +0,0 @@
|
|||
//@ known-bug: #123456
|
||||
|
||||
trait Project {
|
||||
const SELF: Self;
|
||||
}
|
||||
|
||||
fn take1(
|
||||
_: Project<
|
||||
SELF = {
|
||||
j2.join().unwrap();
|
||||
},
|
||||
>,
|
||||
) {
|
||||
}
|
||||
|
||||
pub fn main() {}
|
||||
|
|
@ -1,5 +1,8 @@
|
|||
//@ check-pass
|
||||
// This was originally a test for a `ReEmpty` ICE, but became an unintentional test of
|
||||
// the coinductiveness of WF predicates. That behavior was removed, and thus this is
|
||||
// also inadvertently a test for the (non-)co-inductiveness of WF predicates.
|
||||
|
||||
pub struct Bar<'a>(&'a Self) where Self: ;
|
||||
//~^ ERROR overflow evaluating the requirement `Bar<'a> well-formed`
|
||||
|
||||
fn main() {}
|
||||
|
|
|
|||
15
tests/ui/associated-types/issue-64855-2.stderr
Normal file
15
tests/ui/associated-types/issue-64855-2.stderr
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
error[E0275]: overflow evaluating the requirement `Bar<'a> well-formed`
|
||||
--> $DIR/issue-64855-2.rs:5:36
|
||||
|
|
||||
LL | pub struct Bar<'a>(&'a Self) where Self: ;
|
||||
| ^^^^
|
||||
|
|
||||
note: required by a bound in `Bar`
|
||||
--> $DIR/issue-64855-2.rs:5:36
|
||||
|
|
||||
LL | pub struct Bar<'a>(&'a Self) where Self: ;
|
||||
| ^^^^ required by this bound in `Bar`
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0275`.
|
||||
|
|
@ -1,8 +1,13 @@
|
|||
// This was originally a test for a `ReEmpty` ICE, but became an unintentional test of
|
||||
// the coinductiveness of WF predicates. That behavior was removed, and thus this is
|
||||
// also inadvertently a test for the (non-)co-inductiveness of WF predicates.
|
||||
|
||||
pub trait Foo {
|
||||
type Type;
|
||||
}
|
||||
|
||||
pub struct Bar<T>(<Self as Foo>::Type) where Self: ;
|
||||
//~^ ERROR the trait bound `Bar<T>: Foo` is not satisfied
|
||||
//~| ERROR overflow evaluating the requirement `Bar<T> well-formed`
|
||||
|
||||
fn main() {}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,23 @@
|
|||
error[E0277]: the trait bound `Bar<T>: Foo` is not satisfied
|
||||
--> $DIR/issue-64855.rs:5:19
|
||||
--> $DIR/issue-64855.rs:9:19
|
||||
|
|
||||
LL | pub struct Bar<T>(<Self as Foo>::Type) where Self: ;
|
||||
| ^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `Bar<T>`
|
||||
|
|
||||
help: this trait has no implementations, consider adding one
|
||||
--> $DIR/issue-64855.rs:1:1
|
||||
--> $DIR/issue-64855.rs:5:1
|
||||
|
|
||||
LL | pub trait Foo {
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error[E0275]: overflow evaluating the requirement `Bar<T> well-formed`
|
||||
--> $DIR/issue-64855.rs:5:46
|
||||
--> $DIR/issue-64855.rs:9:46
|
||||
|
|
||||
LL | pub struct Bar<T>(<Self as Foo>::Type) where Self: ;
|
||||
| ^^^^
|
||||
|
|
||||
note: required by a bound in `Bar`
|
||||
--> $DIR/issue-64855.rs:5:46
|
||||
--> $DIR/issue-64855.rs:9:46
|
||||
|
|
||||
LL | pub struct Bar<T>(<Self as Foo>::Type) where Self: ;
|
||||
| ^^^^ required by this bound in `Bar`
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
//@ revisions: old next
|
||||
//@[next] compile-flags: -Znext-solver
|
||||
//@[old] check-pass
|
||||
//@[next] known-bug: #109764
|
||||
|
||||
// This used to be a test for overflow handling + higher-ranked outlives
|
||||
// in the new solver, but this test isn't expected to pass since WF preds
|
||||
// are not coinductive anymore.
|
||||
|
||||
pub struct Bar
|
||||
where
|
||||
for<'a> &'a mut Self:;
|
||||
//~^ ERROR overflow evaluating the requirement `for<'a> &'a mut Bar well-formed`
|
||||
|
||||
fn main() {}
|
||||
|
|
|
|||
18
tests/ui/higher-ranked/trait-bounds/issue-95230.stderr
Normal file
18
tests/ui/higher-ranked/trait-bounds/issue-95230.stderr
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
error[E0275]: overflow evaluating the requirement `for<'a> &'a mut Bar well-formed`
|
||||
--> $DIR/issue-95230.rs:7:13
|
||||
|
|
||||
LL | for<'a> &'a mut Self:;
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
||||
note: required by a bound in `Bar`
|
||||
--> $DIR/issue-95230.rs:7:13
|
||||
|
|
||||
LL | pub struct Bar
|
||||
| --- required by a bound in this struct
|
||||
LL | where
|
||||
LL | for<'a> &'a mut Self:;
|
||||
| ^^^^^^^^^^^^ required by this bound in `Bar`
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0275`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue