mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-23 04:07:11 +00:00
Give correct suggestion for a typo in raw pointers This adds a check for when user wrote `const* T` instead of `*const T`, I just saw how a C-person made this typo and compiler suggests this ```rust --> src/main.rs:2:17 | 2 | let p: const* u8 = 0 as _; | ^ | help: add `mut` or `const` here | 2 | let p: const*mut u8 = 0 as _; | +++ 2 | let p: const*const u8 = 0 as _; | +++++ ``` which is very incorrect also fixes https://github.com/rust-lang/rust/issues/136602 r? compiler