rust/tests/ui/builtin-superkinds/builtin-superkinds-phantom-typaram.rs

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

19 lines
390 B
Rust
Raw Normal View History

// run-pass
#![allow(dead_code)]
2014-08-01 18:42:13 -05:00
// Tests that even when a type parameter doesn't implement a required
2013-08-19 16:15:25 -05:00
// super-builtin-kind of a trait, if the type parameter is never used,
// the type can implement the trait anyway.
// pretty-expanded FIXME #23616
use std::marker;
2013-08-16 17:21:02 -05:00
trait Foo : Send { }
struct X<T> { marker: marker::PhantomData<T> }
2013-08-16 17:21:02 -05:00
impl<T:Send> Foo for X<T> { }
2013-08-16 17:21:02 -05:00
pub fn main() { }