feat: Diagnose missing assoc items in trait impls#15895
feat: Diagnose missing assoc items in trait impls#15895bors merged 1 commit intorust-lang:masterfrom
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.
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?
|
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.