bors
e4106065bf
Auto merge of #112272 - jieyouxu:issue-112269, r=compiler-errors
...
Show note for type ascription on a local binding interpreted as a constant pattern and not a new variable
Given the code
```rust
pub fn main() {
const y: i32 = 4;
let y: i32 = 3;
}
```
`y` in the let binding is actually interpreted as a constant pattern and is not a new variable, causing confusing diagnostics about refutable patterns in local binding.
This PR extends the note for type ascription of a constant pattern to `AscribeUserType` patterns which have `Constant` subpatterns.
Fixes #112269 .
2023-06-05 01:33:58 +00:00
..
2023-05-24 01:17:38 +02:00
2023-06-04 10:56:00 +02:00
2023-06-02 19:22:25 +00:00
2023-05-28 21:53:56 +00:00
2023-05-31 17:45:45 +00:00
2023-05-29 18:37:53 +02:00
2023-05-24 19:35:59 -03:00
2023-05-30 12:40:35 +02:00
2023-05-30 13:03:40 +02:00
2023-06-02 07:57:21 +00:00
2023-06-01 14:45:18 +00:00
2023-06-02 07:57:21 +00:00
2023-05-26 06:55:06 +10:00
2023-05-31 17:45:45 +00:00
2023-05-26 13:15:15 -04:00
2023-05-29 12:07:41 -03:00
2023-05-24 19:35:59 -03:00
2023-05-24 19:35:59 -03:00
2023-05-30 13:04:25 +02:00
2023-06-01 11:09:43 +05:30
2023-05-27 18:49:07 +08:00
2023-06-01 02:28:31 +08:00
2023-06-03 07:25:40 +00:00
2023-05-29 19:58:11 +03:00
2023-06-03 09:22:47 +08:00
2023-05-25 17:40:46 +00:00
2023-05-31 16:51:25 +00:00
2023-05-24 21:15:50 -03:00
2023-05-31 14:02:57 +00:00
2023-05-26 13:15:15 -04:00
2023-06-04 20:49:30 +08:00
2023-06-03 20:38:10 +02:00
2023-05-24 19:16:07 +00:00
2023-06-01 14:45:18 +00:00
2023-06-02 01:33:09 +00:00
2023-05-27 16:35:16 +02:00
2023-05-28 16:55:21 +08:00
2023-05-31 14:02:57 +00:00
2023-05-26 06:23:03 +00:00
2023-05-27 00:18:28 +02:00
2023-05-24 19:54:13 -03:00
2023-05-27 18:49:07 +08:00
2023-06-01 23:22:54 +00:00
2023-06-01 14:45:18 +00:00
2023-05-29 12:07:41 -03:00
2023-05-31 13:47:36 +00:00
2023-06-01 18:21:42 +00:00
2023-05-24 11:18:20 -05:00
2023-05-26 18:55:02 +01:00
2023-05-26 12:16:30 -05:00
2023-06-02 22:07:57 +00:00
2023-06-01 11:09:43 +05:30
2023-06-03 20:38:12 +02:00
2023-05-26 16:01:29 +01:00
2023-05-24 19:16:07 +00:00
2023-05-24 19:35:59 -03:00
2023-05-27 16:35:16 +02:00