File tree Expand file tree Collapse file tree 4 files changed +11
-9
lines changed Expand file tree Collapse file tree 4 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 1212 CARGO_NET_RETRY : 10
1313 CI : 1
1414 RUST_BACKTRACE : short
15- RUSTFLAGS : " -D warnings -W unreachable-pub"
15+ RUSTFLAGS : " -D warnings -W unreachable-pub -W rust-2021-compatibility "
1616 RUSTUP_MAX_RETRIES : 10
1717
1818jobs :
Original file line number Diff line number Diff line change @@ -547,10 +547,10 @@ impl InFile<SyntaxToken> {
547547 self ,
548548 db : & dyn db:: AstDatabase ,
549549 ) -> 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+ } )
554554 }
555555}
556556
Original file line number Diff line number Diff line change @@ -30,16 +30,18 @@ impl<'a> RequestDispatcher<'a> {
3030 Some ( it) => it,
3131 None => return Ok ( self ) ,
3232 } ;
33- let world = panic:: AssertUnwindSafe ( & mut * self . global_state ) ;
33+ let global_state = panic:: AssertUnwindSafe ( & mut * self . global_state ) ;
3434
3535 let response = panic:: catch_unwind ( move || {
36+ let _ = & global_state;
37+ let panic:: AssertUnwindSafe ( global_state) = global_state;
3638 let _pctx = stdx:: panic_context:: enter ( format ! (
3739 "\n version: {}\n request: {} {:#?}" ,
3840 env!( "REV" ) ,
3941 R :: METHOD ,
4042 params
4143 ) ) ;
42- let result = f ( world . 0 , params) ;
44+ let result = f ( global_state , params) ;
4345 result_to_response :: < R > ( id, result)
4446 } )
4547 . 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 {
420420 self . prime_caches_queue . request_op ( ) ;
421421 if self . prime_caches_queue . should_start_op ( ) {
422422 self . task_pool . handle . spawn_with_sender ( {
423- let snap = self . snapshot ( ) ;
423+ let analysis = self . snapshot ( ) . analysis ;
424424 move |sender| {
425425 let cb = |progress| {
426426 sender. send ( Task :: PrimeCaches ( progress) ) . unwrap ( ) ;
427427 } ;
428- match snap . analysis . prime_caches ( cb) {
428+ match analysis. prime_caches ( cb) {
429429 Ok ( ( ) ) => ( ) ,
430430 Err ( _canceled) => ( ) ,
431431 }
You can’t perform that action at this time.
0 commit comments