Skip to content

Extend support of _ in type parameters - #68071

Merged
bors merged 2 commits into
rust-lang:masterfrom
estebank:ice-67995
Jan 10, 2020
Merged

Extend support of _ in type parameters#68071
bors merged 2 commits into
rust-lang:masterfrom
estebank:ice-67995

Conversation

@estebank

Copy link
Copy Markdown
Contributor

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @matthewjasper

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 9, 2020
@rust-highfive

This comment has been minimized.

Comment threadsrc/librustc_typeck/collect.rs Outdated
Comment threadsrc/librustc_typeck/collect.rs Outdated
 - 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.
@estebank

Copy link
Copy Markdown
ContributorAuthor

r? @Centril

Comment threadsrc/librustc_typeck/collect.rs
Comment threadsrc/librustc_typeck/collect.rs
@Centril

Copy link
Copy Markdown
Contributor

r=me with ^-- addressed + comments in private

@CentrilCentril added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 9, 2020
@rust-highfive

This comment has been minimized.

@estebank

Copy link
Copy Markdown
ContributorAuthor

@bors r=Centril

@bors

bors commented Jan 9, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 6e04cf0 has been approved by Centril

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 9, 2020
Centril added a commit to Centril/rust that referenced this pull request Jan 10, 2020
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.
@CentrilCentril mentioned this pull request Jan 10, 2020
Centril added a commit to Centril/rust that referenced this pull request Jan 10, 2020
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.
@CentrilCentril mentioned this pull request Jan 10, 2020
bors added a commit that referenced this pull request Jan 10, 2020
Rollup of 6 pull requests
Successful merges:
- #66463 (Point at opaque and closure type definitions in type errors)
- #67501 (Reduce special treatment for zsts)
- #67820 (Parse the syntax described in RFC 2632)
- #67922 (rustc_ast_lowering: misc cleanup & rustc dep reductions)
- #68071 (Extend support of `_` in type parameters)
- #68073 (expect `fn` after `const unsafe` / `const extern`)
Failed merges:
r? @ghost
@bors
bors merged commit 6e04cf0 into rust-lang:masterJan 10, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Feb 28, 2020
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
```
bors added a commit that referenced this pull request Feb 28, 2020
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
```
@estebank
estebank deleted the ice-67995 branch November 9, 2023 05:17
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ICE: Returning impl Trait with placeholder type parameter

5 participants

@estebank@rust-highfive@Centril@bors@matthewjasper