@@ -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
} ;
@@ -2601,16 +2599,6 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, id: DefId) -> CodegenFnAttrs {
2601
2599
codegen_fn_attrs
2602
2600
}
2603
2601
2604
- fn inline_exportable ( tcx : TyCtxt < ' _ > , def_id : DefId ) -> bool {
2605
- // Functions marked with #[inline] are only ever codegened
2606
- // with "internal" linkage and are never exported unless we're
2607
- // building a `staticlib` or `cdylib` and they are marked
2608
- // `#[no_mangle]`.
2609
- tcx. codegen_fn_attrs ( def_id) . flags . contains ( CodegenFnAttrFlags :: NO_MANGLE )
2610
- && ( tcx. sess . crate_types ( ) . contains ( & CrateType :: Cdylib )
2611
- || tcx. sess . crate_types ( ) . contains ( & CrateType :: Staticlib ) )
2612
- }
2613
-
2614
2602
/// Checks if the provided DefId is a method in a trait impl for a trait which has track_caller
2615
2603
/// applied to the method prototype.
2616
2604
fn should_inherit_track_caller ( tcx : TyCtxt < ' _ > , def_id : DefId ) -> bool {
0 commit comments