add regression tests found in crater
This commit is contained in:
parent
e93e10516e
commit
e7ed8fe481
@ -0,0 +1,24 @@
|
||||
// Regression test from https://github.com/rust-lang/rust/pull/98109
|
||||
|
||||
#![feature(generic_associated_types)]
|
||||
|
||||
pub trait Get {
|
||||
type Value<'a>
|
||||
where
|
||||
Self: 'a;
|
||||
}
|
||||
|
||||
fn multiply_at<T>(x: T)
|
||||
where
|
||||
for<'a> T: Get<Value<'a> = ()>,
|
||||
{
|
||||
|| {
|
||||
//~^ `T` does not live long enough
|
||||
//
|
||||
// FIXME(#98437). This regressed at some point and
|
||||
// probably should work.
|
||||
let _x = x;
|
||||
};
|
||||
}
|
||||
|
||||
fn main() {}
|
@ -0,0 +1,14 @@
|
||||
error: `T` does not live long enough
|
||||
--> $DIR/collectivity-regression.rs:15:5
|
||||
|
|
||||
LL | / || {
|
||||
LL | |
|
||||
LL | | //
|
||||
LL | | // FIXME(#98437). This regressed at some point and
|
||||
LL | | // probably should work.
|
||||
LL | | let _x = x;
|
||||
LL | | };
|
||||
| |_____^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
@ -19,7 +19,7 @@ where
|
||||
async move { c.connect().await }
|
||||
//~^ ERROR `C` does not live long enough
|
||||
//
|
||||
// FIXME. This is because we infer at some point a value of
|
||||
// FIXME(#71723). This is because we infer at some point a value of
|
||||
//
|
||||
// impl Future<Output = <C as Client>::Connection<'_>>
|
||||
//
|
||||
|
16
src/test/ui/nll/snocat-regression.rs
Normal file
16
src/test/ui/nll/snocat-regression.rs
Normal file
@ -0,0 +1,16 @@
|
||||
// Regression test from https://github.com/rust-lang/rust/pull/98109
|
||||
|
||||
pub fn negotiate<S>(link: S)
|
||||
where
|
||||
for<'a> &'a S: 'a,
|
||||
{
|
||||
|| {
|
||||
//~^ ERROR `S` does not live long enough
|
||||
//
|
||||
// FIXME(#98437). This regressed at some point and
|
||||
// probably should work.
|
||||
let _x = link;
|
||||
};
|
||||
}
|
||||
|
||||
fn main() {}
|
14
src/test/ui/nll/snocat-regression.stderr
Normal file
14
src/test/ui/nll/snocat-regression.stderr
Normal file
@ -0,0 +1,14 @@
|
||||
error: `S` does not live long enough
|
||||
--> $DIR/snocat-regression.rs:7:5
|
||||
|
|
||||
LL | / || {
|
||||
LL | |
|
||||
LL | | //
|
||||
LL | | // FIXME(#98437). This regressed at some point and
|
||||
LL | | // probably should work.
|
||||
LL | | let _x = link;
|
||||
LL | | };
|
||||
| |_____^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
Loading…
x
Reference in New Issue
Block a user