diff options
| author | Michael Goulet <michael@errs.io> | 2023-11-25 17:12:15 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-11-25 18:47:16 +0000 |
| commit | 079a2e865fbe8d3a0050afdfcd5498c075611e36 (patch) | |
| tree | 2429762abd37b7e23e07f3211995c3f180be85ee /compiler/rustc_middle/src | |
| parent | fe3038f263349190f02491d7467198e17ffb0858 (diff) | |
| download | rust-079a2e865fbe8d3a0050afdfcd5498c075611e36.tar.gz rust-079a2e865fbe8d3a0050afdfcd5498c075611e36.zip | |
is_{some,ok}_and
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/ty/util.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/ty/util.rs b/compiler/rustc_middle/src/ty/util.rs index e9f65d99a2e..2ecb4e28042 100644 --- a/compiler/rustc_middle/src/ty/util.rs +++ b/compiler/rustc_middle/src/ty/util.rs @@ -792,7 +792,7 @@ impl<'tcx> TyCtxt<'tcx> { // If `extern_crate` is `None`, then the crate was injected (e.g., by the allocator). // Treat that kind of crate as "indirect", since it's an implementation detail of // the language. - || self.extern_crate(key.as_def_id()).map_or(false, |e| e.is_direct()) + || self.extern_crate(key.as_def_id()).is_some_and(|e| e.is_direct()) } } |
