mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 03:25:55 +00:00
16 lines
423 B
Rust
16 lines
423 B
Rust
#![feature(ptr_metadata)]
|
|
// Address issue #112737 -- ICE with dyn Pointee
|
|
extern crate core;
|
|
use core::ptr::Pointee;
|
|
|
|
fn unknown_sized_object_ptr_in(_: &(impl Pointee<Metadata = ()> + ?Sized)) {}
|
|
|
|
fn raw_pointer_in(x: &dyn Pointee<Metadata = ()>) {
|
|
unknown_sized_object_ptr_in(x)
|
|
//~^ ERROR type mismatch resolving `<dyn Pointee<Metadata = ()> as Pointee>::Metadata == ()`
|
|
}
|
|
|
|
fn main() {
|
|
raw_pointer_in(&42)
|
|
}
|