mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
4ac90e286b
when param type has default and type in trait is generic.
21 lines
487 B
Rust
21 lines
487 B
Rust
// issue: 120878
|
|
fn main() {
|
|
struct StructA<A, B = A> {
|
|
_marker: std::marker::PhantomData<fn() -> (A, B)>,
|
|
}
|
|
|
|
struct StructB {
|
|
a: StructA<isize, [u8]>,
|
|
//~^ ERROR: the size for values of type `[u8]` cannot be known at compilation time [E0277]
|
|
}
|
|
|
|
trait Trait {
|
|
type P<X>;
|
|
}
|
|
|
|
impl Trait for () {
|
|
type P<X> = [u8];
|
|
//~^ ERROR: the size for values of type `[u8]` cannot be known at compilation time [E0277]
|
|
}
|
|
}
|