Skip to content

Commit 2a0426c

Browse files
committed
Stub display impl for Origin
1 parent 7da9eee commit 2a0426c

File tree

1 file changed

+4
-20
lines changed

1 file changed

+4
-20
lines changed

src/librustc_mir/util/borrowck_errors.rs

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,10 @@ pub enum Origin {
1212
}
1313

1414
impl fmt::Display for Origin {
15-
fn fmt(&self, w: &mut fmt::Formatter<'_>) -> fmt::Result {
16-
// If the user passed `-Z borrowck=compare`, then include
17-
// origin info as part of the error report,
18-
// otherwise
19-
let display_origin = ty::tls::with_opt(|opt_tcx| {
20-
if let Some(tcx) = opt_tcx {
21-
tcx.sess.opts.borrowck_mode == BorrowckMode::Compare
22-
} else {
23-
false
24-
}
25-
});
26-
if display_origin {
27-
match *self {
28-
Origin::Mir => write!(w, " (Mir)"),
29-
Origin::Ast => write!(w, " (Ast)"),
30-
}
31-
} else {
32-
// Print no origin info
33-
Ok(())
34-
}
15+
fn fmt(&self, _w: &mut fmt::Formatter<'_>) -> fmt::Result {
16+
// FIXME(chrisvittal) remove Origin entirely
17+
// Print no origin info
18+
Ok(())
3519
}
3620
}
3721

0 commit comments

Comments
 (0)