diff --git a/try-crate/src/main.rs b/try-crate/src/main.rs index 466cc11..36b3b6d 100644 --- a/try-crate/src/main.rs +++ b/try-crate/src/main.rs @@ -143,6 +143,13 @@ pub struct MyPhantomData { #[repr(transparent)] pub struct Wrapper(f64); +// FIXME: move bound from where clause to impl bound +// https://github.com/dtolnay/syn/issues/1238 +#[derive(TypeLayout)] +pub struct Bounded(T) +where + T: std::fmt::Debug + ~const TypeGraphLayout; + fn main() { println!("{:#?}", Foo1::TYPE_GRAPH); println!("{:#?}", Foo2::TYPE_GRAPH); @@ -197,6 +204,7 @@ fn main() { println!("{:#?}", >::TYPE_GRAPH); println!("{:#?}", ::TYPE_GRAPH); + println!("{:#?}", >::TYPE_GRAPH); non_static_ref(&0);