rust icon indicating copy to clipboard operation
rust copied to clipboard

Suggest changing type to const parameters if we encounter a type in the trait bound position

Open fmease opened this issue 1 year ago • 5 comments

The first commit is just drive-by cleanup.

Provide a structured suggestion if the user forgot to prefix a “const parameter” with const, e.g., in struct Tagged<TAG: u64>;. This happens to me from time to time. Maybe C++ devs are also prone to this mistake given template syntax looks like template<typename T, uint32_t N>.

fmease avatar Feb 02 '24 02:02 fmease

r? @b-naber

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

rustbot avatar Feb 02 '24 02:02 rustbot

r? compiler (b-naber has been inactive for more than two months)

fmease avatar Feb 02 '24 02:02 fmease

@bors r+ rollup

compiler-errors avatar Feb 02 '24 02:02 compiler-errors

:pushpin: Commit 5906237b32a83a1df215b87bbafcc926bf49cd66 has been approved by compiler-errors

It is now in the queue for this repository.

bors avatar Feb 02 '24 02:02 bors

:evergreen_tree: The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened.

bors avatar Feb 02 '24 02:02 bors