-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #81302 - LeSeulArtichaut:80777-trait-render, r=jyn514
Fix rendering of stabilization version for trait implementors Rustdoc compares an item's stabilization version with its parent's to not render it if they are the same. Here, the implementor was compared with itself, resulting in the stabilization version never getting shown. This probably needs a test. Fixes #80777. r? `@jyn514`
- Loading branch information
Showing
2 changed files
with
40 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#![crate_name = "foo"] | ||
|
||
#![feature(staged_api)] | ||
|
||
#[stable(feature = "bar", since = "OLD 1.0")] | ||
pub trait Bar {} | ||
|
||
#[stable(feature = "baz", since = "OLD 1.0")] | ||
pub trait Baz {} | ||
|
||
pub struct Foo; | ||
|
||
// @has foo/trait.Bar.html '//div[@id="implementors-list"]//span[@class="since"]' 'NEW 2.0' | ||
#[stable(feature = "foobar", since = "NEW 2.0")] | ||
impl Bar for Foo {} | ||
|
||
// @!has foo/trait.Baz.html '//div[@id="implementors-list"]//span[@class="since"]' 'OLD 1.0' | ||
#[stable(feature = "foobaz", since = "OLD 1.0")] | ||
impl Baz for Foo {} |