提交 e7ed8fe4 编写于 作者: N Niko Matsakis

add regression tests found in crater

上级 e93e1051
// 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() {}
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 @@ fn call_connect<C>(c: &'_ C) -> impl '_ + Future + Send
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<'_>>
//
......
// 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() {}
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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册