Separate collection of crate-local inherent impls from error reporting
This commit is contained in:
parent
11e760b7f4
commit
cfb8419900
22 changed files with 127 additions and 125 deletions
|
@ -1825,10 +1825,12 @@ impl<'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
|
|||
// Doing analysis on local `DefId`s would cause infinite recursion.
|
||||
return;
|
||||
}
|
||||
let Ok(impls) = self.r.tcx.inherent_impls(def_id) else { return };
|
||||
// Look at all the associated functions without receivers in the type's
|
||||
// inherent impls to look for builders that return `Self`
|
||||
let mut items = impls
|
||||
let mut items = self
|
||||
.r
|
||||
.tcx
|
||||
.inherent_impls(def_id)
|
||||
.iter()
|
||||
.flat_map(|i| self.r.tcx.associated_items(i).in_definition_order())
|
||||
// Only assoc fn with no receivers.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue