2024-02-16 20:02:50 +00:00
|
|
|
//@ run-pass
|
2019-07-26 21:54:25 +00:00
|
|
|
|
2018-09-14 10:20:28 +00:00
|
|
|
#![allow(dead_code)]
|
2014-08-01 23:42:13 +00:00
|
|
|
// Tests that even when a type parameter doesn't implement a required
|
2013-08-19 21:15:25 +00:00
|
|
|
// super-builtin-kind of a trait, if the type parameter is never used,
|
|
|
|
// the type can implement the trait anyway.
|
|
|
|
|
2024-02-16 20:02:50 +00:00
|
|
|
//@ pretty-expanded FIXME #23616
|
2015-03-22 20:13:15 +00:00
|
|
|
|
2015-02-12 15:29:52 +00:00
|
|
|
use std::marker;
|
|
|
|
|
2013-08-16 22:21:02 +00:00
|
|
|
trait Foo : Send { }
|
|
|
|
|
2015-02-12 15:29:52 +00:00
|
|
|
struct X<T> { marker: marker::PhantomData<T> }
|
2013-08-16 22:21:02 +00:00
|
|
|
|
2015-02-12 15:29:52 +00:00
|
|
|
impl<T:Send> Foo for X<T> { }
|
2013-08-16 22:21:02 +00:00
|
|
|
|
2013-09-25 07:43:37 +00:00
|
|
|
pub fn main() { }
|