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 16 pull requests #55789

Closed
wants to merge 39 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
cf1406c
Clarify error message for -C opt-level
birkenfeld Nov 1, 2018
5aeb6c7
Sidestep an ICE by providing *some* description for `ReEmpty` when it…
pnkfelix Nov 3, 2018
cc33aec
Regression test for issue 55608.
pnkfelix Nov 3, 2018
4c40ff6
Implement rotate using funnel shift on LLVM >= 7
nikic Nov 3, 2018
e753d21
miri: accept extern types in structs if they are the only field
RalfJung Nov 4, 2018
aca76d4
test for offset and alignment of the sized part, instead of field count
RalfJung Nov 4, 2018
bb17f71
also test with PhantomData
RalfJung Nov 4, 2018
5ebd077
make it more obvious that the size is not relevant
RalfJung Nov 5, 2018
a6622c2
note some FIXMEs
RalfJung Nov 5, 2018
ba0bab3
make sure we only guess field alignment at offset 0
RalfJung Nov 6, 2018
e7f8c0d
Sidestep link error from rustfix'ed code by using a *defined* static.
pnkfelix Nov 6, 2018
db3c69e
impl_stable_hash_for: support enums and tuple structs with generic pa…
RalfJung Nov 6, 2018
3ec837e
Elide anon lifetimes in conflicting impl note
estebank Nov 6, 2018
e72afa9
Consume optimization fuel from the MIR inliner
wesleywiser Oct 21, 2018
2d7426b
borrow_set: remove a helper function and a clone it uses
ljedrz Nov 7, 2018
299a452
Ignore never-initialized locals for `unused_mut`.
davidtwco Nov 7, 2018
34ffbdb
This test will not link on wasm32.
pnkfelix Nov 7, 2018
5159b32
mir: remove a hacky recursive helper function
ljedrz Nov 7, 2018
36f815b
Remove intermediate font specs
jonhoo Nov 7, 2018
a9b5988
wasm32-unknown-emscripten expects the rust_eh_personality symbol
CryZe Nov 8, 2018
e3390d8
Improve creation of 3 IndexVecs
ljedrz Nov 7, 2018
255cc1a
rustc: Request ansi colors if stderr isn't a tty
alexcrichton Nov 8, 2018
50a2d47
Support for the program data address space option
TimNN Oct 11, 2018
127e7f8
Rollup merge of #54993 - TimNN:pda-tdl, r=eddyb
kennytm Nov 8, 2018
a284733
Rollup merge of #55576 - birkenfeld:opt-level-error-msg, r=cramertj
kennytm Nov 8, 2018
8a458b9
Rollup merge of #55638 - pnkfelix:issue-55608-ice-reempty-msg_span_fr…
kennytm Nov 8, 2018
f558288
Rollup merge of #55650 - nikic:funnel-shift, r=nagisa
kennytm Nov 8, 2018
6b93f19
Rollup merge of #55672 - RalfJung:miri-extern-types, r=eddyb
kennytm Nov 8, 2018
8d6a161
Rollup merge of #55719 - pnkfelix:issue-54388-sidestep-link-error-fro…
kennytm Nov 8, 2018
97f4d7a
Rollup merge of #55722 - RalfJung:impl-stable-hash, r=varkor
kennytm Nov 8, 2018
4feb4f9
Rollup merge of #55736 - estebank:elide-anon-lt, r=petrochenkov
kennytm Nov 8, 2018
d54a039
Rollup merge of #55739 - wesleywiser:mir_inline_fuel, r=nikomatsakis
kennytm Nov 8, 2018
b04a197
Rollup merge of #55753 - ljedrz:borrow_set_insert_clone, r=oli-obk
kennytm Nov 8, 2018
e182bff
Rollup merge of #55755 - ljedrz:a_few_indexvec_tweaks, r=varkor
kennytm Nov 8, 2018
543d645
Rollup merge of #55758 - davidtwco:issue-55344, r=pnkfelix
kennytm Nov 8, 2018
3d6df38
Rollup merge of #55760 - jonhoo:no-intermediate-fonts, r=GuillaumeGomez
kennytm Nov 8, 2018
eb5e607
Rollup merge of #55761 - ljedrz:fix_promote_candidate_hack, r=estebank
kennytm Nov 8, 2018
6b593d1
Rollup merge of #55774 - CryZe:patch-5, r=alexcrichton
kennytm Nov 8, 2018
de60b44
Rollup merge of #55788 - alexcrichton:wincolors, r=petrochenkov
kennytm Nov 8, 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
14 changes: 14 additions & 0 deletions src/libcore/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1465,6 +1465,20 @@ extern "rust-intrinsic" {
/// y < 0 or y >= N, where N is the width of T in bits.
pub fn unchecked_shr<T>(x: T, y: T) -> T;

/// Performs rotate left.
/// The stabilized versions of this intrinsic are available on the integer
/// primitives via the `rotate_left` method. For example,
/// [`std::u32::rotate_left`](../../std/primitive.u32.html#method.rotate_left)
#[cfg(not(stage0))]
pub fn rotate_left<T>(x: T, y: T) -> T;

/// Performs rotate right.
/// The stabilized versions of this intrinsic are available on the integer
/// primitives via the `rotate_right` method. For example,
/// [`std::u32::rotate_right`](../../std/primitive.u32.html#method.rotate_right)
#[cfg(not(stage0))]
pub fn rotate_right<T>(x: T, y: T) -> T;

/// Returns (a + b) mod 2<sup>N</sup>, where N is the width of T in bits.
/// The stabilized versions of this intrinsic are available on the integer
/// primitives via the `wrapping_add` method. For example,
Expand Down
14 changes: 12 additions & 2 deletions src/libcore/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2301,7 +2301,12 @@ assert_eq!(n.rotate_left(", $rot, "), m);
#[rustc_const_unstable(feature = "const_int_rotate")]
#[inline]
pub const fn rotate_left(self, n: u32) -> Self {
(self << (n % $BITS)) | (self >> (($BITS - (n % $BITS)) % $BITS))
#[cfg(not(stage0))] {
unsafe { intrinsics::rotate_left(self, n as $SelfT) }
}
#[cfg(stage0)] {
(self << (n % $BITS)) | (self >> (($BITS - (n % $BITS)) % $BITS))
}
}
}

