granite-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 19:42:13 -04:00
// Tests that even when a type parameter doesn't implement a required
2013-08-19 17:15:25 -04: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 18:21:02 -04:00
trait Foo : Send { }
struct X<T> { marker: marker::PhantomData<T> }
2013-08-16 18:21:02 -04:00
impl<T:Send> Foo for X<T> { }
2013-08-16 18:21:02 -04:00
pub fn main() { }