heroku / libcnb.rs

A framework for writing Cloud Native Buildpacks in Rust
BSD 3-Clause "New" or "Revised" License
34 stars 6 forks source link

Lint errors with Rust 1.75 / 1.76 #756

Closed edmorley closed 8 months ago

edmorley commented 8 months ago

The lint CI job on main is failing after the Rust 1.75 release, with:

warning: all fields have the same postfix: `name`
   --> libcnb-test/src/test_runner.rs:179:1
    |
179 | / pub(crate) struct TemporaryDockerResources {
180 | |     pub(crate) build_cache_volume_name: String,
181 | |     pub(crate) image_name: String,
182 | |     pub(crate) launch_cache_volume_name: String,
183 | | }
    | |_^
    |
    = help: remove the postfixes
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#struct_field_names
    = note: `-W clippy::struct-field-names` implied by `-W clippy::pedantic`
    = help: to override `-W clippy::pedantic` add `#[allow(clippy::struct_field_names)]`

In addition, locally using Rust 1.76 beta I get:

warning: items after a test module
   --> libcnb/src/layer_env.rs:598:1
    |
598 | mod tests {
    | ^^^^^^^^^
...
930 | const PATH_LIST_SEPARATOR: &str = ":";
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_test_module
    = note: `#[warn(clippy::items_after_test_module)]` on by default
    = help: move the items to before the test module was defined

GUS-W-14739086.