diff options
| author | Oliver Schneider <github35764891676564198441@oli-obk.de> | 2018-06-25 15:10:33 +0200 |
|---|---|---|
| committer | Oliver Schneider <github35764891676564198441@oli-obk.de> | 2018-06-28 11:01:35 +0200 |
| commit | 6e5951c7343cc1addecffb7de97b89c15a7030dd (patch) | |
| tree | 2c45132292c75ed942ba9ad4066139b7659888ae | |
| parent | 57e190c85024de27f1c8df8936e0b610a96908f5 (diff) | |
| download | rust-6e5951c7343cc1addecffb7de97b89c15a7030dd.tar.gz rust-6e5951c7343cc1addecffb7de97b89c15a7030dd.zip | |
Remove unused type
| -rw-r--r-- | src/librustc/middle/const_val.rs | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/librustc/middle/const_val.rs b/src/librustc/middle/const_val.rs index 94273287f07..c39422d21c0 100644 --- a/src/librustc/middle/const_val.rs +++ b/src/librustc/middle/const_val.rs @@ -15,11 +15,9 @@ use ty::query::TyCtxtAt; use mir::interpret::ConstValue; use errors::DiagnosticBuilder; -use graphviz::IntoCow; use syntax_pos::Span; use syntax::ast; -use std::borrow::Cow; use rustc_data_structures::sync::Lrc; pub type EvalResult<'tcx> = Result<&'tcx ty::Const<'tcx>, ConstEvalErr<'tcx>>; @@ -43,22 +41,6 @@ pub struct FrameInfo { pub lint_root: Option<ast::NodeId>, } -#[derive(Clone, Debug)] -pub enum ConstEvalErrDescription<'a, 'tcx: 'a> { - Simple(Cow<'a, str>), - Backtrace(&'a ::mir::interpret::EvalError<'tcx>, &'a [FrameInfo]), -} - -impl<'a, 'tcx> ConstEvalErrDescription<'a, 'tcx> { - /// Return a one-line description of the error, for lints and such - pub fn into_oneline(self) -> Cow<'a, str> { - match self { - ConstEvalErrDescription::Simple(simple) => simple, - ConstEvalErrDescription::Backtrace(miri, _) => format!("{}", miri).into_cow(), - } - } -} - impl<'a, 'gcx, 'tcx> ConstEvalErr<'tcx> { pub fn struct_error(&self, tcx: TyCtxtAt<'a, 'gcx, 'tcx>, |
