This repository was archived by the owner on May 28, 2025. It is now read-only.
  
  
  
  
    
    
    
      
    
  
  
    
File tree Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -742,6 +742,8 @@ pub(crate) fn adt_datum_query(
742742        phantom_data, 
743743    } ; 
744744
745+     #[ cfg( FALSE ) ]  
746+     // this slows down rust-analyzer by quite a bit unfortunately, so enabling this is currently not worth it 
745747    let  variant_id_to_fields = |id :  VariantId | { 
746748        let  variant_data = & id. variant_data ( db. upcast ( ) ) ; 
747749        let  fields = if  variant_data. fields ( ) . is_empty ( )  { 
@@ -757,6 +759,7 @@ pub(crate) fn adt_datum_query(
757759        } ; 
758760        rust_ir:: AdtVariantDatum  {  fields } 
759761    } ; 
762+     let  variant_id_to_fields = |_:  VariantId | rust_ir:: AdtVariantDatum  {  fields :  vec ! [ ]  } ; 
760763
761764    let  ( kind,  variants)  = match  adt_id { 
762765        hir_def:: AdtId :: StructId ( id)  => { 
Original file line number Diff line number Diff line change @@ -536,15 +536,17 @@ fn test() {
536536
537537#[ test]  
538538fn  coerce_unsize_generic ( )  { 
539-     check_no_mismatches ( 
539+     check ( 
540540        r#" 
541541//- minicore: coerce_unsized 
542542struct Foo<T> { t: T }; 
543543struct Bar<T>(Foo<T>); 
544544
545545fn test() { 
546546    let _: &Foo<[usize]> = &Foo { t: [1, 2, 3] }; 
547+                          //^^^^^^^^^^^^^^^^^^^^^ expected &Foo<[usize]>, got &Foo<[i32; 3]> 
547548    let _: &Bar<[usize]> = &Bar(Foo { t: [1, 2, 3] }); 
549+                          //^^^^^^^^^^^^^^^^^^^^^^^^^^ expected &Bar<[usize]>, got &Bar<[i32; 3]> 
548550} 
549551"# , 
550552    ) ; 
Original file line number Diff line number Diff line change @@ -4583,21 +4583,21 @@ fn f<T: Send, U>() {
45834583    Struct::<T>::IS_SEND; 
45844584  //^^^^^^^^^^^^^^^^^^^^Yes 
45854585    Struct::<U>::IS_SEND; 
4586-   //^^^^^^^^^^^^^^^^^^^^{unknown}  
4586+   //^^^^^^^^^^^^^^^^^^^^Yes  
45874587    Struct::<*const T>::IS_SEND; 
4588-   //^^^^^^^^^^^^^^^^^^^^^^^^^^^{unknown}  
4588+   //^^^^^^^^^^^^^^^^^^^^^^^^^^^Yes  
45894589    Enum::<T>::IS_SEND; 
45904590  //^^^^^^^^^^^^^^^^^^Yes 
45914591    Enum::<U>::IS_SEND; 
4592-   //^^^^^^^^^^^^^^^^^^{unknown}  
4592+   //^^^^^^^^^^^^^^^^^^Yes  
45934593    Enum::<*const T>::IS_SEND; 
4594-   //^^^^^^^^^^^^^^^^^^^^^^^^^{unknown}  
4594+   //^^^^^^^^^^^^^^^^^^^^^^^^^Yes  
45954595    Union::<T>::IS_SEND; 
45964596  //^^^^^^^^^^^^^^^^^^^Yes 
45974597    Union::<U>::IS_SEND; 
4598-   //^^^^^^^^^^^^^^^^^^^{unknown}  
4598+   //^^^^^^^^^^^^^^^^^^^Yes  
45994599    Union::<*const T>::IS_SEND; 
4600-   //^^^^^^^^^^^^^^^^^^^^^^^^^^{unknown}  
4600+   //^^^^^^^^^^^^^^^^^^^^^^^^^^Yes  
46014601    PhantomData::<T>::IS_SEND; 
46024602  //^^^^^^^^^^^^^^^^^^^^^^^^^Yes 
46034603    PhantomData::<U>::IS_SEND; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments