-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
B-unstableunstable featureunstable featureC-featureCategory: feature requestCategory: feature request
Description
in the code snippet provided below, rust-analyzer incorrectly emits an on-the-fly diagnostic telling that field a is missing from the struct expression, even though it has a default value through the use of the default_field_values feature
rust-analyzer version: rust-analyzer version: 0.3.2362-standalone (fb133c8 2025-03-29)
rustc version: rustc 1.87.0-nightly (b48576b 2025-03-22)
editor or extension: VSCode 1.98.2, extension version same as RA version
relevant settings: none
repository link (if public, optional): https://github.com/elenakrittik/msf-bug
code snippet to reproduce:
#![feature(default_field_values)]
#![allow(clippy::no_effect)]
#![allow(dead_code)]
struct Struct {
a: usize = 0,
b: usize,
}
fn main() {
Struct { b: 1, .. }; // <-- here
}Metadata
Metadata
Assignees
Labels
B-unstableunstable featureunstable featureC-featureCategory: feature requestCategory: feature request