mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 23:12:02 +00:00
Auto merge of #35069 - wesleywiser:too_many_symbols, r=alexcrichton
Only export #[no_mangle] extern symbols during LTO Fixes #34985
This commit is contained in:
commit
9dba50b059
@ -55,7 +55,6 @@ use rustc_serialize::Decodable;
|
|||||||
use syntax::attr;
|
use syntax::attr;
|
||||||
use syntax::parse::token;
|
use syntax::parse::token;
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::abi::Abi;
|
|
||||||
use syntax::codemap;
|
use syntax::codemap;
|
||||||
use syntax::print::pprust;
|
use syntax::print::pprust;
|
||||||
use syntax::ptr::P;
|
use syntax::ptr::P;
|
||||||
@ -1534,13 +1533,9 @@ pub fn is_extern_item<'a, 'tcx>(cdata: Cmd,
|
|||||||
let applicable = match item_family(item_doc) {
|
let applicable = match item_family(item_doc) {
|
||||||
ImmStatic | MutStatic => true,
|
ImmStatic | MutStatic => true,
|
||||||
Fn => {
|
Fn => {
|
||||||
let ty::TypeScheme { generics, ty } = get_type(cdata, id, tcx);
|
let ty::TypeScheme { generics, .. } = get_type(cdata, id, tcx);
|
||||||
let no_generics = generics.types.is_empty();
|
let no_generics = generics.types.is_empty();
|
||||||
match ty.sty {
|
no_generics
|
||||||
ty::TyFnDef(_, _, fn_ty) | ty::TyFnPtr(fn_ty)
|
|
||||||
if fn_ty.abi != Abi::Rust => return no_generics,
|
|
||||||
_ => no_generics,
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
_ => false,
|
_ => false,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user