@@ -40,7 +40,6 @@ use rustc_middle::ty::util::Discr;
40
40
use rustc_middle:: ty:: util:: IntTypeExt ;
41
41
use rustc_middle:: ty:: { self , AdtKind , Const , ToPolyTraitRef , Ty , TyCtxt } ;
42
42
use rustc_middle:: ty:: { ReprOptions , ToPredicate , WithConstness } ;
43
- use rustc_session:: config:: CrateType ;
44
43
use rustc_session:: lint;
45
44
use rustc_session:: parse:: feature_err;
46
45
use rustc_span:: symbol:: { kw, sym, Ident , Symbol } ;
@@ -80,7 +79,6 @@ pub fn provide(providers: &mut Providers<'_>) {
80
79
static_mutability,
81
80
generator_kind,
82
81
codegen_fn_attrs,
83
- inline_exportable,
84
82
collect_mod_item_types,
85
83
..* providers
86
84
} ;
@@ -2636,16 +2634,6 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, id: DefId) -> CodegenFnAttrs {
2636
2634
codegen_fn_attrs
2637
2635
}
2638
2636
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
-
2649
2637
/// Checks if the provided DefId is a method in a trait impl for a trait which has track_caller
2650
2638
/// applied to the method prototype.
2651
2639
fn should_inherit_track_caller ( tcx : TyCtxt < ' _ > , def_id : DefId ) -> bool {
0 commit comments