rustc: Move crate_types
from Session
to GlobalCtxt
Removes a piece of mutable state. Follow up to #114578.
This commit is contained in:
parent
8838c73e86
commit
0b89aac08d
26 changed files with 108 additions and 108 deletions
|
@ -31,7 +31,7 @@ struct EntryContext<'tcx> {
|
|||
}
|
||||
|
||||
fn entry_fn(tcx: TyCtxt<'_>, (): ()) -> Option<(DefId, EntryFnType)> {
|
||||
let any_exe = tcx.sess.crate_types().iter().any(|ty| *ty == CrateType::Executable);
|
||||
let any_exe = tcx.crate_types().iter().any(|ty| *ty == 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