mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-03 13:37:37 +00:00
14 lines
235 B
Rust
14 lines
235 B
Rust
![]() |
//@ check-pass
|
||
|
|
||
|
// Make sure that we don't enforce that an RPIT that has `where Self: Sized` is pointer-like.
|
||
|
|
||
|
trait Foo {
|
||
|
fn foo() -> impl Sized where Self: Sized {}
|
||
|
}
|
||
|
|
||
|
impl Foo for () {}
|
||
|
|
||
|
fn main() {
|
||
|
let x: &dyn Foo = &();
|
||
|
}
|