diff options
Diffstat (limited to 'tests/rustdoc/notable-trait')
-rw-r--r-- | tests/rustdoc/notable-trait/doc-notable_trait_box_is_not_an_iterator.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/rustdoc/notable-trait/doc-notable_trait_box_is_not_an_iterator.rs b/tests/rustdoc/notable-trait/doc-notable_trait_box_is_not_an_iterator.rs index 3fb00c7db..6b94d7994 100644 --- a/tests/rustdoc/notable-trait/doc-notable_trait_box_is_not_an_iterator.rs +++ b/tests/rustdoc/notable-trait/doc-notable_trait_box_is_not_an_iterator.rs @@ -3,25 +3,28 @@ #![feature(no_core)] #![no_core] #[lang = "owned_box"] -pub struct Box<T>; +pub struct Box<T>(*const T); impl<T> Box<T> { pub fn new(x: T) -> Box<T> { - Box + Box(std::ptr::null()) } } +#[lang = "sized"] +trait Sized {} + #[doc(notable_trait)] pub trait FakeIterator {} impl<I: FakeIterator> FakeIterator for Box<I> {} #[lang = "pin"] -pub struct Pin<T>; +pub struct Pin<T>(T); impl<T> Pin<T> { pub fn new(x: T) -> Pin<T> { - Pin + Pin(x) } } |