Skip to content

Commit

Permalink
Appease nightly clippy
Browse files Browse the repository at this point in the history
warning: field `0` is never read
   --> src/llvm/types/ir.rs:115:11
    |
115 |     Other(LLVMValueRef),
    |     ----- ^^^^^^^^^^^^
    |     |
    |     field in this variant
    |
    = note: `#[warn(dead_code)]` on by default
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
    |
115 |     Other(()),
    |           ~~

error: usage of a legacy numeric constant
   --> src/linker.rs:525:55
    |
525 |                 format!("--unroll-max-upperbound={}", std::u32::MAX).into(),
    |                                                       ^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
note: the lint level is defined here
   --> src/lib.rs:1:9
    |
1   | #![deny(clippy::all)]
    |         ^^^^^^^^^^^
    = note: `#[deny(clippy::legacy_numeric_constants)]` implied by `#[deny(clippy::all)]`
help: use the associated constant instead
    |
525 |                 format!("--unroll-max-upperbound={}", u32::MAX).into(),
    |                                                       ~~~~~~~~

error: usage of a legacy numeric constant
   --> src/linker.rs:526:50
    |
526 |                 format!("--unroll-threshold={}", std::u32::MAX).into(),
    |                                                  ^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
    |
526 |                 format!("--unroll-threshold={}", u32::MAX).into(),
    |                                                  ~~~~~~~~
  • Loading branch information
tamird committed Apr 19, 2024
1 parent 9f39213 commit 50cdd7b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/linker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -522,8 +522,8 @@ impl Linker {
args.extend([
"--unroll-runtime".into(),
"--unroll-runtime-multi-exit".into(),
format!("--unroll-max-upperbound={}", std::u32::MAX).into(),
format!("--unroll-threshold={}", std::u32::MAX).into(),
format!("--unroll-max-upperbound={}", u32::MAX).into(),
format!("--unroll-threshold={}", u32::MAX).into(),
]);
}
if !self.options.disable_expand_memcpy_in_order {
Expand Down
2 changes: 1 addition & 1 deletion src/llvm/types/ir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ pub enum Metadata<'ctx> {
DICompositeType(DICompositeType<'ctx>),
DIDerivedType(DIDerivedType<'ctx>),
DISubprogram(DISubprogram<'ctx>),
Other(LLVMValueRef),
Other(#[allow(dead_code)] LLVMValueRef),
}

impl<'ctx> Metadata<'ctx> {
Expand Down

0 comments on commit 50cdd7b

Please sign in to comment.