slighty simplify a few boolean expressions (clippy::nonminimal_bool)
This commit is contained in:
parent
5a07e33d2c
commit
73bd953dea
4 changed files with 4 additions and 5 deletions
|
@ -206,7 +206,7 @@ fn no_main_err(tcx: TyCtxt<'_>, visitor: &EntryContext<'_>) {
|
|||
// The file may be empty, which leads to the diagnostic machinery not emitting this
|
||||
// note. This is a relatively simple way to detect that case and emit a span-less
|
||||
// note instead.
|
||||
let file_empty = !tcx.sess.source_map().lookup_line(sp.hi()).is_ok();
|
||||
let file_empty = tcx.sess.source_map().lookup_line(sp.hi()).is_err();
|
||||
|
||||
tcx.sess.emit_err(NoMainErr {
|
||||
sp,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue