2023-07-22 05:20:17 -05:00
|
|
|
#![crate_name = "user"]
|
|
|
|
//@ aux-crate:rpitit=ret-pos-impl-trait-in-trait.rs
|
|
|
|
//@ edition:2021
|
|
|
|
|
|
|
|
// Test that we can correctly render cross-crate RPITITs.
|
|
|
|
// In particular, check that we don't render the internal associated type generated by
|
|
|
|
// their desugaring. We count the number of associated items and ensure that it is exactly one.
|
|
|
|
// This is more robust than checking for the absence of the associated type.
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has user/trait.Trait.html
|
|
|
|
//@ has - '//*[@id="method.create"]' 'fn create() -> impl Iterator<Item = u64>'
|
2023-07-22 05:20:17 -05:00
|
|
|
// The class "method" is used for all three kinds of associated items at the time of writing.
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ count - '//*[@id="main-content"]//section[@class="method"]' 1
|
2023-07-22 05:20:17 -05:00
|
|
|
pub use rpitit::Trait;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has user/struct.Basic.html
|
|
|
|
//@ has - '//*[@id="method.create"]' 'fn create() -> impl Iterator<Item = u64>'
|
|
|
|
//@ count - '//*[@id="trait-implementations-list"]//*[@class="impl-items"]' 1
|
2023-07-22 05:20:17 -05:00
|
|
|
pub use rpitit::Basic;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has user/struct.Intermediate.html
|
|
|
|
//@ has - '//*[@id="method.create"]' 'fn create() -> Range<u64>'
|
|
|
|
//@ count - '//*[@id="trait-implementations-list"]//*[@class="impl-items"]' 1
|
2023-07-22 05:20:17 -05:00
|
|
|
pub use rpitit::Intermediate;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has user/struct.Advanced.html
|
|
|
|
//@ has - '//*[@id="method.create"]' 'fn create() -> impl Iterator<Item = u64>'
|
|
|
|
//@ count - '//*[@id="trait-implementations-list"]//*[@class="impl-items"]' 1
|
2023-07-22 05:20:17 -05:00
|
|
|
pub use rpitit::Advanced;
|
|
|
|
|
|
|
|
// Regression test for issue #113929:
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has user/trait.Def.html
|
|
|
|
//@ has - '//*[@id="method.def"]' 'fn def<T>() -> impl Default'
|
2023-07-22 05:20:17 -05:00
|
|
|
pub use rpitit::Def;
|