10000 Rollup of 6 pull requests by Dylan-DPC-zz · Pull Request #71467 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

Rollup of 6 pull requests #71467

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

Merged
merged 27 commits into from
Apr 23, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
4eaf535
Treat RETURN_PLACE as a normal Local
jonas-schievink Apr 15, 2020
a417f96
Remove null places
jonas-schievink Apr 15, 2020
34ed891
Fix pop_stack_frame logic
jonas-schievink Apr 15, 2020
0fda0fd
Dump return_place upon returning
jonas-schievink Apr 15, 2020
c5bfbb6
Update const prop
jonas-schievink Apr 16, 2020
a5c1851
Fix codegen and mir-opt tests
jonas-schievink Apr 16, 2020
f0ab469
Remove unnecessary block
jonas-schievink Apr 16, 2020
1ce6e6a
Bless 32-bit test output
jonas-schievink Apr 16, 2020
9e6f38a
Use copy_op_transmute
jonas-schievink Apr 17, 2020
415fd0c
const prop: don't special case return place
jonas-schievink Apr 19, 2020
57c2712
Improve E0308 error message wording again
DeeDeeG Apr 21, 2020
e97c227
Remove outdated reference to interpreter snapshotting
ecstatic-morse Apr 22, 2020
b3c26de
Inline some function docs re-exported in `std::ptr`
ecstatic-morse Apr 23, 2020
a135ced
Fix ui test blessing when a test has an empty stderr file after havin…
oli-obk Mar 16, 2020
6a3fb26
Rename `Item` to `ConstCx`.
oli-obk Mar 23, 2020
f0f7a59
Use ConstCx in more places
oli-obk Apr 2, 2020
0bc743e
Use ConstCx in the promoted collector
oli-obk Apr 2, 2020
cffd4b6
Improve E0567 explanation
GuillaumeGomez Apr 23, 2020
22a5379
Use `ConstCx` for `validate_candidates`
oli-obk Apr 2, 2020
119c636
Catch and fix explicit promotions that fail to actually promote
oli-obk Apr 6, 2020
4cdc31b
Document our sanity assertion around explicit promotion
oli-obk Apr 16, 2020
61fbc6a
Rollup merge of #71005 - jonas-schievink:no-place-like-return, r=oli-obk
Dylan-DPC Apr 23, 2020
629a613
Rollup merge of #71198 - oli-obk:const_check_cleanup, r=RalfJung
Dylan-DPC Apr 23, 2020
4ae7037
Rollup merge of #71396 - DeeDeeG:improve-e0308-again, r=estebank
Dylan-DPC Apr 23, 2020
414355b
Rollup merge of #71452 - ecstatic-morse:no-more-snapshot, r=RalfJung
Dylan-DPC Apr 23, 2020
98cadb2
Rollup merge of #71454 - ecstatic-morse:inline-core-ptr-docs, r=RalfJung
Dylan-DPC Apr 23, 2020
47e2687
Rollup merge of #71461 - GuillaumeGomez:improve-e0567, r=Dylan-DPC
Dylan-DPC Apr 23, 2020
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
Prev Previous commit
Next Next commit
Remove null places
  • Loading branch information
jonas-schievink committed Apr 20, 2020
commit a417f963fe58e2f6ba5e93be7fa960afa238720c
5 changes: 0 additions & 5 deletions src/librustc_middle/mir/interpret/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,6 @@ impl<'tcx, Tag> Scalar<Tag> {
}
}

#[inline]
pub fn null_ptr(cx: &impl HasDataLayout) -> Self {
Scalar::Raw { data: 0, size: cx.data_layout().pointer_size.bytes() as u8 }
}

#[inline]
pub fn zst() -> Self {
Scalar::Raw { data: 0, size: 0 }
Expand Down
16 changes: 0 additions & 16 deletions src/librustc_mir/interpret/place.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,6 @@ impl<Tag> MemPlace<Tag> {
MemPlace { ptr, align, meta: MemPlaceMeta::None }
}

/// Produces a Place that will error if attempted to be read from or written to
#[inline(always)]
fn null(cx: &impl HasDataLayout) -> Self {
Self::from_scalar_ptr(Scalar::null_ptr(cx), Align::from_bytes(1).unwrap())
}

#[inline(always)]
pub fn from_ptr(ptr: Pointer<Tag>, align: Align) -> Self {
Self::from_scalar_ptr(ptr.into(), align)
Expand Down Expand Up @@ -260,12 +254,6 @@ impl<'tcx, Tag: ::std::fmt::Debug + Copy> OpTy<'tcx, Tag> {
}

impl<Tag: ::std::fmt::Debug> Place<Tag> {
/// Produces a Place that will error if attempted to be read from or written to
#[inline(always)]
fn null(cx: &impl HasDataLayout) -> Self {
Place::Ptr(MemPlace::null(cx))
}

#[inline]
pub fn assert_mem_place(self) -> MemPlace<Tag> {
match self {
Expand All @@ -276,10 +264,6 @@ impl<Tag: ::std::fmt::Debug> Place<Tag> {
}

impl<'tcx, Tag: ::std::fmt::Debug> PlaceTy<'tcx, Tag> {
pub fn null(cx: &impl HasDataLayout, layout: TyAndLayout<'tcx>) -> Self {
Self { place: Place::null(cx), layout }
}

#[inline]
pub fn assert_mem_place(self) -> MPlaceTy<'tcx, Tag> {
MPlaceTy { mplace: self.place.assert_mem_place(), layout: self.layout }
Expand Down
0