@@ -40,7 +40,6 @@ use rustc_middle::ty::util::Discr;
4040use rustc_middle:: ty:: util:: IntTypeExt ;
4141use rustc_middle:: ty:: { self , AdtKind , Const , ToPolyTraitRef , Ty , TyCtxt } ;
4242use rustc_middle:: ty:: { ReprOptions , ToPredicate , WithConstness } ;
43- use rustc_session:: config:: CrateType ;
4443use rustc_session:: lint;
4544use rustc_session:: parse:: feature_err;
4645use rustc_span:: symbol:: { kw, sym, Ident , Symbol } ;
@@ -80,7 +79,6 @@ pub fn provide(providers: &mut Providers<'_>) {
8079 static_mutability,
8180 generator_kind,
8281 codegen_fn_attrs,
83- inline_exportable,
8482 collect_mod_item_types,
8583 ..* providers
8684 } ;
@@ -2636,16 +2634,6 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, id: DefId) -> CodegenFnAttrs {
26362634 codegen_fn_attrs
26372635}
26382636
2639- fn inline_exportable ( tcx : TyCtxt < ' _ > , def_id : DefId ) -> bool {
2640- // Functions marked with #[inline] are only ever codegened
2641- // with "internal" linkage and are never exported unless we're
2642- // building a `staticlib` or `cdylib` and they are marked
2643- // `#[no_mangle]`.
2644- tcx. codegen_fn_attrs ( def_id) . flags . contains ( CodegenFnAttrFlags :: NO_MANGLE )
2645- && ( tcx. sess . crate_types ( ) . contains ( & CrateType :: Cdylib )
2646- || tcx. sess . crate_types ( ) . contains ( & CrateType :: Staticlib ) )
2647- }
2648-
26492637/// Checks if the provided DefId is a method in a trait impl for a trait which has track_caller
26502638/// applied to the method prototype.
26512639fn should_inherit_track_caller ( tcx : TyCtxt < ' _ > , def_id : DefId ) -> bool {
0 commit comments