Skip to content

Commit 6e5951c

Browse files
committed
Remove unused type
1 parent 57e190c commit 6e5951c

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

src/librustc/middle/const_val.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ use ty::query::TyCtxtAt;
1515
use mir::interpret::ConstValue;
1616
use errors::DiagnosticBuilder;
1717

18-
use graphviz::IntoCow;
1918
use syntax_pos::Span;
2019
use syntax::ast;
2120

22-
use std::borrow::Cow;
2321
use rustc_data_structures::sync::Lrc;
2422

2523
pub type EvalResult<'tcx> = Result<&'tcx ty::Const<'tcx>, ConstEvalErr<'tcx>>;
@@ -43,22 +41,6 @@ pub struct FrameInfo {
4341
pub lint_root: Option<ast::NodeId>,
4442
}
4543

46-
#[derive(Clone, Debug)]
47-
pub enum ConstEvalErrDescription<'a, 'tcx: 'a> {
48-
Simple(Cow<'a, str>),
49-
Backtrace(&'a ::mir::interpret::EvalError<'tcx>, &'a [FrameInfo]),
50-
}
51-
52-
impl<'a, 'tcx> ConstEvalErrDescription<'a, 'tcx> {
53-
/// Return a one-line description of the error, for lints and such
54-
pub fn into_oneline(self) -> Cow<'a, str> {
55-
match self {
56-
ConstEvalErrDescription::Simple(simple) => simple,
57-
ConstEvalErrDescription::Backtrace(miri, _) => format!("{}", miri).into_cow(),
58-
}
59-
}
60-
}
61-
6244
impl<'a, 'gcx, 'tcx> ConstEvalErr<'tcx> {
6345
pub fn struct_error(&self,
6446
tcx: TyCtxtAt<'a, 'gcx, 'tcx>,

0 commit comments

Comments
 (0)