impl_header -> impl_subject
This commit is contained in:
parent
0cd03c917c
commit
64df2ee1eb
2 changed files with 2 additions and 2 deletions
|
@ -55,7 +55,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
||||||
self.parent_module_from_def_id(id.owner)
|
self.parent_module_from_def_id(id.owner)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn impl_header(self, def_id: DefId) -> ImplSubject<'tcx> {
|
pub fn impl_subject(self, def_id: DefId) -> ImplSubject<'tcx> {
|
||||||
self.impl_trait_ref(def_id)
|
self.impl_trait_ref(def_id)
|
||||||
.map(ImplSubject::Trait)
|
.map(ImplSubject::Trait)
|
||||||
.unwrap_or_else(|| ImplSubject::Inherent(self.type_of(def_id)))
|
.unwrap_or_else(|| ImplSubject::Inherent(self.type_of(def_id)))
|
||||||
|
|
|
@ -307,7 +307,7 @@ fn negative_impl<'cx, 'tcx>(
|
||||||
// create a parameter environment corresponding to a (placeholder) instantiation of impl1
|
// create a parameter environment corresponding to a (placeholder) instantiation of impl1
|
||||||
let impl1_env = tcx.param_env(impl1_def_id);
|
let impl1_env = tcx.param_env(impl1_def_id);
|
||||||
|
|
||||||
match tcx.impl_header(impl1_def_id) {
|
match tcx.impl_subject(impl1_def_id) {
|
||||||
ImplSubject::Trait(impl1_trait_ref) => {
|
ImplSubject::Trait(impl1_trait_ref) => {
|
||||||
// Normalize the trait reference. The WF rules ought to ensure
|
// Normalize the trait reference. The WF rules ought to ensure
|
||||||
// that this always succeeds.
|
// that this always succeeds.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue