rust-clippy/tests
bors 08c8cd5014 Auto merge of #12216 - bpandreotti:redundant-type-annotations-fix, r=Jarcho
Fix false positive in `redundant_type_annotations` lint

This PR changes the `redundant_type_annotations` lint to allow slice type annotations (i.e., `&[u8]`) for byte string literals. It will still consider _array_ type annotations (i.e., `&[u8; 4]`) as redundant. The reasoning behind this is that the type of byte string literals is by default a reference to an array, but, by using a type annotation, you can force it to be a slice. For example:
```rust
let a: &[u8; 4] = b"test";
let b: &[u8] = b"test";
```

Now, the type annotation for `a` will still be linted (as it is still redundant), but the type annotation for `b` will not.

Fixes #12212.

changelog: [`redundant_type_annotations`]: Fix false positive with byte string literals
2024-02-07 16:02:28 +00:00
..
test_utils
ui Auto merge of #12216 - bpandreotti:redundant-type-annotations-fix, r=Jarcho 2024-02-07 16:02:28 +00:00
ui-cargo Add lint_groups_priority lint 2024-01-31 18:33:41 +00:00
ui-internal Merge remote-tracking branch 'upstream/master' into rustup 2024-01-25 18:39:39 +01:00
ui-toml rename conf option to allowed_wildcard_imports 2024-02-02 09:22:42 +08:00
workspace_test
check-fmt.rs
clippy.toml
compile-test.rs
dogfood.rs
headers.rs Merge commit 'a859e5cc1ce100df22346a1005da30532d04de59' into clippyup 2023-12-16 14:12:50 +01:00
integration.rs
lint_message_convention.rs
missing-test-files.rs
versioncheck.rs
workspace.rs