diff options
Diffstat (limited to 'compiler/rustc_passes/src/entry.rs')
-rw-r--r-- | compiler/rustc_passes/src/entry.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_passes/src/entry.rs b/compiler/rustc_passes/src/entry.rs index 5885f45ae..b327ba633 100644 --- a/compiler/rustc_passes/src/entry.rs +++ b/compiler/rustc_passes/src/entry.rs @@ -195,7 +195,7 @@ fn no_main_err(tcx: TyCtxt<'_>, visitor: &EntryContext<'_>) { // There is no main function. let mut has_filename = true; - let filename = tcx.sess.local_crate_source_file.clone().unwrap_or_else(|| { + let filename = tcx.sess.local_crate_source_file().unwrap_or_else(|| { has_filename = false; Default::default() }); |