Skip to content

Commit 1529183

Browse files
committed
Still not ready
1 parent 8a60e56 commit 1529183

File tree

6 files changed

+467
-157
lines changed

6 files changed

+467
-157
lines changed

src/librustc/middle/const_eval.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ fn cast_const<'tcx>(tcx: &ty::ctxt<'tcx>, val: const_val, ty: Ty) -> CastResult
992992
macro_rules! convert_val {
993993
($intermediate_ty:ty, $const_type:ident, $target_ty:ty) => {
994994
match val {
995-
const_bool(b) => Ok($const_type(b as $intermediate_ty as $target_ty)),
995+
const_bool(b) => Ok($const_type(b as u64 as $intermediate_ty as $target_ty)),
996996
const_uint(u) => Ok($const_type(u as $intermediate_ty as $target_ty)),
997997
const_int(i) => Ok($const_type(i as $intermediate_ty as $target_ty)),
998998
const_float(f) => Ok($const_type(f as $intermediate_ty as $target_ty)),

src/librustc/middle/ty.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -287,15 +287,6 @@ pub struct field_ty {
287287
pub origin: ast::DefId, // The DefId of the struct in which the field is declared.
288288
}
289289

290-
// Contains information needed to resolve types and (in the future) look up
291-
// the types of AST nodes.
292-
#[derive(Copy, Clone, PartialEq, Eq, Hash)]
293-
pub struct creader_cache_key {
294-
pub cnum: CrateNum,
295-
pub pos: usize,
296-
pub len: usize
297-
}
298-
299290
#[derive(Clone, PartialEq, RustcDecodable, RustcEncodable)]
300291
pub struct ItemVariances {
301292
pub types: VecPerParamSpace<Variance>,
@@ -555,6 +546,15 @@ pub enum vtable_origin<'tcx> {
555546
// expr to the associated trait ref.
556547
pub type ObjectCastMap<'tcx> = RefCell<NodeMap<ty::PolyTraitRef<'tcx>>>;
557548

549+
// Contains information needed to resolve types and (in the future) look up
550+
// the types of AST nodes.
551+
#[derive(Copy, Clone, PartialEq, Eq, Hash)]
552+
pub struct creader_cache_key {
553+
pub cnum: CrateNum,
554+
pub pos: usize,
555+
pub len: usize
556+
}
557+
558558
/// A restriction that certain types must be the same size. The use of
559559
/// `transmute` gives rise to these restrictions. These generally
560560
/// cannot be checked until trans; therefore, each call to `transmute`

0 commit comments

Comments
 (0)