Expand All @@ -2326,7 +2331,12 @@ assert_eq!(n.rotate_right(", $rot, "), m);
#[rustc_const_unstable(feature = "const_int_rotate")]
#[inline]
pub const fn rotate_right(self, n: u32) -> Self {
(self >> (n % $BITS)) | (self << (($BITS - (n % $BITS)) % $BITS))
#[cfg(not(stage0))] {
unsafe { intrinsics::rotate_right(self, n as $SelfT) }
}
#[cfg(stage0)] {
(self >> (n % $BITS)) | (self << (($BITS - (n % $BITS)) % $BITS))
}
}
}

Expand Down
5 changes: 4 additions & 1 deletion src/libpanic_abort/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ pub unsafe extern fn __rust_start_panic(_payload: usize) -> u32 {
pub mod personalities {
#[no_mangle]
#[cfg(not(any(
target_arch = "wasm32",
all(
target_arch = "wasm32",
not(target_os = "emscripten"),
),
all(
target_os = "windows",
target_env = "gnu",
Expand Down
71 changes: 17 additions & 54 deletions src/librustc/ich/impls_mir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,68 +37,31 @@ impl_stable_hash_for!(struct mir::BasicBlockData<'tcx> { statements, terminator,
impl_stable_hash_for!(struct mir::UnsafetyViolation { source_info, description, details, kind });
impl_stable_hash_for!(struct mir::UnsafetyCheckResult { violations, unsafe_blocks });

impl<'a> HashStable<StableHashingContext<'a>>
for mir::BorrowKind {
#[inline]
fn hash_stable<W: StableHasherResult>(&self,
hcx: &mut StableHashingContext<'a>,
hasher: &mut StableHasher<W>) {
mem::discriminant(self).hash_stable(hcx, hasher);

match *self {
mir::BorrowKind::Shared |
mir::BorrowKind::Shallow |
mir::BorrowKind::Unique => {}
mir::BorrowKind::Mut { allow_two_phase_borrow } => {
allow_two_phase_borrow.hash_stable(hcx, hasher);
}
}
}
}


impl<'a> HashStable<StableHashingContext<'a>>
for mir::UnsafetyViolationKind {
#[inline]
fn hash_stable<W: StableHasherResult>(&self,
hcx: &mut StableHashingContext<'a>,
hasher: &mut StableHasher<W>) {

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

match *self {
mir::UnsafetyViolationKind::General => {}
mir::UnsafetyViolationKind::MinConstFn => {}
mir::UnsafetyViolationKind::ExternStatic(lint_node_id) |
mir::UnsafetyViolationKind::BorrowPacked(lint_node_id) => {
lint_node_id.hash_stable(hcx, hasher);
}
impl_stable_hash_for!(enum mir::BorrowKind {
Shared,
Shallow,
Unique,
Mut { allow_two_phase_borrow },
});

}
}
}
impl_stable_hash_for!(enum mir::UnsafetyViolationKind {
General,
MinConstFn,
ExternStatic(lint_node_id),
BorrowPacked(lint_node_id),
});

impl_stable_hash_for!(struct mir::Terminator<'tcx> {
kind,
source_info
});

impl<'a, 'gcx, T> HashStable<StableHashingContext<'a>> for mir::ClearCrossCrate<T>
where T: HashStable<StableHashingContext<'a>>
{
#[inline]
fn hash_stable<W: StableHasherResult>(&self,
hcx: &mut StableHashingContext<'a>,
hasher: &mut StableHasher<W>) {
mem::discriminant(self).hash_stable(hcx, hasher);
match *self {
mir::ClearCrossCrate::Clear => {}
mir::ClearCrossCrate::Set(ref value) => {
value.hash_stable(hcx, hasher);
}
}
impl_stable_hash_for!(
impl<T> for enum mir::ClearCrossCrate<T> [ mir::ClearCrossCrate ] {
Clear,
Set(value),
}
}
);

impl<'a> HashStable<StableHashingContext<'a>> for mir::Local {
#[inline]
Expand Down
Loading