diff options
Diffstat (limited to 'tests/rustdoc/inline_cross/assoc_item_trait_bounds.rs')
-rw-r--r-- | tests/rustdoc/inline_cross/assoc_item_trait_bounds.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/rustdoc/inline_cross/assoc_item_trait_bounds.rs b/tests/rustdoc/inline_cross/assoc_item_trait_bounds.rs index db2491b87..74ceb697a 100644 --- a/tests/rustdoc/inline_cross/assoc_item_trait_bounds.rs +++ b/tests/rustdoc/inline_cross/assoc_item_trait_bounds.rs @@ -42,3 +42,15 @@ pub use aux::Main; // @has main/trait.Aid.html // @has - '//*[@id="associatedtype.Result"]' "type Result<'inter: 'src>" pub use aux::Aid; + +// Below, ensure that we correctly display generic parameters and where-clauses on +// associated types inside trait *impls*. More particularly, check that we don't render +// any bounds (here `Self::Alias<T>: ...`) as item bounds unlike all the trait test cases above. + +// @has main/struct.Implementor.html +// @has - '//*[@id="associatedtype.Alias"]' \ +// "type Alias<T: Eq> = T \ +// where \ +// String: From<T>, \ +// <Implementor as Implementee>::Alias<T>: From<<Implementor as Implementee>::Alias<T>>" +pub use aux::Implementor; |