@@ -26,10 +26,11 @@ pub enum LangItemTarget {
2626 TraitId ( TraitId ) ,
2727 EnumVariantId ( EnumVariantId ) ,
2828 ConstId ( ConstId ) ,
29+ MacroId ( MacroId ) ,
2930}
3031
3132impl_from ! (
32- EnumId , FunctionId , ImplId , StaticId , StructId , UnionId , TypeAliasId , TraitId , EnumVariantId , ConstId for LangItemTarget
33+ EnumId , FunctionId , ImplId , StaticId , StructId , UnionId , TypeAliasId , TraitId , EnumVariantId , ConstId , MacroId for LangItemTarget
3334) ;
3435
3536/// Salsa query. This will look for lang items in a specific crate.
@@ -276,7 +277,6 @@ impl LangItems {
276277 ( self . BitXorAssign , & mut self . BitXorAssign_bitxor_assign , sym:: bitxor_assign) ,
277278 ( self . BitOrAssign , & mut self . BitOrAssign_bitor_assign , sym:: bitor_assign) ,
278279 ( self . BitAndAssign , & mut self . BitAndAssign_bitand_assign , sym:: bitand_assign) ,
279- ( self . Drop , & mut self . Drop_drop , sym:: drop) ,
280280 ( self . Debug , & mut self . Debug_fmt , sym:: fmt) ,
281281 ( self . Deref , & mut self . Deref_deref , sym:: deref) ,
282282 ( self . DerefMut , & mut self . DerefMut_deref_mut , sym:: deref_mut) ,
@@ -307,6 +307,13 @@ impl LangItems {
307307 ) ;
308308 Some ( ( ) )
309309 } ) ( ) ;
310+ ( || {
311+ methods (
312+ self . Drop ?,
313+ & mut [ ( & mut self . Drop_drop , sym:: drop) , ( & mut self . Drop_pin_drop , sym:: pin_drop) ] ,
314+ ) ;
315+ Some ( ( ) )
316+ } ) ( ) ;
310317 }
311318}
312319
@@ -397,18 +404,25 @@ macro_rules! language_item_table {
397404 }
398405
399406 #[ derive( Debug , Clone , Copy , PartialEq , Eq , Hash ) ]
407+ #[ allow( non_camel_case_types) ]
400408 pub enum LangItemEnum {
401409 $(
402410 $( #[ $attr] ) *
403411 $lang_item,
404412 ) *
413+ $( $non_lang_trait, ) *
414+ $( $non_lang_macro_field, ) *
415+ $( $resolve_manually, ) *
405416 }
406417
407418 impl LangItemEnum {
408419 #[ inline]
409420 pub fn from_lang_items( self , lang_items: & LangItems ) -> Option <LangItemTarget > {
410421 match self {
411422 $( LangItemEnum :: $lang_item => lang_items. $lang_item. map( Into :: into) , ) *
423+ $( LangItemEnum :: $non_lang_trait => lang_items. $non_lang_trait. map( Into :: into) , ) *
424+ $( LangItemEnum :: $non_lang_macro_field => lang_items. $non_lang_macro_field. map( Into :: into) , ) *
425+ $( LangItemEnum :: $resolve_manually => lang_items. $resolve_manually. map( Into :: into) , ) *
412426 }
413427 }
414428
@@ -716,6 +730,7 @@ language_item_table! { LangItems =>
716730 PartialOrd_ge , FunctionId ;
717731 PartialOrd_gt , FunctionId ;
718732 Drop_drop , FunctionId ;
733+ Drop_pin_drop , FunctionId ;
719734 Debug_fmt , FunctionId ;
720735 Deref_deref , FunctionId ;
721736 DerefMut_deref_mut , FunctionId ;
0 commit comments