use slice::contains
where applicable
This commit is contained in:
parent
e77a8f439c
commit
9ef35ddc0c
7 changed files with 16 additions and 15 deletions
|
@ -2186,7 +2186,7 @@ fn msvc_imps_needed(tcx: TyCtxt<'_>) -> bool {
|
|||
// indirectly from ThinLTO. In theory these are not needed as ThinLTO could resolve
|
||||
// these, but it currently does not do so.
|
||||
let can_have_static_objects =
|
||||
tcx.sess.lto() == Lto::Thin || tcx.crate_types().iter().any(|ct| *ct == CrateType::Rlib);
|
||||
tcx.sess.lto() == Lto::Thin || tcx.crate_types().contains(&CrateType::Rlib);
|
||||
|
||||
tcx.sess.target.is_like_windows &&
|
||||
can_have_static_objects &&
|
||||
|
|
|
@ -604,7 +604,7 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: LocalDefId) -> CodegenFnAttrs {
|
|||
if let Some((name, _)) = lang_items::extract(attrs)
|
||||
&& let Some(lang_item) = LangItem::from_name(name)
|
||||
{
|
||||
if WEAK_LANG_ITEMS.iter().any(|&l| l == lang_item) {
|
||||
if WEAK_LANG_ITEMS.contains(&lang_item) {
|
||||
codegen_fn_attrs.flags |= CodegenFnAttrFlags::RUSTC_STD_INTERNAL_SYMBOL;
|
||||
}
|
||||
if let Some(link_name) = lang_item.link_name() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue