Skip to content

Provide more useful messages when tests are given -h or --help #7840

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

Closed
wants to merge 1 commit into from

Conversation

alexcrichton
Copy link
Member

Progress on #7824, closes #7825

bors added a commit that referenced this pull request Jul 18, 2013
@bors bors closed this Jul 18, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Oct 21, 2021
Cover `Result` for `question_mark`

closes rust-lang#7135

changelog: [`question_mark`] now covers `Result`
flip1995 pushed a commit to flip1995/rust that referenced this pull request Nov 4, 2021
Fix `question_mark` FP on custom error type

Closes rust-lang#7859

rust-lang#7840 aims to ignore `question_mark` when the return type is custom, which is [covered here](https://github.com/rust-lang/rust-clippy/blob/df65291edd6b89a241fed483ab165c32df468746/tests/ui/question_mark.rs#L144-L149). But this fails when there is a call in conditional predicate

changelog: [`question_mark`] Fix false positive when there is call in conditional predicate
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 9, 2023
…r=Veykril

fix: check tail expressions more precisely in `extract_function`

Fixes rust-lang#13620

When extracting expressions with control flows into a function, we can avoid wrapping tail expressions in `Option` or `Result` when they are also tail expressions of the container we're extracting from (see rust-lang#7840, rust-lang#9773). This is controlled by `ContainerInfo::is_in_tail`, but we've been computing it by checking if the tail expression of the range to extract is contained in the container's syntactically last expression, which may be a block that contains both tail and non-tail expressions (e.g. in rust-lang#13620, the range to be extracted is not a tail expression but we set the flag to true).

This PR tries to compute the flag as precise as possible by utilizing `for_each_tail_expr()` (and also moves the flag to `Function` struct as it's more of a property of the function to be extracted than of the container).
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.

generated test harness should support the --help option
3 participants