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

Const parameters can not be inferred with _ help note #79734

Merged
merged 1 commit into from
Dec 6, 2020

Conversation

eopb
Copy link
Contributor

@eopb eopb commented Dec 5, 2020

This should close: #79557

Example output

error[E0747]: type provided when a constant was expected
 --> inferred_const_note.rs:6:19
  |
6 |     let a = foo::<_, 2>([0, 1, 2]);
  |                   ^
  |
  = help: Const parameters can not be inferred with `_`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0747`.

r? @lcnr

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 5, 2020
@varkor
Copy link
Member

varkor commented Dec 5, 2020

I think this closes #79557, but #70754 should be left open for actually supporting _ for const arguments.

@varkor
Copy link
Member

varkor commented Dec 5, 2020

Could you squash the three commits into one? After that, it looks good to me.

Small improvement. Thanks varkor

Co-authored-by: varkor <github@varkor.com>

Bless
@eopb eopb force-pushed the inferred_const_note branch from 8914957 to 6845e22 Compare December 5, 2020 15:39
@eopb
Copy link
Contributor Author

eopb commented Dec 5, 2020

Done, Thanks @varkor

@varkor
Copy link
Member

varkor commented Dec 5, 2020

Thanks!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Dec 5, 2020

📌 Commit 6845e22 has been approved by varkor

@bors bors 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-review Status: Awaiting review from the assignee but also interested parties. labels Dec 5, 2020
@varkor varkor assigned varkor and unassigned lcnr Dec 5, 2020
@varkor varkor added the A-const-generics Area: const generics (parameters and arguments) label Dec 5, 2020
@bors
Copy link
Contributor

bors commented Dec 6, 2020

⌛ Testing commit 6845e22 with merge a68864b...

@bors
Copy link
Contributor

bors commented Dec 6, 2020

☀️ Test successful - checks-actions
Approved by: varkor
Pushing a68864b to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 6, 2020
@bors bors merged commit a68864b into rust-lang:master Dec 6, 2020
@rustbot rustbot added this to the 1.50.0 milestone Dec 6, 2020
@eopb eopb deleted the inferred_const_note branch December 6, 2020 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-const-generics Area: const generics (parameters and arguments) merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: 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.

[ER] Suboptimal error message in a case of min_const_generics inference failure
6 participants