diff options
| author | Alexander Regueiro <alexreg@me.com> | 2018-01-06 03:36:39 +0000 |
|---|---|---|
| committer | Oliver Schneider <git-spam-no-reply9815368754983@oli-obk.de> | 2018-03-08 08:08:14 +0100 |
| commit | 4c9b1b13ddc3f3120bb7aee106a261613dfcb000 (patch) | |
| tree | ccb56eb46e7647c39fb1dc559e5c71656ae3593b /src/librustdoc | |
| parent | 28572d2c1fae5ab4c6bcade0c1a9fa485da0ec61 (diff) | |
Initial changes to librustc to support const trait fns.
Diffstat (limited to 'src/librustdoc')
| -rw-r--r-- | src/librustdoc/clean/mod.rs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index d0230a69374..d1e6f27069c 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -51,7 +51,6 @@ use std::collections::hash_map::Entry; use std::collections::VecDeque; use std::fmt; -use rustc_const_math::ConstInt; use std::default::Default; use std::{mem, slice, vec}; use std::iter::{FromIterator, once}; @@ -2507,9 +2506,7 @@ impl Clean<Type> for hir::Ty { ty: cx.tcx.types.usize }) }); - let n = if let ConstVal::Integral(ConstInt::Usize(n)) = n.val { - n.to_string() - } else if let ConstVal::Unevaluated(def_id, _) = n.val { + let n = if let ConstVal::Unevaluated(def_id, _) = n.val { if let Some(node_id) = cx.tcx.hir.as_local_node_id(def_id) { print_const_expr(cx, cx.tcx.hir.body_owned_by(node_id)) } else { @@ -2640,9 +2637,7 @@ impl<'tcx> Clean<Type> for Ty<'tcx> { n = new_n; } }; - let n = if let ConstVal::Integral(ConstInt::Usize(n)) = n.val { - n.to_string() - } else if let ConstVal::Unevaluated(def_id, _) = n.val { + let n = if let ConstVal::Unevaluated(def_id, _) = n.val { if let Some(node_id) = cx.tcx.hir.as_local_node_id(def_id) { print_const_expr(cx, cx.tcx.hir.body_owned_by(node_id)) } else { |
