File tree 6 files changed +66
-22
lines changed
6 files changed +66
-22
lines changed Original file line number Diff line number Diff line change @@ -22,10 +22,10 @@ either = "1.7.0"
22
22
tracing = " 0.1.35"
23
23
rustc-hash = " 1.1.0"
24
24
scoped-tls = " 1.0.0"
25
- chalk-solve = { version = " 0.89 .0" , default-features = false }
26
- chalk-ir = " 0.89 .0"
27
- chalk-recursive = { version = " 0.89 .0" , default-features = false }
28
- chalk-derive = " 0.89 .0"
25
+ chalk-solve = { version = " 0.91 .0" , default-features = false }
26
+ chalk-ir = " 0.91 .0"
27
+ chalk-recursive = { version = " 0.91 .0" , default-features = false }
28
+ chalk-derive = " 0.91 .0"
29
29
la-arena = { version = " 0.3.0" , path = " ../../lib/la-arena" }
30
30
once_cell = " 1.17.0"
31
31
typed-arena = " 2.0.1"
Original file line number Diff line number Diff line change @@ -584,6 +584,7 @@ fn well_known_trait_from_lang_item(item: LangItem) -> Option<WellKnownTrait> {
584
584
LangItem :: Unpin => WellKnownTrait :: Unpin ,
585
585
LangItem :: Unsize => WellKnownTrait :: Unsize ,
586
586
LangItem :: Tuple => WellKnownTrait :: Tuple ,
587
+ LangItem :: PointeeTrait => WellKnownTrait :: Pointee ,
587
588
_ => return None ,
588
589
} )
589
590
}
@@ -604,6 +605,7 @@ fn lang_item_from_well_known_trait(trait_: WellKnownTrait) -> LangItem {
604
605
WellKnownTrait :: Tuple => LangItem :: Tuple ,
605
606
WellKnownTrait :: Unpin => LangItem :: Unpin ,
606
607
WellKnownTrait :: Unsize => LangItem :: Unsize ,
608
+ WellKnownTrait :: Pointee => LangItem :: PointeeTrait ,
607
609
}
608
610
}
609
611
Original file line number Diff line number Diff line change @@ -3400,6 +3400,22 @@ fn func() {
3400
3400
) ;
3401
3401
}
3402
3402
3403
+ #[ test]
3404
+ fn pointee_trait ( ) {
3405
+ check_types (
3406
+ r#"
3407
+ //- minicore: pointee
3408
+ use core::ptr::Pointee;
3409
+ fn func() {
3410
+ let x: <u8 as Pointee>::Metadata;
3411
+ //^ ()
3412
+ let x: <[u8] as Pointee>::Metadata;
3413
+ //^ usize
3414
+ }
3415
+ "# ,
3416
+ ) ;
3417
+ }
3418
+
3403
3419
// FIXME
3404
3420
#[ test]
3405
3421
fn castable_to ( ) {
Original file line number Diff line number Diff line change @@ -387,6 +387,10 @@ impl MiniCore {
387
387
}
388
388
}
389
389
390
+ if !active_regions. is_empty ( ) {
391
+ panic ! ( "unclosed regions: {:?} Add an `endregion` comment" , active_regions) ;
392
+ }
393
+
390
394
for flag in & self . valid_flags {
391
395
if !seen_regions. iter ( ) . any ( |it| it == flag) {
392
396
panic ! ( "unused minicore flag: {flag:?}" ) ;
Original file line number Diff line number Diff line change 37
37
//! ord: eq, option
38
38
//! panic:
39
39
//! pin:
40
+ //! pointee:
40
41
//! range:
41
42
//! result:
42
43
//! send: sized
@@ -752,6 +753,16 @@ pub mod result {
752
753
}
753
754
// endregion:result
754
755
756
+ // region:pointee
757
+ pub mod ptr {
758
+ #[ lang = "pointee_trait" ]
759
+ pub trait Pointee {
760
+ #[ lang = "metadata_type" ]
761
+ type Metadata ;
762
+ }
763
+ }
764
+ // endregion:pointee
765
+
755
766
// region:pin
756
767
pub mod pin {
757
768
#[ lang = "pin" ]
You can’t perform that action at this time.
0 commit comments