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) ) ]
1
2
#![ allow( clippy:: useless_format, clippy:: derive_partial_eq_without_eq, rustc:: internal) ]
2
3
3
4
#[ macro_use]
Original file line number Diff line number Diff line change 10
10
#![ feature( is_some_with) ]
11
11
#![ feature( nonzero_ops) ]
12
12
#![ feature( local_key_cell_methods) ]
13
+ #![ cfg_attr( bootstrap, feature( let_else) ) ]
13
14
// Configure clippy and other lints
14
15
#![ allow(
15
16
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