-
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.
Auto merge of #58927 - GuillaumeGomez:default-keyword, r=QuietMisdreavus
Add default keyword handling in rustdoc Fixes #58898. r? @QuietMisdreavus
- Loading branch information
Showing
4 changed files
with
51 additions
and
7 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
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,15 @@ | ||
#![feature(specialization)] | ||
|
||
pub trait Item { | ||
fn foo(); | ||
fn bar(); | ||
} | ||
|
||
// @has default_trait_method/trait.Item.html | ||
// @has - '//*[@id="method.foo"]' 'default fn foo()' | ||
// @has - '//*[@id="method.bar"]' 'fn bar()' | ||
// @!has - '//*[@id="method.bar"]' 'default fn bar()' | ||
impl<T: ?Sized> Item for T { | ||
default fn foo() {} | ||
fn bar() {} | ||
} |