forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rustdoc: synthetic auto: filter out clauses from the implementor's Pa…
…ramEnv not just the ones from the elaborated clauses.
- Loading branch information
Showing
2 changed files
with
15 additions
and
1 deletion.
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,14 @@ | ||
// Check that we don't add bounds to synthetic auto trait impls that are | ||
// already implied by the item (like supertrait bounds). | ||
|
||
// In this case we don't want to add the bounds `T: Copy` and `T: 'static` | ||
// to the auto trait impl because they're implied by the bound `T: Bound` | ||
// on the implementor `Type`. | ||
|
||
pub struct Type<T: Bound>(T); | ||
|
||
// @has supertrait_bounds/struct.Type.html | ||
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \ | ||
// "impl<T> Send for Type<T>where T: Send," | ||
|
||
pub trait Bound: Copy + 'static {} |