Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7664dfe

Browse files
committedMay 25, 2023
Auto merge of rust-lang#111925 - Manishearth:rollup-z6z6l2v, r=Manishearth
Rollup of 5 pull requests Successful merges: - rust-lang#111741 (Use `ObligationCtxt` in custom type ops) - rust-lang#111840 (Expose more information in `get_body_with_borrowck_facts`) - rust-lang#111876 (Roll compiler_builtins to 0.1.92) - rust-lang#111912 (Use `Option::is_some_and` and `Result::is_ok_and` in the compiler ) - rust-lang#111915 (libtest: Improve error when missing `-Zunstable-options`) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 096309e + 8038606 commit 7664dfe

File tree

115 files changed

+417
-378
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+417
-378
lines changed
 

‎Cargo.lock‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -726,9 +726,9 @@ dependencies = [
726726

727727
[[package]]
728728
name = "compiler_builtins"
729-
version = "0.1.91"
729+
version = "0.1.92"
730730
source = "registry+https://github.com/rust-lang/crates.io-index"
731-
checksum = "571298a3cce7e2afbd3d61abb91a18667d5ab25993ec577a88ee8ac45f00cc3a"
731+
checksum = "64518f1ae689f74db058bbfb3238dfe6eb53f59f4ae712f1ff4348628522e190"
732732
dependencies = [
733733
"cc",
734734
"rustc-std-workspace-core",

‎compiler/rustc_ast/src/ast.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2391,10 +2391,10 @@ pub struct FnDecl {
23912391

23922392
impl FnDecl {
23932393
pub fn has_self(&self) -> bool {
2394-
self.inputs.get(0).map_or(false, Param::is_self)
2394+
self.inputs.get(0).is_some_and(Param::is_self)
23952395
}
23962396
pub fn c_variadic(&self) -> bool {
2397-
self.inputs.last().map_or(false, |arg| matches!(arg.ty.kind, TyKind::CVarArgs))
2397+
self.inputs.last().is_some_and(|arg| matches!(arg.ty.kind, TyKind::CVarArgs))
23982398
}
23992399
}
24002400

‎compiler/rustc_ast/src/attr/mod.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ impl Attribute {
149149
}
150150

151151
pub fn may_have_doc_links(&self) -> bool {
152-
self.doc_str().map_or(false, |s| comments::may_have_doc_links(s.as_str()))
152+
self.doc_str().is_some_and(|s| comments::may_have_doc_links(s.as_str()))
153153
}
154154

155155
pub fn is_proc_macro_attr(&self) -> bool {
@@ -441,12 +441,12 @@ impl NestedMetaItem {
441441

442442
/// Returns `true` if this list item is a MetaItem with a name of `name`.
443443
pub fn has_name(&self, name: Symbol) -> bool {
444-
self.meta_item().map_or(false, |meta_item| meta_item.has_name(name))
444+
self.meta_item().is_some_and(|meta_item| meta_item.has_name(name))
445445
}
446446

447447
/// Returns `true` if `self` is a `MetaItem` and the meta item is a word.
448448
pub fn is_word(&self) -> bool {
449-
self.meta_item().map_or(false, |meta_item| meta_item.is_word())
449+
self.meta_item().is_some_and(|meta_item| meta_item.is_word())
450450
}
451451

452452
/// Gets a list of inner meta items from a list `MetaItem` type.

‎compiler/rustc_ast/src/token.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ impl Token {
607607
/// Returns `true` if the token is an identifier whose name is the given
608608
/// string slice.
609609
pub fn is_ident_named(&self, name: Symbol) -> bool {
610-
self.ident().map_or(false, |(ident, _)| ident.name == name)
610+
self.ident().is_some_and(|(ident, _)| ident.name == name)
611611
}
612612

613613
/// Returns `true` if the token is an interpolated path.

0 commit comments

Comments
 (0)
Please sign in to comment.