Skip to content

Refactor proc macros #203

Refactor proc macros

Refactor proc macros #203

Triggered via pull request September 30, 2024 17:21
Status Failure
Total duration 5m 25s
Artifacts

smoke-test.yml

on: pull_request
Matrix: smoke-test
Fit to window
Zoom out
Zoom in

Annotations

2 errors and 19 warnings
Test (Smoke)(stable)
The process '/usr/bin/git' failed with exit code 1
Test (Smoke)(nightly)
The job was canceled because "wasm32-unknown-unknown_st" failed.
useless conversion to the same type: `std::borrow::Cow<'_, str>`: stylus-proc/src/macros/sol_interface.rs#L112
warning: useless conversion to the same type: `std::borrow::Cow<'_, str>` --> stylus-proc/src/macros/sol_interface.rs:112:26 | 112 | .map(|p| p.type_info.sol_name.clone().into()), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `p.type_info.sol_name.clone()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion = note: `#[warn(clippy::useless_conversion)]` on by default
useless conversion to the same type: `std::borrow::Cow<'_, str>`: stylus-proc/src/macros/sol_interface.rs#L112
warning: useless conversion to the same type: `std::borrow::Cow<'_, str>` --> stylus-proc/src/macros/sol_interface.rs:112:26 | 112 | .map(|p| p.type_info.sol_name.clone().into()), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `p.type_info.sol_name.clone()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion = note: `#[warn(clippy::useless_conversion)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: stylus-proc/src/macros/sol_interface.rs#L42
warning: this expression creates a reference which is immediately dereferenced by the compiler --> stylus-proc/src/macros/sol_interface.rs:42:28 | 42 | visitor.visit_file(&file); | ^^^^^ help: change this to: `file` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: stylus-proc/src/macros/sol_interface.rs#L42
warning: this expression creates a reference which is immediately dereferenced by the compiler --> stylus-proc/src/macros/sol_interface.rs:42:28 | 42 | visitor.visit_file(&file); | ^^^^^ help: change this to: `file` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default
passing a unit value to a function: stylus-proc/src/macros/derive/solidity_error/mod.rs#L56
warning: passing a unit value to a function --> stylus-proc/src/macros/derive/solidity_error/mod.rs:56:9 | 56 | self._ext.add_variant(field); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg = note: `#[warn(clippy::unit_arg)]` on by default help: move the expression in front of the call and replace it with the unit literal `()` | 56 ~ self._ext; 57 ~ ().add_variant(field); |
passing a unit value to a function: stylus-proc/src/macros/derive/solidity_error/mod.rs#L56
warning: passing a unit value to a function --> stylus-proc/src/macros/derive/solidity_error/mod.rs:56:9 | 56 | self._ext.add_variant(field); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg = note: `#[warn(clippy::unit_arg)]` on by default help: move the expression in front of the call and replace it with the unit literal `()` | 56 ~ self._ext; 57 ~ ().add_variant(field); |
first doc comment paragraph is too long: stylus-sdk/src/storage/traits.rs#L100
warning: first doc comment paragraph is too long --> stylus-sdk/src/storage/traits.rs:100:1 | 100 | / /// Binds a storage accessor to a lifetime to prevent aliasing. 101 | | /// Because this type doesn't implement `DerefMut`, mutable methods on the accessor aren't available. 102 | | /// For a mutable accessor, see [`StorageGuardMut`]. | |_ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_long_first_doc_paragraph help: add an empty line | 100 ~ /// Binds a storage accessor to a lifetime to prevent aliasing. 101 + /// |
first doc comment paragraph is too long: stylus-sdk/src/storage/traits.rs#L87
warning: first doc comment paragraph is too long --> stylus-sdk/src/storage/traits.rs:87:1 | 87 | / /// Trait for top-level storage types, usually implemented by proc macros. 88 | | /// Top-level types are special in that their lifetimes track the entirety 89 | | /// of all the EVM state-changes throughout a contract invocation. 90 | | /// 91 | | /// To prevent storage aliasing during reentrancy, you must hold a reference | |_ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_long_first_doc_paragraph help: add an empty line | 87 ~ /// Trait for top-level storage types, usually implemented by proc macros. 88 + /// |
first doc comment paragraph is too long: stylus-sdk/src/storage/traits.rs#L76
warning: first doc comment paragraph is too long --> stylus-sdk/src/storage/traits.rs:76:1 | 76 | / /// Trait for simple accessors that store no more than their wrapped value. 77 | | /// The type's representation must be entirely inline, or storage leaks become possible. 78 | | /// Note: it is a logic error if erasure does anything more than writing the zero-value. | |_ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_long_first_doc_paragraph help: add an empty line | 76 ~ /// Trait for simple accessors that store no more than their wrapped value. 77 + /// |
first doc comment paragraph is too long: stylus-sdk/src/storage/traits.rs#L12
warning: first doc comment paragraph is too long --> stylus-sdk/src/storage/traits.rs:12:1 | 12 | / /// Accessor trait that lets a type be used in persistent storage. 13 | | /// Users can implement this trait to add novel data structures to their contract definitions. 14 | | /// The Stylus SDK by default provides only solidity types, which are represented [`the same way`]. 15 | | /// 16 | | /// [`the same way`]: https://docs.soliditylang.org/en/latest/internals/layout_in_storage.html | |_ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_long_first_doc_paragraph help: add an empty line | 12 ~ /// Accessor trait that lets a type be used in persistent storage. 13 + /// |
first doc comment paragraph is too long: stylus-sdk/src/hostio.rs#L453
warning: first doc comment paragraph is too long --> stylus-sdk/src/hostio.rs:453:11 | 453 | $(#[$meta])* | ^ | ::: stylus-sdk/src/msg.rs:23:1 | 23 | / wrap_hostio!( 24 | | /// Gets the address of the account that called the program. For normal L2-to-L2 transactions 25 | | /// the semantics are equivalent to that of the EVM's [`CALLER`] opcode, including in cases 26 | | /// arising from [`DELEGATE_CALL`]. ... | 34 | | sender SENDER msg_sender Address 35 | | ); | |_- in this macro invocation | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_long_first_doc_paragraph = note: this warning originates in the macro `wrap_hostio` (in Nightly builds, run with -Z macro-backtrace for more info)
first doc comment paragraph is too long: stylus-sdk/src/methods.rs#L6
warning: first doc comment paragraph is too long --> stylus-sdk/src/methods.rs:6:1 | 6 | / /// State mutability of a contract fuction. This is currently used for checking whether contracts 7 | | /// are allowed to override a function from another contract they inherit from. 8 | | /// Users should not need this type outside of proc macros. | |_ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_long_first_doc_paragraph = note: `#[warn(clippy::too_long_first_doc_paragraph)]` on by default
useless conversion to the same type: `std::borrow::Cow<'_, str>`: stylus-proc/src/macros/sol_interface.rs#L112
warning: useless conversion to the same type: `std::borrow::Cow<'_, str>` --> stylus-proc/src/macros/sol_interface.rs:112:26 | 112 | .map(|p| p.type_info.sol_name.clone().into()), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `p.type_info.sol_name.clone()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion = note: `#[warn(clippy::useless_conversion)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: stylus-proc/src/macros/sol_interface.rs#L42
warning: this expression creates a reference which is immediately dereferenced by the compiler --> stylus-proc/src/macros/sol_interface.rs:42:28 | 42 | visitor.visit_file(&file); | ^^^^^ help: change this to: `file` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default
passing a unit value to a function: stylus-proc/src/macros/derive/solidity_error/mod.rs#L56
warning: passing a unit value to a function --> stylus-proc/src/macros/derive/solidity_error/mod.rs:56:9 | 56 | self._ext.add_variant(field); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg = note: `#[warn(clippy::unit_arg)]` on by default help: move the expression in front of the call and replace it with the unit literal `()` | 56 ~ self._ext; 57 ~ ().add_variant(field); |
useless conversion to the same type: `std::borrow::Cow<'_, str>`: stylus-proc/src/macros/sol_interface.rs#L112
warning: useless conversion to the same type: `std::borrow::Cow<'_, str>` --> stylus-proc/src/macros/sol_interface.rs:112:26 | 112 | .map(|p| p.type_info.sol_name.clone().into()), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `p.type_info.sol_name.clone()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion = note: `#[warn(clippy::useless_conversion)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: stylus-proc/src/macros/sol_interface.rs#L42
warning: this expression creates a reference which is immediately dereferenced by the compiler --> stylus-proc/src/macros/sol_interface.rs:42:28 | 42 | visitor.visit_file(&file); | ^^^^^ help: change this to: `file` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default
passing a unit value to a function: stylus-proc/src/macros/derive/solidity_error/mod.rs#L56
warning: passing a unit value to a function --> stylus-proc/src/macros/derive/solidity_error/mod.rs:56:9 | 56 | self._ext.add_variant(field); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg = note: `#[warn(clippy::unit_arg)]` on by default help: move the expression in front of the call and replace it with the unit literal `()` | 56 ~ self._ext; 57 ~ ().add_variant(field); |
Test (Smoke)(stable)
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/