Use Option::is_some_and
and Result::is_ok_and
in the compiler
This commit is contained in:
parent
70db836922
commit
fb0f74a8c9
87 changed files with 148 additions and 158 deletions
|
@ -1477,7 +1477,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
|||
}
|
||||
|
||||
fn is_builtin_macro(&mut self, res: Res) -> bool {
|
||||
self.get_macro(res).map_or(false, |macro_data| macro_data.ext.builtin_name.is_some())
|
||||
self.get_macro(res).is_some_and(|macro_data| macro_data.ext.builtin_name.is_some())
|
||||
}
|
||||
|
||||
fn macro_def(&self, mut ctxt: SyntaxContext) -> DefId {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue