Skip to content

Commit e23acc3

Browse files
committed
Replace let Some(..) = with .is_some()
Signed-off-by: wcampbell <wcampbell1995@gmail.com>
1 parent edeb631 commit e23acc3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/rustc_ast/src/attr/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ impl MetaItemKind {
526526
fn list_from_tokens(tokens: TokenStream) -> Option<MetaItemKind> {
527527
let mut tokens = tokens.into_trees().peekable();
528528
let mut result = Vec::new();
529-
while let Some(..) = tokens.peek() {
529+
while tokens.peek().is_some() {
530530
let item = NestedMetaItem::from_tokens(&mut tokens)?;
531531
result.push(item);
532532
match tokens.next() {

compiler/rustc_mir/src/shim.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ fn build_drop_shim<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId, ty: Option<Ty<'tcx>>)
165165
let mut body =
166166
new_body(source, blocks, local_decls_for_sig(&sig, span), sig.inputs().len(), span);
167167

168-
if let Some(..) = ty {
168+
if ty.is_some() {
169169
// The first argument (index 0), but add 1 for the return value.
170170
let dropee_ptr = Place::from(Local::new(1 + 0));
171171
if tcx.sess.opts.debugging_opts.mir_emit_retag {

0 commit comments

Comments
 (0)