Enable new lints

This commit is contained in:
0xd4d 2020-02-01 16:33:24 +01:00
parent 1ffd1f96d2
commit d87995df13
3 changed files with 15 additions and 2 deletions

View File

@ -235,6 +235,10 @@ impl BlockEncoder {
/// far away from the new location of the encoded instructions. Every OS should have /// far away from the new location of the encoded instructions. Every OS should have
/// some API to allocate memory close (+/-2GB) to the original code location. /// some API to allocate memory close (+/-2GB) to the original code location.
/// ///
/// # Errors
///
/// Returns an error message on failure.
///
/// # Panics /// # Panics
/// ///
/// Panics if `bitness` is not one of 16, 32, 64. /// Panics if `bitness` is not one of 16, 32, 64.
@ -288,6 +292,10 @@ impl BlockEncoder {
/// far away from the new location of the encoded instructions. Every OS should have /// far away from the new location of the encoded instructions. Every OS should have
/// some API to allocate memory close (+/-2GB) to the original code location. /// some API to allocate memory close (+/-2GB) to the original code location.
/// ///
/// # Errors
///
/// Returns an error message on failure.
///
/// # Panics /// # Panics
/// ///
/// Panics if `bitness` is not one of 16, 32, 64. /// Panics if `bitness` is not one of 16, 32, 64.

View File

@ -200,8 +200,11 @@ impl Encoder {
} }
} }
/// Encodes an instruction and returns the size of the encoded instruction or an error /// Encodes an instruction and returns the size of the encoded instruction
/// if it failed to encode it. ///
/// # Errors
///
/// Returns an error message on failure.
/// ///
/// # Arguments /// # Arguments
/// ///

View File

@ -79,8 +79,10 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#![cfg_attr(feature = "cargo-clippy", warn(clippy::doc_markdown))] #![cfg_attr(feature = "cargo-clippy", warn(clippy::doc_markdown))]
#![cfg_attr(feature = "cargo-clippy", warn(clippy::fallible_impl_from))] #![cfg_attr(feature = "cargo-clippy", warn(clippy::fallible_impl_from))]
#![cfg_attr(feature = "cargo-clippy", warn(clippy::large_digit_groups))] #![cfg_attr(feature = "cargo-clippy", warn(clippy::large_digit_groups))]
#![cfg_attr(feature = "cargo-clippy", warn(clippy::missing_errors_doc))]
#![cfg_attr(feature = "cargo-clippy", warn(clippy::missing_inline_in_public_items))] #![cfg_attr(feature = "cargo-clippy", warn(clippy::missing_inline_in_public_items))]
#![cfg_attr(feature = "cargo-clippy", warn(clippy::must_use_candidate))] #![cfg_attr(feature = "cargo-clippy", warn(clippy::must_use_candidate))]
#![cfg_attr(feature = "cargo-clippy", warn(clippy::same_functions_in_if_condition))]
#![cfg_attr(feature = "cargo-clippy", warn(clippy::unimplemented))] #![cfg_attr(feature = "cargo-clippy", warn(clippy::unimplemented))]
#![cfg_attr(feature = "cargo-clippy", warn(clippy::used_underscore_binding))] #![cfg_attr(feature = "cargo-clippy", warn(clippy::used_underscore_binding))]
#![cfg_attr(not(feature = "std"), no_std)] #![cfg_attr(not(feature = "std"), no_std)]