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

Ignore another fourcc test on cross compiles #12216

Merged
merged 1 commit into from
Feb 12, 2014

Conversation

alexcrichton
Copy link
Member

Hurray more snapshot blockers!

bors added a commit that referenced this pull request Feb 12, 2014
@bors bors closed this Feb 12, 2014
@bors bors merged commit 064281c into rust-lang:master Feb 12, 2014
@alexcrichton alexcrichton deleted the another-snap-fix branch February 14, 2014 04:20
flip1995 pushed a commit to flip1995/rust that referenced this pull request Feb 8, 2024
…s-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 rust-lang#12212.

changelog: [`redundant_type_annotations`]: Fix false positive with byte string literals
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants