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