File tree 3 files changed +12
-7
lines changed
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(
742
742
phantom_data,
743
743
} ;
744
744
745
+ #[ cfg( FALSE ) ]
746
+ // this slows down rust-analyzer by quite a bit unfortunately, so enabling this is currently not worth it
745
747
let variant_id_to_fields = |id : VariantId | {
746
748
let variant_data = & id. variant_data ( db. upcast ( ) ) ;
747
749
let fields = if variant_data. fields ( ) . is_empty ( ) {
@@ -757,6 +759,7 @@ pub(crate) fn adt_datum_query(
757
759
} ;
758
760
rust_ir:: AdtVariantDatum { fields }
759
761
} ;
762
+ let variant_id_to_fields = |_: VariantId | rust_ir:: AdtVariantDatum { fields : vec ! [ ] } ;
760
763
761
764
let ( kind, variants) = match adt_id {
762
765
hir_def:: AdtId :: StructId ( id) => {
Original file line number Diff line number Diff line change @@ -536,15 +536,17 @@ fn test() {
536
536
537
537
#[ test]
538
538
fn coerce_unsize_generic ( ) {
539
- check_no_mismatches (
539
+ check (
540
540
r#"
541
541
//- minicore: coerce_unsized
542
542
struct Foo<T> { t: T };
543
543
struct Bar<T>(Foo<T>);
544
544
545
545
fn test() {
546
546
let _: &Foo<[usize]> = &Foo { t: [1, 2, 3] };
547
+ //^^^^^^^^^^^^^^^^^^^^^ expected &Foo<[usize]>, got &Foo<[i32; 3]>
547
548
let _: &Bar<[usize]> = &Bar(Foo { t: [1, 2, 3] });
549
+ //^^^^^^^^^^^^^^^^^^^^^^^^^^ expected &Bar<[usize]>, got &Bar<[i32; 3]>
548
550
}
549
551
"# ,
550
552
) ;
Original file line number Diff line number Diff line change @@ -4583,21 +4583,21 @@ fn f<T: Send, U>() {
4583
4583
Struct::<T>::IS_SEND;
4584
4584
//^^^^^^^^^^^^^^^^^^^^Yes
4585
4585
Struct::<U>::IS_SEND;
4586
- //^^^^^^^^^^^^^^^^^^^^{unknown}
4586
+ //^^^^^^^^^^^^^^^^^^^^Yes
4587
4587
Struct::<*const T>::IS_SEND;
4588
- //^^^^^^^^^^^^^^^^^^^^^^^^^^^{unknown}
4588
+ //^^^^^^^^^^^^^^^^^^^^^^^^^^^Yes
4589
4589
Enum::<T>::IS_SEND;
4590
4590
//^^^^^^^^^^^^^^^^^^Yes
4591
4591
Enum::<U>::IS_SEND;
4592
- //^^^^^^^^^^^^^^^^^^{unknown}
4592
+ //^^^^^^^^^^^^^^^^^^Yes
4593
4593
Enum::<*const T>::IS_SEND;
4594
- //^^^^^^^^^^^^^^^^^^^^^^^^^{unknown}
4594
+ //^^^^^^^^^^^^^^^^^^^^^^^^^Yes
4595
4595
Union::<T>::IS_SEND;
4596
4596
//^^^^^^^^^^^^^^^^^^^Yes
4597
4597
Union::<U>::IS_SEND;
4598
- //^^^^^^^^^^^^^^^^^^^{unknown}
4598
+ //^^^^^^^^^^^^^^^^^^^Yes
4599
4599
Union::<*const T>::IS_SEND;
4600
- //^^^^^^^^^^^^^^^^^^^^^^^^^^{unknown}
4600
+ //^^^^^^^^^^^^^^^^^^^^^^^^^^Yes
4601
4601
PhantomData::<T>::IS_SEND;
4602
4602
//^^^^^^^^^^^^^^^^^^^^^^^^^Yes
4603
4603
PhantomData::<U>::IS_SEND;
You can’t perform that action at this time.
0 commit comments