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

"doesn't have a size known at compile-time" should underline the type, not the whole size_of function #61860

Closed
scottmcm opened this issue Jun 15, 2019 · 0 comments · Fixed by #64151
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-enhancement Category: An issue proposing an enhancement or a PR with one. P-low Low priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@scottmcm
Copy link
Member

scottmcm commented Jun 15, 2019

Low-importance nitpick: If I do

std::mem::size_of::<[String]>()

I get an error like

2 | std::mem::size_of::<[String]>()
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time

Arguably I should get a smaller underline like this:

2 | std::mem::size_of::<[String]>()
  |                     ^^^^^^^^ doesn't have a size known at compile-time

because it's the generic argument that doesn't have the size, not the function.

@scottmcm scottmcm added the P-low Low priority label Jun 15, 2019
@jonas-schievink jonas-schievink added A-diagnostics Area: Messages for errors, warnings, and lints C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 15, 2019
@bors bors closed this as completed in c0b7e71 Sep 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-enhancement Category: An issue proposing an enhancement or a PR with one. P-low Low priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants