File tree 4 files changed +8
-45
lines changed
4 files changed +8
-45
lines changed Original file line number Diff line number Diff line change @@ -550,18 +550,14 @@ pub(crate) fn trait_datum_query(
550
550
debug ! ( "trait_datum {:?}" , trait_id) ;
551
551
let trait_ = from_chalk_trait_id ( trait_id) ;
552
552
let trait_data = db. trait_data ( trait_) ;
553
-
554
- let coinductive =
555
- trait_data. is_auto || db. attrs ( trait_. into ( ) ) . by_key ( "rustc_coinductive" ) . exists ( ) ;
556
-
557
553
debug ! ( "trait {:?} = {:?}" , trait_id, trait_data. name) ;
558
554
let generic_params = generics ( db. upcast ( ) , trait_. into ( ) ) ;
559
555
let bound_vars = generic_params. bound_vars_subst ( db, DebruijnIndex :: INNERMOST ) ;
560
556
let flags = rust_ir:: TraitFlags {
561
557
auto : trait_data. is_auto ,
562
558
upstream : trait_. lookup ( db. upcast ( ) ) . container . krate ( ) != krate,
563
559
non_enumerable : true ,
564
- coinductive,
560
+ coinductive : false , // only relevant for Chalk testing
565
561
// FIXME: set these flags correctly
566
562
marker : false ,
567
563
fundamental : false ,
@@ -643,7 +639,7 @@ pub(crate) fn struct_datum_query(
643
639
fundamental : false ,
644
640
phantom_data : false ,
645
641
} ;
646
- // FIXME provide enum variants properly (for auto traits and `Sized` )
642
+ // FIXME provide enum variants properly (for auto traits)
647
643
let variant = rust_ir:: AdtVariantDatum {
648
644
fields : Vec :: new ( ) , // FIXME add fields (only relevant for auto traits),
649
645
} ;
Original file line number Diff line number Diff line change @@ -4410,35 +4410,3 @@ fn test(v: S<i32>) {
4410
4410
"# ,
4411
4411
) ;
4412
4412
}
4413
-
4414
- #[ test]
4415
- fn rustc_coinductive ( ) {
4416
- // Taken from rust-lang/rust#108033 with modification.
4417
- check_types (
4418
- r#"
4419
- #[rustc_coinductive]
4420
- trait Trait { type Assoc; }
4421
-
4422
- impl<T, U> Trait for (T, U)
4423
- where
4424
- (U, T): Trait,
4425
- (): ConstrainToU32<T>,
4426
- {
4427
- type Assoc = i32;
4428
- }
4429
-
4430
- trait ConstrainToU32<T> {}
4431
- impl ConstrainToU32<u32> for () {}
4432
-
4433
- fn impls_trait<T, U, R>() -> R
4434
- where
4435
- (T, U): Trait<Assoc = R>,
4436
- { loop {} }
4437
-
4438
- fn main() {
4439
- let _ = impls_trait::<_, _, _>();
4440
- //^ i32
4441
- }
4442
- "# ,
4443
- ) ;
4444
- }
Original file line number Diff line number Diff line change @@ -474,7 +474,7 @@ fn main() {
474
474
file_id: FileId(
475
475
1,
476
476
),
477
- range: 9313..9321 ,
477
+ range: 9288..9296 ,
478
478
},
479
479
),
480
480
tooltip: "",
@@ -487,7 +487,7 @@ fn main() {
487
487
file_id: FileId(
488
488
1,
489
489
),
490
- range: 9345..9349 ,
490
+ range: 9320..9324 ,
491
491
},
492
492
),
493
493
tooltip: "",
@@ -511,7 +511,7 @@ fn main() {
511
511
file_id: FileId(
512
512
1,
513
513
),
514
- range: 9313..9321 ,
514
+ range: 9288..9296 ,
515
515
},
516
516
),
517
517
tooltip: "",
@@ -524,7 +524,7 @@ fn main() {
524
524
file_id: FileId(
525
525
1,
526
526
),
527
- range: 9345..9349 ,
527
+ range: 9320..9324 ,
528
528
},
529
529
),
530
530
tooltip: "",
@@ -548,7 +548,7 @@ fn main() {
548
548
file_id: FileId(
549
549
1,
550
550
),
551
- range: 9313..9321 ,
551
+ range: 9288..9296 ,
552
552
},
553
553
),
554
554
tooltip: "",
@@ -561,7 +561,7 @@ fn main() {
561
561
file_id: FileId(
562
562
1,
563
563
),
564
- range: 9345..9349 ,
564
+ range: 9320..9324 ,
565
565
},
566
566
),
567
567
tooltip: "",
Original file line number Diff line number Diff line change @@ -63,7 +63,6 @@ pub mod marker {
63
63
#[ lang = "sized" ]
64
64
#[ fundamental]
65
65
#[ rustc_specialization_trait]
66
- #[ rustc_coinductive]
67
66
pub trait Sized { }
68
67
// endregion:sized
69
68
You can’t perform that action at this time.
0 commit comments