2019-07-27 00:54:25 +03:00
|
|
|
// run-pass
|
|
|
|
|
2018-09-14 12:20:28 +02:00
|
|
|
#![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.
|
|
|
|
|
2015-03-22 13:13:15 -07:00
|
|
|
// pretty-expanded FIXME #23616
|
|
|
|
|
2015-02-12 10:29:52 -05:00
|
|
|
use std::marker;
|
|
|
|
|
2013-08-16 18:21:02 -04:00
|
|
|
trait Foo : Send { }
|
|
|
|
|
2015-02-12 10:29:52 -05:00
|
|
|
struct X<T> { marker: marker::PhantomData<T> }
|
2013-08-16 18:21:02 -04:00
|
|
|
|
2015-02-12 10:29:52 -05:00
|
|
|
impl<T:Send> Foo for X<T> { }
|
2013-08-16 18:21:02 -04:00
|
|
|
|
2013-09-25 00:43:37 -07:00
|
|
|
pub fn main() { }
|