Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions program-runtime/src/invoke_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -849,9 +849,8 @@ macro_rules! with_mock_invoke_context {
$transaction_context:ident,
$transaction_accounts:expr $(,)?
) => {
use $crate::with_mock_invoke_context_with_feature_set;
let feature_set = &solana_svm_feature_set::SVMFeatureSet::default();
with_mock_invoke_context_with_feature_set!(
$crate::with_mock_invoke_context_with_feature_set!(
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is required due to

error: unused import: `$crate::with_mock_invoke_context_with_feature_set`
    --> program-runtime/src/invoke_context.rs:852:13
     |
 852 |         use $crate::with_mock_invoke_context_with_feature_set;
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
1140 |         with_mock_invoke_context!(invoke_context, transaction_context, transaction_accounts);
     |         ------------------------------------------------------------------------------------ in this macro invocation
     |
     = note: `-D unused-imports` implied by `-D warnings`
     = help: to override `-D warnings` add `#[allow(unused_imports)]`
     = note: this error originates in the macro `with_mock_invoke_context` (in Nightly builds, run with -Z macro-backtrace for more info)

seems like clippy can no longer recognize uses of import in macro that is use as invoke

$invoke_context,
$transaction_context,
feature_set,
Expand Down
11 changes: 7 additions & 4 deletions programs/sbf/rust/128bit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ pub extern "C" fn entrypoint(_input: *mut u8) -> u64 {
let y = x.rotate_right(1);
assert_eq!(y, 170_141_183_460_469_231_731_687_303_715_884_105_728);

assert_eq!(
u128::MAX,
340_282_366_920_938_463_463_374_607_431_768_211_455
);
#[allow(clippy::eq_op)]
{
assert_eq!(
u128::MAX,
340_282_366_920_938_463_463_374_607_431_768_211_455
);
}

let mut z = u128::MAX;
z -= 1;
Expand Down
3 changes: 2 additions & 1 deletion programs/sbf/rust/sanity/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ pub fn process_instruction(
#[cfg(not(target_os = "solana"))]
panic!();
}

// clippy 1.92 started marking `num` as unused in the assert below
#[allow(unused_variables)]
{
// Test - float math functions
let zero = accounts[0].try_borrow_mut_data()?.len() as f64;
Expand Down
Loading