mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-17 07:45:58 +00:00
When printing impl headers in a diagnostic, the compiler has to account for `?Sized` implying `MetaSized` and new `MetaSized` and `PointeeSized` bounds.
20 lines
348 B
Rust
20 lines
348 B
Rust
#![feature(sized_hierarchy)]
|
|
|
|
use std::marker::{MetaSized, PointeeSized};
|
|
|
|
pub trait SizedTr {}
|
|
|
|
impl<T: Sized> SizedTr for T {}
|
|
|
|
pub trait NegSizedTr {}
|
|
|
|
impl<T: ?Sized> NegSizedTr for T {}
|
|
|
|
pub trait MetaSizedTr {}
|
|
|
|
impl<T: MetaSized> MetaSizedTr for T {}
|
|
|
|
pub trait PointeeSizedTr: PointeeSized {}
|
|
|
|
impl<T: PointeeSized> PointeeSizedTr for T {}
|