2024-06-05 20:18:52 +00:00
|
|
|
fn missing() -> impl Sized + use<T> {}
|
2024-09-15 21:14:49 +00:00
|
|
|
//~^ ERROR cannot find type or const parameter `T` in this scope
|
2024-04-04 16:54:56 +00:00
|
|
|
|
2024-06-05 20:18:52 +00:00
|
|
|
fn missing_self() -> impl Sized + use<Self> {}
|
2024-09-15 21:14:49 +00:00
|
|
|
//~^ ERROR cannot find type or const parameter `Self` in this scope
|
2024-04-04 16:54:56 +00:00
|
|
|
|
|
|
|
struct MyType;
|
|
|
|
impl MyType {
|
2024-06-05 20:18:52 +00:00
|
|
|
fn self_is_not_param() -> impl Sized + use<Self> {}
|
2024-04-05 00:23:52 +00:00
|
|
|
//~^ ERROR `Self` can't be captured in `use<...>` precise captures list, since it is an alias
|
2024-04-04 16:54:56 +00:00
|
|
|
}
|
|
|
|
|
2024-06-05 20:18:52 +00:00
|
|
|
fn hello() -> impl Sized + use<hello> {}
|
2024-09-15 21:14:49 +00:00
|
|
|
//~^ ERROR expected type or const parameter, found function `hello`
|
|
|
|
|
|
|
|
fn arg(x: ()) -> impl Sized + use<x> {}
|
|
|
|
//~^ ERROR expected type or const parameter, found local variable `x`
|
2024-04-05 00:36:18 +00:00
|
|
|
|
2024-04-04 16:54:56 +00:00
|
|
|
fn main() {}
|