Skip to content

Conversation

@kouhe3
Copy link
Contributor

@kouhe3 kouhe3 commented Jan 5, 2026

fix #19780

Add enum and field to track = and ..

Create a new function to determine match and missing msg

behavior

#![feature(default_field_values)]
fn main() {
    let u1 = UserInfo { id: 10, $0 ,.. }; // trigger suggestion: age,email
               ^^^^^^ 💡 missing field 
                    | -email
}

struct UserInfo {
    id: i32,
    age: f32 = 1.0,
    email: String,
}

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 5, 2026
@kouhe3 kouhe3 marked this pull request as draft January 5, 2026 13:07
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 5, 2026
@kouhe3 kouhe3 force-pushed the default_field_values branch from c06113d to 046077b Compare January 6, 2026 15:53
@kouhe3 kouhe3 marked this pull request as ready for review January 6, 2026 16:36
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 6, 2026
derive copy
ignore field
infer_mut_expr
handle RecordSpread::Empty not supported
use new matched function
move funtion
default_value: Option<ExprId>
rename empty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

incorrect "missing structure fields" on-the-fly diagnostic

3 participants