Skip to content

Commit 0a8d4db

Browse files
authored
Rollup merge of #75353 - estebank:tiny, r=jyn514
Tiny cleanup, remove unnecessary `unwrap` Remove unnecessary `unwrap`.
2 parents e51a839 + 7e01809 commit 0a8d4db

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustc_resolve/late/diagnostics.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -392,15 +392,15 @@ impl<'a> LateResolutionVisitor<'a, '_, '_> {
392392
/// return the span of whole call and the span for all arguments expect the first one (`self`).
393393
fn call_has_self_arg(&self, source: PathSource<'_>) -> Option<(Span, Option<Span>)> {
394394
let mut has_self_arg = None;
395-
if let PathSource::Expr(parent) = source {
396-
match &parent?.kind {
395+
if let PathSource::Expr(Some(parent)) = source {
396+
match &parent.kind {
397397
ExprKind::Call(_, args) if !args.is_empty() => {
398398
let mut expr_kind = &args[0].kind;
399399
loop {
400400
match expr_kind {
401401
ExprKind::Path(_, arg_name) if arg_name.segments.len() == 1 => {
402402
if arg_name.segments[0].ident.name == kw::SelfLower {
403-
let call_span = parent.unwrap().span;
403+
let call_span = parent.span;
404404
let tail_args_span = if args.len() > 1 {
405405
Some(Span::new(
406406
args[1].span.lo(),

0 commit comments

Comments
 (0)