Uh oh!
There was an error while loading. Please reload this page.
Suggest type param when encountering _ in item signatures - #67597
Conversation
rust-highfive
commented
Dec 24, 2019
r? @davidtwco (rust_highfive has picked a reviewer for you, use r? to override) |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
was better before imo -- more obvious
This comment has been minimized.
This comment has been minimized.
davidtwco
commented
Dec 25, 2019
r? @oli-obk |
af2338d to
1c07fccCompare
This comment has been minimized.
This comment has been minimized.
1c07fcc to
859fc20Compare
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
859fc20 to
4b4a132CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
b3df95e to
63f3488Compareestebank
commented
Dec 27, 2019
done |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
oli-obk
commented
Dec 28, 2019
r=me with the comments resolved |
63f3488 to
d3f79fcCompareestebank
commented
Dec 28, 2019
@bors r=oli-obk |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
When encountering `_` type placeholder in fn arguments and return type, suggest using generic type parameters. Expand what counts as an inferable return type to slice, array and tuples of `_`.
d3f79fc to
261b606Compareestebank
commented
Dec 30, 2019
@bors r=oli-obk |
bors
commented
Dec 30, 2019
📌 Commit 261b606 has been approved by |
bors
commented
Dec 31, 2019
Suggest type param when encountering `_` in item signatures Fix#27435.
bors
commented
Dec 31, 2019
☀️ Test successful - checks-azure |
Extend support of `_` in type parameters
- Account for `impl Trait<_>`.
- Provide a reasonable `Span` for empty `Generics` in `impl`s.
- Account for `fn foo<_>(_: _) {}` to suggest `fn foo<T>(_: T) {}`.
- Fixrust-lang#67995. Follow up to rust-lang#67597.Extend support of `_` in type parameters
- Account for `impl Trait<_>`.
- Provide a reasonable `Span` for empty `Generics` in `impl`s.
- Account for `fn foo<_>(_: _) {}` to suggest `fn foo<T>(_: T) {}`.
- Fixrust-lang#67995. Follow up to rust-lang#67597.Account for bounds and asociated items when denying `_` Fixrust-lang#68801, rust-lang#69204. Follow up to rust-lang#67597 and rust-lang#68071. Output for the original ICE report: ``` Checking vinoteca v5.0.0 (/Users/ekuber/workspace/vinoteca) error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> src/producers.rs:43:70 | 43 | pub fn top<Table: diesel::Table + diesel::query_dsl::InternalJoinDsl<_, diesel::query_source::joins::Inner, _>>(table: Table, limit: usize, connection: DbConn) -> RestResult<Vec<TopWineType>> { | ^ not allowed in type signatures ^ not allowed in type signatures error: aborting due to previous error ```
Account for bounds and asociated items when denying `_` Fix#68801, #69204. Follow up to #67597 and #68071. Output for the original ICE report: ``` Checking vinoteca v5.0.0 (/Users/ekuber/workspace/vinoteca) error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> src/producers.rs:43:70 | 43 | pub fn top<Table: diesel::Table + diesel::query_dsl::InternalJoinDsl<_, diesel::query_source::joins::Inner, _>>(table: Table, limit: usize, connection: DbConn) -> RestResult<Vec<TopWineType>> { | ^ not allowed in type signatures ^ not allowed in type signatures error: aborting due to previous error ```
Fix#27435.