1 // compile-flags: --document-private-items --document-hidden-items
3 // This is a regression test for #98009.
5 // @has output_generics.json
6 // @has - "$.index[*][?(@.name=='this_compiles')]"
7 // @has - "$.index[*][?(@.name=='this_does_not')]"
8 // @has - "$.index[*][?(@.name=='Events')]"
9 // @has - "$.index[*][?(@.name=='Other')]"
10 // @has - "$.index[*][?(@.name=='Trait')]"
17 fn handle(value: T) -> Self;
20 impl<T, U> Trait<U> for T where T: From<U> {
21 fn handle(_: U) -> Self { unimplemented!() }
24 impl<'a, R> Trait<&'a mut Events<R>> for Other {
25 fn handle(_: &'a mut Events<R>) -> Self { unimplemented!() }
28 fn this_compiles<'a, R>(value: &'a mut Events<R>) {
30 Other::handle(&mut *value);
34 fn this_does_not<'a, R>(value: &'a mut Events<R>) {