ty::KContainer -> ty::AssocItemContainer::K
This commit is contained in:
parent
8e6af16192
commit
be4b0261c2
21 changed files with 59 additions and 61 deletions
|
@ -26,8 +26,8 @@ pub(crate) enum MethodLateContext {
|
|||
pub(crate) fn method_context(cx: &LateContext<'_>, id: LocalDefId) -> MethodLateContext {
|
||||
let item = cx.tcx.associated_item(id);
|
||||
match item.container {
|
||||
ty::TraitContainer => MethodLateContext::TraitAutoImpl,
|
||||
ty::ImplContainer => match cx.tcx.impl_trait_ref(item.container_id(cx.tcx)) {
|
||||
ty::AssocItemContainer::Trait => MethodLateContext::TraitAutoImpl,
|
||||
ty::AssocItemContainer::Impl => match cx.tcx.impl_trait_ref(item.container_id(cx.tcx)) {
|
||||
Some(_) => MethodLateContext::TraitImpl,
|
||||
None => MethodLateContext::PlainImpl,
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue