Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lint errors in Rust 1.73 and 1.74 #696

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

edmorley
Copy link
Member

@edmorley edmorley commented Oct 6, 2023

Fixes the following new error in Rust 1.73:

$ RUSTDOCFLAGS="-D warnings" cargo doc --all-features --document-private-items --no-deps
...
error: redundant explicit link target
  --> libcnb-test/src/test_runner.rs:35:34
   |
35 |     /// signalled via [`Result`](Result) values. Instead, this function panics whenever an unexpected error
   |                        --------  ^^^^^^ explicit target is redundant
   |                        |
   |                        because label contains path that resolves to same destination
   |
   = note: when a link's destination is not specified,
           the label is used to resolve intra-doc links
   = note: `-D rustdoc::redundant-explicit-links` implied by `-D warnings`
help: remove explicit link target
   |
35 |     /// signalled via [`Result`] values. Instead, this function panics whenever an unexpected error
   |                       ~~~~~~~~~~
...

And errors like these in Rust 1.74:

$ cargo clippy --all-targets
warning: unnecessary hashes around raw string literal
  --> libcnb-package/src/cross_compile.rs:21:17
   |
21 | /                 r#"For cross-compilation from macOS to x86_64-unknown-linux-musl, a C compiler and
22 | | linker for the target platform must be installed on your computer.
23 | |
24 | | The easiest way to install the required cross-compilation toolchain is to run:
...  |
27 | | For more information, see:
28 | | https://github.com/messense/homebrew-macos-cross-toolchains"#,
   | |_____________________________________________________________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes

GUS-W-14249508.

Fixes the following new error in Rust 1.73:

```
$ RUSTDOCFLAGS="-D warnings" cargo doc --all-features --document-private-items --no-deps
...
error: redundant explicit link target
  --> libcnb-test/src/test_runner.rs:35:34
   |
35 |     /// signalled via [`Result`](Result) values. Instead, this function panics whenever an unexpected error
   |                        --------  ^^^^^^ explicit target is redundant
   |                        |
   |                        because label contains path that resolves to same destination
   |
   = note: when a link's destination is not specified,
           the label is used to resolve intra-doc links
   = note: `-D rustdoc::redundant-explicit-links` implied by `-D warnings`
help: remove explicit link target
   |
35 |     /// signalled via [`Result`] values. Instead, this function panics whenever an unexpected error
   |                       ~~~~~~~~~~
...
```

And errors like these in Rust 1.74:

```
$ cargo clippy --all-targets
warning: unnecessary hashes around raw string literal
  --> libcnb-package/src/cross_compile.rs:21:17
   |
21 | /                 r#"For cross-compilation from macOS to x86_64-unknown-linux-musl, a C compiler and
22 | | linker for the target platform must be installed on your computer.
23 | |
24 | | The easiest way to install the required cross-compilation toolchain is to run:
...  |
27 | | For more information, see:
28 | | https://github.com/messense/homebrew-macos-cross-toolchains"#,
   | |_____________________________________________________________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
```
@edmorley edmorley self-assigned this Oct 6, 2023
@edmorley edmorley marked this pull request as ready for review October 6, 2023 12:24
@edmorley edmorley requested a review from a team as a code owner October 6, 2023 12:24
@edmorley edmorley enabled auto-merge (squash) October 6, 2023 12:25
@edmorley edmorley merged commit b1216b0 into main Oct 6, 2023
@edmorley edmorley deleted the edmorley/rust-1.73-1.74-clippy branch October 6, 2023 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants