File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
tests/rustdoc/synthetic_auto Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ fn clean_param_env<'tcx>(
168168
169169 // FIXME(#111101): Incorporate the explicit predicates of the item here...
170170 let item_predicates: FxIndexSet < _ > =
171- tcx. predicates_of ( item_def_id) . predicates . iter ( ) . map ( | ( pred , _ ) | pred ) . collect ( ) ;
171+ tcx. param_env ( item_def_id) . caller_bounds ( ) . iter ( ) . collect ( ) ;
172172 let where_predicates = param_env
173173 . caller_bounds ( )
174174 . iter ( )
Original file line number Diff line number Diff line change 1+ // Check that we don't add bounds to synthetic auto trait impls that are
2+ // already implied by the item (like supertrait bounds).
3+
4+ // In this case we don't want to add the bounds `T: Copy` and `T: 'static`
5+ // to the auto trait impl because they're implied by the bound `T: Bound`
6+ // on the implementor `Type`.
7+
8+ pub struct Type < T : Bound > ( T ) ;
9+
10+ // @has supertrait_bounds/struct.Type.html
11+ // @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \
12+ // "impl<T> Send for Type<T>where T: Send,"
13+
14+ pub trait Bound : Copy + ' static { }
You can’t perform that action at this time.
0 commit comments