Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 6 pull requests #51884

Merged
merged 22 commits into from
Jun 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
6b0c2fd
Use assert_eq! in copy_from_slice
jonas-schievink Jun 24, 2018
0fa166a
Detect overflows of non u32 shifts
oli-obk Jun 27, 2018
58fdac6
Simplify const error reporting
oli-obk Jun 14, 2018
6f8fe4e
Eliminate old CTFE's `ErrKind`
oli-obk Jun 19, 2018
57e190c
Address review comments
oli-obk Jun 25, 2018
6e5951c
Remove unused type
oli-obk Jun 25, 2018
6005b0a
Move the Lrc outside the error type and name the fields
oli-obk Jun 25, 2018
0599477
Move everything over from `middle::const_val` to `mir::interpret`
oli-obk Jun 25, 2018
221a499
Fixup
oli-obk Jun 25, 2018
4bb9648
Merge `ConstVal` and `ConstValue`
oli-obk Jun 25, 2018
4eea1a4
Don't const propagate the body of constants
oli-obk Jun 27, 2018
4d47330
Turn the use of erroneous constants into errors again
oli-obk Jun 27, 2018
2a55d2f
Rebase fallout
oli-obk Jun 28, 2018
fc8f852
Remove process::id from 'Stabilized APIs' in 1.27
Lireer Jun 28, 2018
8983ff5
Explicitely disable WASM code generation for Emscripten
badboy Jun 28, 2018
54a04b3
Provide existing ref suggestions for more E0308 errors
estebank Jun 26, 2018
57aceee
Rollup merge of #51636 - oli-obk:const_diagnostics, r=eddyb
Mark-Simulacrum Jun 28, 2018
85804f6
Rollup merge of #51765 - jonas-schievink:patch-1, r=KodrAus
Mark-Simulacrum Jun 28, 2018
e0179df
Rollup merge of #51822 - estebank:suggest-more, r=nikomatsakis
Mark-Simulacrum Jun 28, 2018
7b8fc87
Rollup merge of #51839 - oli-obk:const_shift_overflow, r=nikomatsakis
Mark-Simulacrum Jun 28, 2018
7c0dd79
Rollup merge of #51868 - Lireer:master, r=pietroalbini
Mark-Simulacrum Jun 28, 2018
3332c0c
Rollup merge of #51875 - badboy:emscripten-no-wasm, r=nikomatsakis
Mark-Simulacrum Jun 28, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ Stabilized APIs
- [`Take::set_limit`]
- [`hint::unreachable_unchecked`]
- [`os::unix::process::parent_id`]
- [`process::id`]
- [`ptr::swap_nonoverlapping`]
- [`slice::rsplit_mut`]
- [`slice::rsplit`]
Expand Down
4 changes: 2 additions & 2 deletions src/libcore/slice/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1642,8 +1642,8 @@ impl<T> [T] {
/// [`split_at_mut`]: #method.split_at_mut
#[stable(feature = "copy_from_slice", since = "1.9.0")]
pub fn copy_from_slice(&mut self, src: &[T]) where T: Copy {
assert!(self.len() == src.len(),
"destination and source slices have different lengths");
assert_eq!(self.len(), src.len(),
"destination and source slices have different lengths");
unsafe {
ptr::copy_nonoverlapping(
src.as_ptr(), self.as_mut_ptr(), self.len());
Expand Down
6 changes: 3 additions & 3 deletions src/librustc/dep_graph/dep_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
//! user of the `DepNode` API of having to know how to compute the expected
//! fingerprint for a given set of node parameters.

use mir::interpret::{GlobalId, ConstValue};
use mir::interpret::GlobalId;
use hir::def_id::{CrateNum, DefId, DefIndex, CRATE_DEF_INDEX};
use hir::map::DefPathHash;
use hir::{HirId, ItemLocalId};
Expand All @@ -75,7 +75,7 @@ use traits::query::{
CanonicalPredicateGoal, CanonicalTypeOpProvePredicateGoal, CanonicalTypeOpNormalizeGoal,
};
use ty::{TyCtxt, FnSig, Instance, InstanceDef,
ParamEnv, ParamEnvAnd, Predicate, PolyFnSig, PolyTraitRef, Ty};
ParamEnv, ParamEnvAnd, Predicate, PolyFnSig, PolyTraitRef, Ty, self};
use ty::subst::Substs;

// erase!() just makes tokens go away. It's used to specify which macro argument
Expand Down Expand Up @@ -632,7 +632,7 @@ define_dep_nodes!( <'tcx>
// queries). Making them anonymous avoids hashing the result, which
// may save a bit of time.
[anon] EraseRegionsTy { ty: Ty<'tcx> },
[anon] ConstValueToAllocation { val: ConstValue<'tcx>, ty: Ty<'tcx> },
[anon] ConstValueToAllocation { val: &'tcx ty::Const<'tcx> },

[input] Freevars(DefId),
[input] MaybeUnusedTraitImport(DefId),
Expand Down
53 changes: 8 additions & 45 deletions src/librustc/ich/impls_ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,11 +364,11 @@ impl_stable_hash_for!(struct ty::FieldDef {
});

impl<'a, 'gcx> HashStable<StableHashingContext<'a>>
for ::middle::const_val::ConstVal<'gcx> {
for ::mir::interpret::ConstValue<'gcx> {
fn hash_stable<W: StableHasherResult>(&self,
hcx: &mut StableHashingContext<'a>,
hasher: &mut StableHasher<W>) {
use middle::const_val::ConstVal::*;
use mir::interpret::ConstValue::*;

mem::discriminant(self).hash_stable(hcx, hasher);

Expand All @@ -377,23 +377,6 @@ for ::middle::const_val::ConstVal<'gcx> {
def_id.hash_stable(hcx, hasher);
substs.hash_stable(hcx, hasher);
}
Value(ref value) => {
value.hash_stable(hcx, hasher);
}
}
}
}

impl<'a, 'gcx> HashStable<StableHashingContext<'a>>
for ::mir::interpret::ConstValue<'gcx> {
fn hash_stable<W: StableHasherResult>(&self,
hcx: &mut StableHashingContext<'a>,
hasher: &mut StableHasher<W>) {
use mir::interpret::ConstValue::*;

mem::discriminant(self).hash_stable(hcx, hasher);

match *self {
Scalar(val) => {
val.hash_stable(hcx, hasher);
}
Expand Down Expand Up @@ -497,40 +480,18 @@ impl_stable_hash_for!(struct ty::Const<'tcx> {
val
});

impl_stable_hash_for!(struct ::middle::const_val::ConstEvalErr<'tcx> {
impl_stable_hash_for!(struct ::mir::interpret::ConstEvalErr<'tcx> {
span,
kind
stacktrace,
error
});

impl_stable_hash_for!(struct ::middle::const_val::FrameInfo {
impl_stable_hash_for!(struct ::mir::interpret::FrameInfo {
span,
lint_root,
location
});

impl<'a, 'gcx> HashStable<StableHashingContext<'a>>
for ::middle::const_val::ErrKind<'gcx> {
fn hash_stable<W: StableHasherResult>(&self,
hcx: &mut StableHashingContext<'a>,
hasher: &mut StableHasher<W>) {
use middle::const_val::ErrKind::*;

mem::discriminant(self).hash_stable(hcx, hasher);

match *self {
TypeckError |
CouldNotResolve |
CheckMatchError => {
// nothing to do
}
Miri(ref err, ref trace) => {
err.hash_stable(hcx, hasher);
trace.hash_stable(hcx, hasher);
},
}
}
}

impl_stable_hash_for!(struct ty::ClosureSubsts<'tcx> { substs });
impl_stable_hash_for!(struct ty::GeneratorSubsts<'tcx> { substs });

Expand Down Expand Up @@ -579,6 +540,8 @@ for ::mir::interpret::EvalErrorKind<'gcx, O> {
ReadFromReturnPointer |
UnimplementedTraitSelection |
TypeckError |
TooGeneric |
CheckMatchError |
DerefFunctionPointer |
ExecuteMemory |
OverflowNeg |
Expand Down
1 change: 0 additions & 1 deletion src/librustc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ pub mod middle {
pub mod allocator;
pub mod borrowck;
pub mod expr_use_visitor;
pub mod const_val;
pub mod cstore;
pub mod dataflow;
pub mod dead;
Expand Down
178 changes: 0 additions & 178 deletions src/librustc/middle/const_val.rs

This file was deleted.

Loading