diff options
Diffstat (limited to '')
-rw-r--r-- | tests/rustdoc/rfc-2632-const-trait-impl.rs | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/tests/rustdoc/rfc-2632-const-trait-impl.rs b/tests/rustdoc/rfc-2632-const-trait-impl.rs index 5d742dc39..7f56b2ffe 100644 --- a/tests/rustdoc/rfc-2632-const-trait-impl.rs +++ b/tests/rustdoc/rfc-2632-const-trait-impl.rs @@ -5,6 +5,8 @@ // To future blessers: make sure that `const_trait_impl` is // stabilized when changing `@!has` to `@has`, and please do // not remove this test. +// +// FIXME(effects) add `const_trait` to `Fn` so we use `~const` #![feature(const_trait_impl)] #![crate_name = "foo"] @@ -22,9 +24,9 @@ pub trait Tr<T> { // @has - '//section[@id="method.a"]/h4[@class="code-header"]/a[@class="trait"]' 'Fn' // @!has - '//section[@id="method.a"]/h4[@class="code-header"]/span[@class="where"]' '~const' // @has - '//section[@id="method.a"]/h4[@class="code-header"]/span[@class="where fmt-newline"]' ': Fn' - fn a<A: ~const Fn() + ~const Destruct>() + fn a<A: /* ~const */ Fn() + ~const Destruct>() where - Option<A>: ~const Fn() + ~const Destruct, + Option<A>: /* ~const */ Fn() + ~const Destruct, { } } @@ -34,13 +36,13 @@ pub trait Tr<T> { // @has - '//section[@id="impl-Tr%3CT%3E-for-T"]/h3[@class="code-header"]/a[@class="trait"]' 'Fn' // @!has - '//section[@id="impl-Tr%3CT%3E-for-T"]/h3[@class="code-header"]/span[@class="where"]' '~const' // @has - '//section[@id="impl-Tr%3CT%3E-for-T"]/h3[@class="code-header"]/span[@class="where fmt-newline"]' ': Fn' -impl<T: ~const Fn() + ~const Destruct> const Tr<T> for T +impl<T: /* ~const */ Fn() + ~const Destruct> const Tr<T> for T where - Option<T>: ~const Fn() + ~const Destruct, + Option<T>: /* ~const */ Fn() + ~const Destruct, { - fn a<A: ~const Fn() + ~const Destruct>() + fn a<A: /* ~const */ Fn() + ~const Destruct>() where - Option<A>: ~const Fn() + ~const Destruct, + Option<A>: /* ~const */ Fn() + ~const Destruct, { } } @@ -49,9 +51,9 @@ where // @has - '//pre[@class="rust item-decl"]/code/a[@class="trait"]' 'Fn' // @!has - '//pre[@class="rust item-decl"]/code/span[@class="where fmt-newline"]' '~const' // @has - '//pre[@class="rust item-decl"]/code/span[@class="where fmt-newline"]' ': Fn' -pub const fn foo<F: ~const Fn() + ~const Destruct>() +pub const fn foo<F: /* ~const */ Fn() + ~const Destruct>() where - Option<F>: ~const Fn() + ~const Destruct, + Option<F>: /* ~const */ Fn() + ~const Destruct, { F::a() } @@ -61,9 +63,9 @@ impl<T> S<T> { // @has - '//section[@id="method.foo"]/h4[@class="code-header"]/a[@class="trait"]' 'Fn' // @!has - '//section[@id="method.foo"]/h4[@class="code-header"]/span[@class="where"]' '~const' // @has - '//section[@id="method.foo"]/h4[@class="code-header"]/span[@class="where fmt-newline"]' ': Fn' - pub const fn foo<B, C: ~const Fn() + ~const Destruct>() + pub const fn foo<B, C: /* ~const */ Fn() + ~const Destruct>() where - B: ~const Fn() + ~const Destruct, + B: /* ~const */ Fn() + ~const Destruct, { B::a() } |