File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 1+ #![ cfg_attr( bootstrap, feature( let_else) ) ]
12#![ allow( clippy:: useless_format, clippy:: derive_partial_eq_without_eq, rustc:: internal) ]
23
34#[ macro_use]
Original file line number Diff line number Diff line change 1010#![ feature( is_some_with) ]
1111#![ feature( nonzero_ops) ]
1212#![ feature( local_key_cell_methods) ]
13+ #![ cfg_attr( bootstrap, feature( let_else) ) ]
1314// Configure clippy and other lints
1415#![ allow(
1516 clippy:: collapsible_else_if,
Original file line number Diff line number Diff line change 1+ #![ feature( type_alias_impl_trait) ]
2+
3+ trait T { type Item ; }
4+
5+ type Alias < ' a > = impl T < Item = & ' a ( ) > ;
6+
7+ struct S ;
8+ impl < ' a > T for & ' a S {
9+ type Item = & ' a ( ) ;
10+ }
11+
12+ fn filter_positive < ' a > ( ) -> Alias < ' a > {
13+ & S
14+ }
15+
16+ fn with_positive ( fun : impl Fn ( Alias < ' _ > ) ) {
17+ fun ( filter_positive ( ) ) ;
18+ }
19+
20+ fn main ( ) {
21+ with_positive ( |_| ( ) ) ;
22+ }
You can’t perform that action at this time.
0 commit comments