2022-09-11 06:58:11 +00:00
|
|
|
// issue #101663
|
|
|
|
|
|
|
|
#![feature(return_position_impl_trait_in_trait)]
|
|
|
|
#![allow(incomplete_features)]
|
|
|
|
|
2023-06-30 20:05:17 +00:00
|
|
|
use std::fmt::Display;
|
|
|
|
|
2023-03-23 23:30:13 +00:00
|
|
|
trait Wf<T> {
|
|
|
|
type Output;
|
|
|
|
}
|
2022-09-11 06:58:11 +00:00
|
|
|
|
2023-06-30 20:05:17 +00:00
|
|
|
struct NeedsDisplay<T: Display>(T);
|
|
|
|
|
2022-09-11 06:58:11 +00:00
|
|
|
trait Uwu {
|
|
|
|
fn nya() -> impl Wf<Vec<[u8]>>;
|
|
|
|
//~^ ERROR the size for values of type `[u8]` cannot be known at compilation time
|
|
|
|
|
|
|
|
fn nya2() -> impl Wf<[u8]>;
|
|
|
|
//~^ ERROR the size for values of type `[u8]` cannot be known at compilation time
|
2023-03-23 23:30:13 +00:00
|
|
|
|
|
|
|
fn nya3() -> impl Wf<(), Output = impl Wf<Vec<[u8]>>>;
|
|
|
|
//~^ ERROR the size for values of type `[u8]` cannot be known at compilation time
|
2023-06-30 20:05:17 +00:00
|
|
|
|
|
|
|
fn nya4<T>() -> impl Wf<NeedsDisplay<T>>;
|
|
|
|
//~^ ERROR `T` doesn't implement `std::fmt::Display`
|
2022-09-11 06:58:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|