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

Substitute type params in default type params using them. #11982

Merged
merged 1 commit into from
Feb 2, 2014

Conversation

eddyb
Copy link
Member

@eddyb eddyb commented Feb 2, 2014

Fixes #11964 and closes #8998.

bors added a commit that referenced this pull request Feb 2, 2014
@bors bors closed this Feb 2, 2014
@bors bors merged commit fdf985c into rust-lang:master Feb 2, 2014
@eddyb eddyb deleted the generic-default-type-params branch February 2, 2014 13:33
flip1995 pushed a commit to flip1995/rust that referenced this pull request Feb 8, 2024
FP: `needless_return_with_question_mark` with implicit Error Conversion

Return with a question mark was triggered in situations where the `?` desuraging was performing error conversion via `Into`/`From`.

The desugared `?` produces a match over an expression with type `std::ops::ControlFlow<B,C>` with `B:Result<Infallible, E:Error>` and `C:Result<_, E':Error>`, and the arms perform the conversion. The patch adds another check in the lint that checks that `E == E'`. If `E == E'`, then the `?` is indeed unnecessary.

changelog: False Positive: [`needless_return_with_question_mark`] when implicit Error Conversion occurs.

fixes: rust-lang#11982
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.

ICE with phantom types using default type parameters ICE in typeck subst
3 participants