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 9 pull requests #82393

Merged
merged 34 commits into from
Feb 22, 2021
Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
c675af8
Add internal `collect_into_array[_unchecked]` to remove duplicate code
LukasKalbertodt Feb 14, 2021
d6b9d9a
std::src::os::raw: Refactor, introducing macro type_alias!
ijackson Feb 17, 2021
e78b501
Provide NonZero_c_* integers
ijackson Feb 17, 2021
447ce27
Make "missing field" error message more natural
wooster0 Feb 20, 2021
5538528
Use the first paragraph, instead of cookie-cutter text, for rustdoc d…
notriddle Feb 20, 2021
1bedd4d
Cut off plain text descriptions after headers
notriddle Feb 20, 2021
bcef5e7
Revert changes to all.html
notriddle Feb 21, 2021
8b3b1c9
Add rustdoc UI tests for new description behaviour
notriddle Feb 21, 2021
dcf4991
Fix formatting for description rustdoc UI tests
notriddle Feb 21, 2021
fd5a710
Use has for non-regexes
notriddle Feb 21, 2021
6a85719
rustdoc: Remove unnecessary `Cell` around `param_env`
camelid Feb 21, 2021
60a9dcc
update tracking issue for raw_os_nonzero
KodrAus Feb 21, 2021
4cb649b
remove unneccessary wrapping of return value of allow_unstable(), it …
matthiaskrgr Feb 21, 2021
12080dc
rustc_parse: remove unneccessary wrapping of return value in fn mk_ra…
matthiaskrgr Feb 21, 2021
00bc134
remove unneccessary wrapping of return value in mk_await_expr()
matthiaskrgr Feb 21, 2021
85bd00f
parser: remove unneccessary wrapping of return value in parse_extern()
matthiaskrgr Feb 21, 2021
393878b
remove redundant return value Ok(()) of clear_relocations()
matthiaskrgr Feb 21, 2021
76b9b16
rustc_codegen_ssa: remove unneeded wrapping of return type of execute…
matthiaskrgr Feb 21, 2021
a9b90c0
rustc_mir: remove redundant wrapping of return type in numeric_intrin…
matthiaskrgr Feb 21, 2021
1260883
improve UnsafeCell docs
RalfJung Feb 21, 2021
a6b85fb
Update src/test/rustdoc/description.rs
notriddle Feb 21, 2021
575c75b
Update src/test/rustdoc/description.rs
notriddle Feb 21, 2021
da9a588
remove redundant wrapping of return types of allow_internal_unstable(…
matthiaskrgr Feb 21, 2021
7130e46
Fix sizes of repr(C) enums on hexagon
nagisa Feb 21, 2021
45673e2
rustdoc: Remove `fake_def_ids` RefCell
camelid Feb 22, 2021
3cf201f
Rollup merge of #82098 - LukasKalbertodt:add-collect-into-array, r=dt…
JohnTitor Feb 22, 2021
a5f6668
Rollup merge of #82228 - ijackson:nonzero-cint, r=KodrAus
JohnTitor Feb 22, 2021
20c1fa1
Rollup merge of #82287 - r00ster91:field_name_and, r=petrochenkov
JohnTitor Feb 22, 2021
1dba8ce
Rollup merge of #82351 - notriddle:docs-meta-description, r=jyn514
JohnTitor Feb 22, 2021
4dfe69a
Rollup merge of #82353 - camelid:no-more-param_env-cell, r=jyn514
JohnTitor Feb 22, 2021
1870b3b
Rollup merge of #82367 - matthiaskrgr:wraps, r=petrochenkov
JohnTitor Feb 22, 2021
7958166
Rollup merge of #82372 - RalfJung:unsafe-cell, r=KodrAus
JohnTitor Feb 22, 2021
50a2de2
Rollup merge of #82379 - nagisa:nagisa/hexagon-enums, r=estebank
JohnTitor Feb 22, 2021
86940be
Rollup merge of #82382 - camelid:remove-fake_def_ids-refcell, r=jyn514
JohnTitor Feb 22, 2021
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
13 changes: 3 additions & 10 deletions compiler/rustc_middle/src/mir/interpret/allocation.rs
Original file line number Diff line number Diff line change
@@ -266,7 +266,7 @@ impl<'tcx, Tag: Copy, Extra: AllocationExtra<Tag>> Allocation<Tag, Extra> {
let range = self.check_bounds(ptr.offset, size);

self.mark_init(ptr, size, true);
self.clear_relocations(cx, ptr, size)?;
self.clear_relocations(cx, ptr, size);

AllocationExtra::memory_written(self, ptr, size)?;

@@ -484,18 +484,13 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {
/// uninitialized. This is a somewhat odd "spooky action at a distance",
/// but it allows strictly more code to run than if we would just error
/// immediately in that case.
fn clear_relocations(
&mut self,
cx: &impl HasDataLayout,
ptr: Pointer<Tag>,
size: Size,
) -> InterpResult<'tcx> {
fn clear_relocations(&mut self, cx: &impl HasDataLayout, ptr: Pointer<Tag>, size: Size) {
// Find the start and end of the given range and its outermost relocations.
let (first, last) = {
// Find all relocations overlapping the given range.
let relocations = self.get_relocations(cx, ptr, size);
if relocations.is_empty() {
return Ok(());
return;
}

(
@@ -517,8 +512,6 @@ impl<'tcx, Tag: Copy, Extra> Allocation<Tag, Extra> {

// Forget all the relocations.
self.relocations.remove_range(first..last);

Ok(())
}

/// Errors if there are relocations overlapping with the edges of the