-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Diagnose missing assoc items in trait impls #15895
Conversation
@bors r+ |
☀️ Test successful - checks-actions |
match item { | ||
AssocItemId::FunctionId(it) => db.function_data(it).name.clone(), | ||
AssocItemId::ConstId(it) => { | ||
db.const_data(it).name.as_ref().unwrap().clone() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just realized I forgot to replace the unwrap here. @Young-Flash since you are looking into #15909 already, do you mind changing this to ?
and make this map
a filter_map
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
This feature seems like a regression to me, or at the very least is not representative of compiler behavior. An associated const can have a default value on the trait, allowing implementations to inherit the default value. Since updating to Example of error-free (rustc) code: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=4a8dad8097690736315ab7e64f19d0c9
The above code results in a rust-analyzer error on the |
@jnicholls can you use the pre-release version until next week? |
@lnicola Thanks the the wicked fast reply! Yes I can use the pre-release version, no problem. |
Apologies, I didn't notice #15911 up above. Good deal! Have a great rest of your week. |
No description provided.