File tree 4 files changed +11
-9
lines changed
4 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 12
12
CARGO_NET_RETRY : 10
13
13
CI : 1
14
14
RUST_BACKTRACE : short
15
- RUSTFLAGS : " -D warnings -W unreachable-pub"
15
+ RUSTFLAGS : " -D warnings -W unreachable-pub -W rust-2021-compatibility "
16
16
RUSTUP_MAX_RETRIES : 10
17
17
18
18
jobs :
Original file line number Diff line number Diff line change @@ -547,10 +547,10 @@ impl InFile<SyntaxToken> {
547
547
self ,
548
548
db : & dyn db:: AstDatabase ,
549
549
) -> impl Iterator < Item = InFile < SyntaxNode > > + ' _ {
550
- self . value
551
- . parent ( )
552
- . into_iter ( )
553
- . flat_map ( move |parent| InFile :: new ( self . file_id , parent ) . ancestors_with_macros ( db ) )
550
+ self . value . parent ( ) . into_iter ( ) . flat_map ( {
551
+ let file_id = self . file_id ;
552
+ move |parent| InFile :: new ( file_id , parent ) . ancestors_with_macros ( db )
553
+ } )
554
554
}
555
555
}
556
556
Original file line number Diff line number Diff line change @@ -30,16 +30,18 @@ impl<'a> RequestDispatcher<'a> {
30
30
Some ( it) => it,
31
31
None => return Ok ( self ) ,
32
32
} ;
33
- let world = panic:: AssertUnwindSafe ( & mut * self . global_state ) ;
33
+ let global_state = panic:: AssertUnwindSafe ( & mut * self . global_state ) ;
34
34
35
35
let response = panic:: catch_unwind ( move || {
36
+ let _ = & global_state;
37
+ let panic:: AssertUnwindSafe ( global_state) = global_state;
36
38
let _pctx = stdx:: panic_context:: enter ( format ! (
37
39
"\n version: {}\n request: {} {:#?}" ,
38
40
env!( "REV" ) ,
39
41
R :: METHOD ,
40
42
params
41
43
) ) ;
42
- let result = f ( world . 0 , params) ;
44
+ let result = f ( global_state , params) ;
43
45
result_to_response :: < R > ( id, result)
44
46
} )
45
47
. map_err ( |_err| format ! ( "sync task {:?} panicked" , R :: METHOD ) ) ?;
Original file line number Diff line number Diff line change @@ -420,12 +420,12 @@ impl GlobalState {
420
420
self . prime_caches_queue . request_op ( ) ;
421
421
if self . prime_caches_queue . should_start_op ( ) {
422
422
self . task_pool . handle . spawn_with_sender ( {
423
- let snap = self . snapshot ( ) ;
423
+ let analysis = self . snapshot ( ) . analysis ;
424
424
move |sender| {
425
425
let cb = |progress| {
426
426
sender. send ( Task :: PrimeCaches ( progress) ) . unwrap ( ) ;
427
427
} ;
428
- match snap . analysis . prime_caches ( cb) {
428
+ match analysis. prime_caches ( cb) {
429
429
Ok ( ( ) ) => ( ) ,
430
430
Err ( _canceled) => ( ) ,
431
431
}
You can’t perform that action at this time.
0 commit comments