Skip to content

Commit

Permalink
Suppress unreachable_code lint
Browse files Browse the repository at this point in the history
Beforehand, this has the opposite of the desired behavior. Instead of
causing a warning on *unsupported* platforms, this only emits an error
on *supported* platforms.

As of writing, there is no `compiler_warning!` macro like there is
`compile_error!` in std.

Resolves FillZpp#103.
  • Loading branch information
tmfink committed Apr 21, 2022
1 parent 1c119b3 commit c6b037e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ pub fn boottime() -> Result<timeval, Error> {
return Ok(bt);
}

#[warn(unreachable_code)]
#[allow(unreachable_code)]
Err(Error::UnsupportedSystem)
}

Expand Down

0 comments on commit c6b037e

Please sign in to comment.