diff options
| author | Michael Goulet <michael@errs.io> | 2024-08-21 00:57:58 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-08-21 01:31:11 -0400 |
| commit | 25ff9b6bcbba9e7831eb4d6eba2df6bbcd267c55 (patch) | |
| tree | 7c081b337e865ac7a20217d90e29a14ce63dcef0 /compiler/rustc_incremental/src | |
| parent | 4d5b3b196284aded6ae99d12bcf149ffdc8ef379 (diff) | |
| download | rust-25ff9b6bcbba9e7831eb4d6eba2df6bbcd267c55.tar.gz rust-25ff9b6bcbba9e7831eb4d6eba2df6bbcd267c55.zip | |
Use bool in favor of Option<()> for diagnostics
Diffstat (limited to 'compiler/rustc_incremental/src')
| -rw-r--r-- | compiler/rustc_incremental/src/errors.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_incremental/src/persist/fs.rs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_incremental/src/errors.rs b/compiler/rustc_incremental/src/errors.rs index f8910030634..b68c149d398 100644 --- a/compiler/rustc_incremental/src/errors.rs +++ b/compiler/rustc_incremental/src/errors.rs @@ -189,10 +189,10 @@ pub struct CreateLock<'a> { pub lock_err: std::io::Error, pub session_dir: &'a Path, #[note(incremental_lock_unsupported)] - pub is_unsupported_lock: Option<()>, + pub is_unsupported_lock: bool, #[help(incremental_cargo_help_1)] #[help(incremental_cargo_help_2)] - pub is_cargo: Option<()>, + pub is_cargo: bool, } #[derive(Diagnostic)] diff --git a/compiler/rustc_incremental/src/persist/fs.rs b/compiler/rustc_incremental/src/persist/fs.rs index 5f85e622e89..253d53c83fb 100644 --- a/compiler/rustc_incremental/src/persist/fs.rs +++ b/compiler/rustc_incremental/src/persist/fs.rs @@ -486,12 +486,12 @@ fn lock_directory( // the lock should be exclusive Ok(lock) => Ok((lock, lock_file_path)), Err(lock_err) => { - let is_unsupported_lock = flock::Lock::error_unsupported(&lock_err).then_some(()); + let is_unsupported_lock = flock::Lock::error_unsupported(&lock_err); Err(sess.dcx().emit_err(errors::CreateLock { lock_err, session_dir, is_unsupported_lock, - is_cargo: rustc_session::utils::was_invoked_from_cargo().then_some(()), + is_cargo: rustc_session::utils::was_invoked_from_cargo(), })) } } |
