@@ -337,6 +337,10 @@ impl<'a> chalk_solve::RustIrDatabase<Interner> for ChalkContext<'a> {
337337 hir_def:: AdtId :: UnionId ( id) => self . db . union_data ( id) . name . to_string ( ) ,
338338 }
339339 }
340+ fn adt_size_align ( & self , _id : chalk_ir:: AdtId < Interner > ) -> Arc < rust_ir:: AdtSizeAlign > {
341+ // FIXME
342+ Arc :: new ( rust_ir:: AdtSizeAlign :: from_one_zst ( false ) )
343+ }
340344 fn assoc_type_name ( & self , assoc_ty_id : chalk_ir:: AssocTypeId < Interner > ) -> String {
341345 let id = self . db . associated_ty_data ( assoc_ty_id) . name ;
342346 self . db . type_alias_data ( id) . name . to_string ( )
@@ -480,34 +484,38 @@ pub(crate) fn trait_datum_query(
480484
481485fn well_known_trait_from_lang_attr ( name : & str ) -> Option < WellKnownTrait > {
482486 Some ( match name {
483- "sized" => WellKnownTrait :: Sized ,
484- "copy" => WellKnownTrait :: Copy ,
485487 "clone" => WellKnownTrait :: Clone ,
488+ "coerce_unsized" => WellKnownTrait :: CoerceUnsized ,
489+ "copy" => WellKnownTrait :: Copy ,
490+ "discriminant_kind" => WellKnownTrait :: DiscriminantKind ,
491+ "dispatch_from_dyn" => WellKnownTrait :: DispatchFromDyn ,
486492 "drop" => WellKnownTrait :: Drop ,
487- "fn_once" => WellKnownTrait :: FnOnce ,
488- "fn_mut" => WellKnownTrait :: FnMut ,
489493 "fn" => WellKnownTrait :: Fn ,
494+ "fn_mut" => WellKnownTrait :: FnMut ,
495+ "fn_once" => WellKnownTrait :: FnOnce ,
496+ "generator" => WellKnownTrait :: Generator ,
497+ "sized" => WellKnownTrait :: Sized ,
498+ "unpin" => WellKnownTrait :: Unpin ,
490499 "unsize" => WellKnownTrait :: Unsize ,
491- "coerce_unsized" => WellKnownTrait :: CoerceUnsized ,
492- "discriminant_kind" => WellKnownTrait :: DiscriminantKind ,
493500 _ => return None ,
494501 } )
495502}
496503
497504fn lang_attr_from_well_known_trait ( attr : WellKnownTrait ) -> & ' static str {
498505 match attr {
499- WellKnownTrait :: Sized => "sized" ,
500- WellKnownTrait :: Copy => "copy" ,
501506 WellKnownTrait :: Clone => "clone" ,
502- WellKnownTrait :: Drop => "drop" ,
503- WellKnownTrait :: FnOnce => "fn_once" ,
504- WellKnownTrait :: FnMut => "fn_mut" ,
505- WellKnownTrait :: Fn => "fn" ,
506- WellKnownTrait :: Unsize => "unsize" ,
507- WellKnownTrait :: Unpin => "unpin" ,
508507 WellKnownTrait :: CoerceUnsized => "coerce_unsized" ,
508+ WellKnownTrait :: Copy => "copy" ,
509509 WellKnownTrait :: DiscriminantKind => "discriminant_kind" ,
510+ WellKnownTrait :: DispatchFromDyn => "dispatch_from_dyn" ,
511+ WellKnownTrait :: Drop => "drop" ,
512+ WellKnownTrait :: Fn => "fn" ,
513+ WellKnownTrait :: FnMut => "fn_mut" ,
514+ WellKnownTrait :: FnOnce => "fn_once" ,
510515 WellKnownTrait :: Generator => "generator" ,
516+ WellKnownTrait :: Sized => "sized" ,
517+ WellKnownTrait :: Unpin => "unpin" ,
518+ WellKnownTrait :: Unsize => "unsize" ,
511519 }
512520}
513521
0 commit comments