]> git.lizzy.rs Git - rust.git/blob - tests/ui/builtin-superkinds/builtin-superkinds-phantom-typaram.rs
Rollup merge of #106566 - clubby789:contiguous-weird-unicode, r=cjgillot
[rust.git] / tests / ui / builtin-superkinds / builtin-superkinds-phantom-typaram.rs
1 // run-pass
2
3 #![allow(dead_code)]
4 // Tests that even when a type parameter doesn't implement a required
5 // super-builtin-kind of a trait, if the type parameter is never used,
6 // the type can implement the trait anyway.
7
8 // pretty-expanded FIXME #23616
9
10 use std::marker;
11
12 trait Foo : Send { }
13
14 struct X<T> { marker: marker::PhantomData<T> }
15
16 impl<T:Send> Foo for X<T> { }
17
18 pub fn main() { }