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

librustc: use new [ty, .. len] syntax for fixed vector errors. #5757

Closed
wants to merge 1 commit into from

Conversation

huonw
Copy link
Member

@huonw huonw commented Apr 6, 2013

Currently error messages say mismatched types: expected uintbut found[uint * 10] (expected uint but found vector) rather than [uint, .. 10].

bors added a commit that referenced this pull request Apr 6, 2013
…nger

Currently error messages say ``mismatched types: expected `uint` but found `[uint * 10]` (expected uint but found vector)`` rather than `[uint, .. 10]`.
@bors bors closed this Apr 6, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Mar 24, 2022
Moved ``[try_err]`` to restriction

Fixes rust-lang#5757

changelog: Moved try_err lint to rescrition for rust-lang#5757
flip1995 pushed a commit to flip1995/rust that referenced this pull request Aug 8, 2024
Add test for `try_err` lint within try blocks.

Fixes rust-lang#5757

Turns out the current `try_err` implementation already skips expressions inside of a try block.

When inside of a try block, `Err(_)?` is desugared to a `break` instead of normal `return` . This makes `find_return_type()` function at [this line](https://github.com/rust-lang/rust-clippy/blob/eb4d88e690c431691bc0fd8eaa9f7096ecc2a723/clippy_lints/src/matches/try_err.rs#L29) always returns `None` and skips the check.

I just added a test case for try block.

changelog: none
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