Skip to content

Add help note when using type in place of const - #75611

Merged
bors merged 3 commits into
rust-lang:masterfrom
JulianKnodt:cg_enum_err
Sep 11, 2020
Merged

Add help note when using type in place of const#75611
bors merged 3 commits into
rust-lang:masterfrom
JulianKnodt:cg_enum_err

Conversation

@JulianKnodt

Copy link
Copy Markdown
Contributor

This adds a small help note when it might be possible that wrapping a parameter in braces might resolve the issue of having a type where a const was expected.

Currently, I am displaying the HirId, and I'm not particularly sure where to get the currently displayed path(?).

r? @lcnr

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 16, 2020
@JulianKnodt
JulianKnodtforce-pushed the cg_enum_err branch 2 times, most recently from 1ea9ffc to b3481d0CompareAugust 17, 2020 00:35
Comment threadsrc/librustc_typeck/astconv.rs Outdated
@JulianKnodt
JulianKnodt marked this pull request as ready for review August 20, 2020 02:45
Comment threadsrc/librustc_typeck/astconv.rs Outdated
Comment threadsrc/librustc_typeck/astconv.rs Outdated
Comment threadsrc/librustc_typeck/astconv.rs Outdated
Comment threadsrc/librustc_typeck/astconv.rs Outdated
Comment threadsrc/librustc_typeck/astconv.rs Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome ✨

will try and review the actual code changes next week.

@bors

bors commented Aug 22, 2020

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #75797) made this pull request unmergeable. Please resolve the merge conflicts.

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job x86_64-gnu-tools of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
Initialized empty Git repository in /home/runner/work/rust/rust/.git/
##[command]git remote add origin https://github.com/rust-lang/rust
##[command]git config gc.auto 0
##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/75611/merge:refs/remotes/pull/75611/merge

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@JulianKnodt
JulianKnodtforce-pushed the cg_enum_err branch 5 times, most recently from b11589d to 4a21039CompareAugust 22, 2020 06:00
@bors

bors commented Aug 30, 2020

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #74862) made this pull request unmergeable. Please resolve the merge conflicts.

Comment threadcompiler/rustc_typeck/src/astconv/generics.rs Outdated
Comment threadcompiler/rustc_typeck/src/astconv/generics.rs Outdated
Comment threadcompiler/rustc_typeck/src/astconv/generics.rs Outdated
@JulianKnodt
JulianKnodtforce-pushed the cg_enum_err branch 2 times, most recently from 6abde86 to 714c59bCompareSeptember 1, 2020 21:00
Comment threadcompiler/rustc_typeck/src/astconv/generics.rs Outdated
@lcnr

lcnr commented Sep 11, 2020

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Sep 11, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 96bb2c8 has been approved by lcnr

@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-review Status: Awaiting review from the assignee but also interested parties. labels Sep 11, 2020
@bors

bors commented Sep 11, 2020

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 96bb2c8 with merge a742547...

@bors

bors commented Sep 11, 2020

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions, checks-azure
Approved by: lcnr
Pushing a742547 to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Sep 11, 2020
@bors
bors merged commit a742547 into rust-lang:masterSep 11, 2020
@rustbotrustbot added this to the 1.48.0 milestone Sep 11, 2020
m-ou-se added a commit to m-ou-se/rust that referenced this pull request Nov 16, 2020
improve type const mismatch errors
Doesn't completely remove `check_generic_arg_count` as that would have required some more complex changes but
instead checks type and const params in only one step. Also moved the help added by `@JulianKnodt` in rust-lang#75611 to `generic_arg_mismatch_err`.
r? `@varkor` cc `@petrochenkov`
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.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.

6 participants

@JulianKnodt@bors@rust-log-analyzer@lcnr@rust-highfive@rustbot