Skip to content

Commit

Permalink
fix rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Feb 22, 2021
1 parent 86b3f3f commit fc6c19e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions compiler/rustc_hir/src/hir.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// ignore-tidy-filelength
use crate::def::{DefKind, Namespace, Res};
use crate::def::{CtorKind, DefKind, Namespace, Res};
use crate::def_id::DefId;
crate use crate::hir_id::HirId;
Expand Down Expand Up @@ -1562,7 +1561,7 @@ impl Expr<'_> {
ExprKind::Type(base, _)
| ExprKind::Unary(_, base)
| ExprKind::Field(base, _)
| ExprKind::Index(base, _)
| ExprKind::Index(base, _)
| ExprKind::AddrOf(.., base)
| ExprKind::Cast(base, _) => {
// This isn't exactly true for `Index` and all `Unnary`, but we are using this
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/return/tail-expr-as-potential-return.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ error[E0308]: mismatched types
|
LL | / if x {
LL | | Err(42)
| | ^^^^^^^ expected `()`, found enum `std::result::Result`
| | ^^^^^^^ expected `()`, found enum `Result`
LL | | }
| |_____- expected this to be `()`
|
= note: expected unit type `()`
found enum `std::result::Result<_, {integer}>`
found enum `Result<_, {integer}>`
help: you might have meant to return this value
|
LL | return Err(42);
Expand Down

0 comments on commit fc6c19e

Please sign in to comment.