use slice::contains
where applicable
This commit is contained in:
parent
e77a8f439c
commit
9ef35ddc0c
7 changed files with 16 additions and 15 deletions
|
@ -24,7 +24,7 @@ struct EntryContext<'tcx> {
|
|||
}
|
||||
|
||||
fn entry_fn(tcx: TyCtxt<'_>, (): ()) -> Option<(DefId, EntryFnType)> {
|
||||
let any_exe = tcx.crate_types().iter().any(|ty| *ty == CrateType::Executable);
|
||||
let any_exe = tcx.crate_types().contains(&CrateType::Executable);
|
||||
if !any_exe {
|
||||
// No need to find a main function.
|
||||
return None;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue