Skip to content

Commit

Permalink
Auto merge of #35069 - wesleywiser:too_many_symbols, r=alexcrichton
Browse files Browse the repository at this point in the history
Only export #[no_mangle] extern symbols during LTO

Fixes #34985
  • Loading branch information
bors authored Jul 30, 2016
2 parents 7f7969e + 2dbf00e commit 9dba50b
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/librustc_metadata/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ use rustc_serialize::Decodable;
use syntax::attr;
use syntax::parse::token;
use syntax::ast;
use syntax::abi::Abi;
use syntax::codemap;
use syntax::print::pprust;
use syntax::ptr::P;
Expand Down Expand Up @@ -1534,13 +1533,9 @@ pub fn is_extern_item<'a, 'tcx>(cdata: Cmd,
let applicable = match item_family(item_doc) {
ImmStatic | MutStatic => true,
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();
match ty.sty {
ty::TyFnDef(_, _, fn_ty) | ty::TyFnPtr(fn_ty)
if fn_ty.abi != Abi::Rust => return no_generics,
_ => no_generics,
}
no_generics
},
_ => false,
};
Expand Down

0 comments on commit 9dba50b

Please sign in to comment.