Parametrize SDK Storage Types with Host Strait #272
clippy
35 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 35 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.83.0 (90b35a623 2024-11-26)
- cargo 1.83.0 (5ffbef321 2024-10-29)
- clippy 0.1.83 (90b35a6 2024-11-26)
Annotations
Check warning on line 48 in stylus-sdk/src/testing/mod.rs
github-actions / clippy
missing documentation for a struct
warning: missing documentation for a struct
--> stylus-sdk/src/testing/mod.rs:48:1
|
48 | pub struct MockHost;
| ^^^^^^^^^^^^^^^^^^^
Check warning on line 110 in stylus-sdk/src/storage/mod.rs
github-actions / clippy
bounds on generic parameters in type aliases are not enforced
warning: bounds on generic parameters in type aliases are not enforced
--> stylus-sdk/src/storage/mod.rs:110:31
|
110 | pub type $name<H: Host> = StorageFixedBytes<H, $bytes>;
| --^^^^
| | |
| | will not be checked at usage sites of the type alias
| help: remove this bound
...
126 | / alias_bytes! {
127 | | StorageB8, 8, 1;
128 | | StorageB16, 16, 2;
129 | | StorageB32, 32, 4;
... |
136 | | StorageB256, 256, 32;
137 | | }
| |_- in this macro invocation
|
= note: this is a known limitation of the type checker that may be lifted in a future edition.
see issue #112792 <https://github.com/rust-lang/rust/issues/112792> for more information
= note: this warning originates in the macro `alias_bytes` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 101 in stylus-sdk/src/storage/mod.rs
github-actions / clippy
bounds on generic parameters in type aliases are not enforced
warning: bounds on generic parameters in type aliases are not enforced
--> stylus-sdk/src/storage/mod.rs:101:38
|
101 | pub type $signed_name<H: Host> = StorageSigned<H, $bits, $limbs>;
| --^^^^
| | |
| | will not be checked at usage sites of the type alias
| help: remove this bound
...
115 | / alias_ints! {
116 | | StorageU8, StorageI8, 8, 1;
117 | | StorageU16, StorageI16, 16, 1;
118 | | StorageU32, StorageI32, 32, 1;
... |
123 | | StorageU256, StorageI256, 256, 4;
124 | | }
| |_- in this macro invocation
|
= note: this is a known limitation of the type checker that may be lifted in a future edition.
see issue #112792 <https://github.com/rust-lang/rust/issues/112792> for more information
= note: this warning originates in the macro `alias_ints` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 98 in stylus-sdk/src/storage/mod.rs
github-actions / clippy
bounds on generic parameters in type aliases are not enforced
warning: bounds on generic parameters in type aliases are not enforced
--> stylus-sdk/src/storage/mod.rs:98:31
|
98 | pub type $name<H: Host> = StorageUint<H, $bits, $limbs>;
| --^^^^
| | |
| | will not be checked at usage sites of the type alias
| help: remove this bound
...
115 | / alias_ints! {
116 | | StorageU8, StorageI8, 8, 1;
117 | | StorageU16, StorageI16, 16, 1;
118 | | StorageU32, StorageI32, 32, 1;
... |
123 | | StorageU256, StorageI256, 256, 4;
124 | | }
| |_- in this macro invocation
|
= note: this is a known limitation of the type checker that may be lifted in a future edition.
see issue #112792 <https://github.com/rust-lang/rust/issues/112792> for more information
= note: `#[warn(type_alias_bounds)]` on by default
= note: this warning originates in the macro `alias_ints` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 5 in stylus-sdk/src/host/wasm.rs
github-actions / clippy
missing documentation for a struct
warning: missing documentation for a struct
--> stylus-sdk/src/host/wasm.rs:5:1
|
5 | pub struct WasmHost;
| ^^^^^^^^^^^^^^^^^^^
Check warning on line 31 in stylus-sdk/src/host/mod.rs
github-actions / clippy
missing documentation for a method
warning: missing documentation for a method
--> stylus-sdk/src/host/mod.rs:31:5
|
31 | fn get_host(&self) -> &H;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 30 in stylus-sdk/src/host/mod.rs
github-actions / clippy
missing documentation for a trait
warning: missing documentation for a trait
--> stylus-sdk/src/host/mod.rs:30:1
|
30 | pub trait HostAccess<H: Host> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: the lint level is defined here
--> stylus-sdk/src/lib.rs:27:9
|
27 | #![warn(missing_docs)]
| ^^^^^^^^^^^^
Check warning on line 14 in stylus-sdk/src/testing/mod.rs
github-actions / clippy
empty line after doc comment
warning: empty line after doc comment
--> stylus-sdk/src/testing/mod.rs:13:1
|
13 | / /// with a host environment, such as the EVM.
14 | |
| |_
15 | /// Extends the host trait to implement Foundry-style cheatcodes.
16 | pub trait CheatcodeProvider: Host {
| --------------------------------- the comment documents this trait
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
= note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default
= help: if the empty line is unintentional remove it
help: if the documentation should include the empty line include it in the comment
|
14 | ///
|
Check warning on line 134 in stylus-sdk/src/testing/mod.rs
github-actions / clippy
unused variable: `pages`
warning: unused variable: `pages`
--> stylus-sdk/src/testing/mod.rs:134:35
|
134 | fn pay_for_memory_grow(&self, pages: u16) {}
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_pages`
Check warning on line 128 in stylus-sdk/src/testing/mod.rs
github-actions / clippy
unused variable: `account`
warning: unused variable: `account`
--> stylus-sdk/src/testing/mod.rs:128:24
|
128 | fn codehash(&self, account: Address) -> FixedBytes<32> {
| ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_account`
Check warning on line 125 in stylus-sdk/src/testing/mod.rs
github-actions / clippy
unused variable: `account`
warning: unused variable: `account`
--> stylus-sdk/src/testing/mod.rs:125:25
|
125 | fn code_size(&self, account: Address) -> usize {
| ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_account`
Check warning on line 122 in stylus-sdk/src/testing/mod.rs
github-actions / clippy
unused variable: `account`
warning: unused variable: `account`
--> stylus-sdk/src/testing/mod.rs:122:20
|
122 | fn code(&self, account: Address) -> Vec<u8> {
| ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_account`
Check warning on line 116 in stylus-sdk/src/testing/mod.rs
github-actions / clippy
unused variable: `account`
warning: unused variable: `account`
--> stylus-sdk/src/testing/mod.rs:116:23
|
116 | fn balance(&self, account: Address) -> U256 {
| ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_account`
Check warning on line 82 in stylus-sdk/src/testing/mod.rs
github-actions / clippy
unused variable: `clear`
warning: unused variable: `clear`
--> stylus-sdk/src/testing/mod.rs:82:27
|
82 | fn flush_cache(&self, clear: bool) {}
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_clear`
Check warning on line 81 in stylus-sdk/src/testing/mod.rs
github-actions / clippy
unused variable: `value`
warning: unused variable: `value`
--> stylus-sdk/src/testing/mod.rs:81:32
|
81 | fn cache(&self, key: U256, value: B256) {}
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_value`
Check warning on line 81 in stylus-sdk/src/testing/mod.rs
github-actions / clippy
unused variable: `key`
warning: unused variable: `key`
--> stylus-sdk/src/testing/mod.rs:81:21
|
81 | fn cache(&self, key: U256, value: B256) {}
| ^^^ help: if this is intentional, prefix it with an underscore: `_key`
Check warning on line 78 in stylus-sdk/src/testing/mod.rs
github-actions / clippy
unused variable: `key`
warning: unused variable: `key`
--> stylus-sdk/src/testing/mod.rs:78:20
|
78 | fn load(&self, key: U256) -> B256 {
| ^^^ help: if this is intentional, prefix it with an underscore: `_key`
Check warning on line 77 in stylus-sdk/src/testing/mod.rs
github-actions / clippy
unused variable: `input`
warning: unused variable: `input`
--> stylus-sdk/src/testing/mod.rs:77:24
|
77 | fn emit_log(&self, input: &[u8]) {}
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_input`
Check warning on line 68 in stylus-sdk/src/testing/mod.rs
github-actions / clippy
unused variable: `data`
warning: unused variable: `data`
--> stylus-sdk/src/testing/mod.rs:68:22
|
68 | fn output(&self, data: &[u8]) {}
| ^^^^ help: if this is intentional, prefix it with an underscore: `_data`
Check warning on line 62 in stylus-sdk/src/testing/mod.rs
github-actions / clippy
unused variable: `size`
warning: unused variable: `size`
--> stylus-sdk/src/testing/mod.rs:62:47
|
62 | fn read_return_data(&self, offset: usize, size: Option<usize>) -> Vec<u8> {
| ^^^^ help: if this is intentional, prefix it with an underscore: `_size`
Check warning on line 62 in stylus-sdk/src/testing/mod.rs
github-actions / clippy
unused variable: `offset`
warning: unused variable: `offset`
--> stylus-sdk/src/testing/mod.rs:62:32
|
62 | fn read_return_data(&self, offset: usize, size: Option<usize>) -> Vec<u8> {
| ^^^^^^ help: if this is intentional, prefix it with an underscore: `_offset`
Check warning on line 59 in stylus-sdk/src/testing/mod.rs
github-actions / clippy
unused variable: `len`
warning: unused variable: `len`
--> stylus-sdk/src/testing/mod.rs:59:20
|
59 | fn args(&self, len: usize) -> Vec<u8> {
| ^^^ help: if this is intentional, prefix it with an underscore: `_len`
Check warning on line 53 in stylus-sdk/src/testing/mod.rs
github-actions / clippy
unused variable: `input`
warning: unused variable: `input`
--> stylus-sdk/src/testing/mod.rs:53:32
|
53 | fn native_keccak256(&self, input: &[u8]) -> FixedBytes<32> {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_input`
Check warning on line 53 in stylus-sdk/src/host/wasm.rs
github-actions / clippy
unused variable: `input`
warning: unused variable: `input`
--> stylus-sdk/src/host/wasm.rs:53:24
|
53 | fn emit_log(&self, input: &[u8]) {}
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_input`
Check warning on line 10 in stylus-sdk/src/host/wasm.rs
github-actions / clippy
unused variable: `input`
warning: unused variable: `input`
--> stylus-sdk/src/host/wasm.rs:10:32
|
10 | fn native_keccak256(&self, input: &[u8]) -> FixedBytes<32> {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_input`
|
= note: `#[warn(unused_variables)]` on by default