Skip to content

Commit

Permalink
Add back missing trait test
Browse files Browse the repository at this point in the history
Rustdoc has been able to deal with `impl trait` for almost a year now.
  • Loading branch information
jyn514 committed Apr 9, 2021
1 parent 40ca352 commit f67103b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
13 changes: 6 additions & 7 deletions src/test/rustdoc-ui/coverage/traits.rs
Expand Up @@ -2,6 +2,7 @@
// check-pass

#![feature(trait_alias)]
#![feature(min_type_alias_impl_trait)]

/// look at this trait right here
pub trait ThisTrait {
Expand Down Expand Up @@ -30,10 +31,8 @@ impl ThisTrait for SomeStruct {
/// but what about those aliases? i hear they're pretty exotic
pub trait MyAlias = ThisTrait + Send + Sync;

// FIXME(58624): once rustdoc can process opaque `impl Trait` types,
// we need to make sure they're counted
// /// woah, getting all opaque in here
// pub type ThisExists = impl ThisTrait;
//
// /// why don't we get a little more concrete
// pub fn defines() -> ThisExists { SomeStruct {} }
/// woah, getting all opaque in here
pub type ThisExists = impl ThisTrait;

/// why don't we get a little more concrete
pub fn defines() -> ThisExists { SomeStruct {} }
4 changes: 2 additions & 2 deletions src/test/rustdoc-ui/coverage/traits.stdout
@@ -1,7 +1,7 @@
+-------------------------------------+------------+------------+------------+------------+
| File | Documented | Percentage | Examples | Percentage |
+-------------------------------------+------------+------------+------------+------------+
| ...st/rustdoc-ui/coverage/traits.rs | 6 | 85.7% | 0 | 0.0% |
| ...st/rustdoc-ui/coverage/traits.rs | 8 | 88.9% | 0 | 0.0% |
+-------------------------------------+------------+------------+------------+------------+
| Total | 6 | 85.7% | 0 | 0.0% |
| Total | 8 | 88.9% | 0 | 0.0% |
+-------------------------------------+------------+------------+------------+------------+

0 comments on commit f67103b

Please sign in to comment.