rust/tests/ui/cast/ptr-to-trait-obj-add-super-auto.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
182 B
Rust
Raw Normal View History

//@ check-pass
trait Trait: Send {}
impl Trait for () {}
fn main() {
// This is OK: `Trait` has `Send` super trait.
&() as *const dyn Trait as *const (dyn Trait + Send);
}