diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-01-12 14:29:54 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-01-17 10:02:29 +0000 |
| commit | 557b11187090b0ec749b07858c6ac18f95b7490e (patch) | |
| tree | a618811536e95ee1362633f7efc1355ea4aeb80c /compiler/rustc_resolve/src | |
| parent | 49347ee12dd23c357d45374a6e442e2c32fa4202 (diff) | |
| download | rust-557b11187090b0ec749b07858c6ac18f95b7490e.tar.gz rust-557b11187090b0ec749b07858c6ac18f95b7490e.zip | |
Make crate_inherent_impls fallible and stop using `track_errors` for it
Diffstat (limited to 'compiler/rustc_resolve/src')
| -rw-r--r-- | compiler/rustc_resolve/src/late/diagnostics.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/rustc_resolve/src/late/diagnostics.rs b/compiler/rustc_resolve/src/late/diagnostics.rs index 58ff4d8c793..5a95f2083f6 100644 --- a/compiler/rustc_resolve/src/late/diagnostics.rs +++ b/compiler/rustc_resolve/src/late/diagnostics.rs @@ -1745,12 +1745,10 @@ impl<'a: 'ast, 'ast, 'tcx> LateResolutionVisitor<'a, '_, 'ast, '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 = self - .r - .tcx - .inherent_impls(def_id) + let mut items = impls .iter() .flat_map(|i| self.r.tcx.associated_items(i).in_definition_order()) // Only assoc fn with no receivers. |
