about summary refs log tree commit diff
path: root/tests/rustdoc-js-std/enum-option.js
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com>2023-06-04 20:33:33 +0800
committer许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com>2023-06-04 20:49:30 +0800
commit55b4549602d2f1105aedd7a1357a62db4f128167 (patch)
tree100f6250a96718af97da4da0aabe33aecaed0c12 /tests/rustdoc-js-std/enum-option.js
parent9eee230cd0a56bfba3ce65121798d9f9f4341cdd (diff)
downloadrust-55b4549602d2f1105aedd7a1357a62db4f128167.tar.gz
rust-55b4549602d2f1105aedd7a1357a62db4f128167.zip
Show note for type ascription interpreted as a constant pattern, 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 commit extends the note for type ascription as a constant pattern
to `AscribeUserType` patterns as well.
Diffstat (limited to 'tests/rustdoc-js-std/enum-option.js')
0 files changed, 0 insertions, 0 deletions