8000 Rollup of 5 pull requests by Dylan-DPC · Pull Request #95347 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

Rollup of 5 pull requests #95347

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

Closed
wants to merge 106 commits into from
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
2fec530
Mark drop calls in landing pads cold instead of noinline
erikdesjardins Dec 29, 2021
f3e1f33
keep noinline for system llvm < 14
erikdesjardins Dec 30, 2021
54d2ec1
Merge commit '1411a98352ba6bee8ba3b0131c9243e5db1e6a2e' into sync_cg_…
bjorn3 Dec 31, 2021
e6e4605
Remove unused extern crate rustc_symbol_mangling
bjorn3 Dec 31, 2021
da4a392
Auto merge of #92419 - erikdesjardins:coldland, r=nagisa
bors Jan 1, 2022
0be9d1e
Merge pull request #114 from bjorn3/sync_from_rust
antoyo Jan 1, 2022
37069f1
Update references to `-Z symbol-mangling-version` to use `-C`
joshtriplett Oct 21, 2021
09afd64
Store a `Symbol` instead of an `Ident` in `VariantDef`/`FieldDef`
Aaron1011 Jan 3, 2022
68cbb46
Remove deprecated LLVM-style inline assembly
tmiasko Jan 12, 2022
e690fb1
Add comment
antoyo Jan 15, 2022
47c311a
Use Symbol for target features in asm handling
bjorn3 Jan 10, 2022
94dc375
Add preliminary support for inline assembly for msp430.
cr1901 Jan 20, 2022
ba41953
Reorder unwinding related builder methods to differentiate between dw…
bjorn3 Jan 24, 2022
81597f2
Remove unused return values from resume and cleanup_ret
bjorn3 Jan 24, 2022
2eaf0bc
Merge add_handler into catch_switch
bjorn3 Jan 24, 2022
4bdc784
Merge landing_pad and set_cleanup into cleanup_landing_pad
bjorn3 Jan 24, 2022
cd5d42a
Correctly import foreign statics
bjorn3 Jan 23, 2022
6663f4e
Move rustup component installation to rust-toolchain
bjorn3 Jan 24, 2022
fc23678
Merge pull request #115 from bjorn3/foreign_statics
antoyo Jan 25, 2022
5dc660b
Support upgrading the alignment of a global variable (#121)
antoyo Jan 26, 2022
99941cd
Support -Zfunction-sections
bjorn3 Jan 25, 2022
b7bfb21
Merge pull request #118 from bjorn3/function_sections
antoyo Jan 26, 2022
41f20fa
Support 128-bit integers on platforms without native support (#103)
antoyo Jan 31, 2022
9c3cce6
Implement simd_neg
antoyo Jan 15, 2022
72d89b0
Merge pull request #125 from rust-lang/fix/simd-slice
antoyo Feb 1, 2022
28ba430
Sync from rust a00e130dae74a213338e2b095ec855156d8f3d8a
bjorn3 Feb 1, 2022
7aaa87b
Rustup to rustc 1.60.0-nightly (a00e130da 2022-01-29)
bjorn3 Jan 30, 2022
9c3a123
Fix type_kind implementation
bjorn3 Jan 30, 2022
5067ad9
Replace unimplemented with todo in apply_attrs_to_cleanup_callsite
bjorn3 Jan 30, 2022
477d102
Move coretests to the 2021 edition
bjorn3 Feb 1, 2022
b4ad63c
Merge pull request #122 from bjorn3/rustup
antoyo Feb 1, 2022
20506e3
`#[used(linker)]` attribute (https://github.com/dtolnay/linkme/issues…
cynecx Nov 22, 2021
96340e5
Ensure that queries only return Copy types.
cjgillot Jan 31, 2022
1b2337c
Make FnAbiError Copy.
cjgillot Feb 1, 2022
22a3068
Auto merge of #93511 - cjgillot:query-copy, r=oli-obk
bors Feb 10, 2022
40d30ce
Unconditionally update symbols
bjorn3 Feb 10, 2022
e855e2d
Move ty::print methods to Drop-based scope guards
Mark-Simulacrum Feb 16, 2022
4cdcf03
README: Add compiler-rt cloning step
jbruechert Feb 4, 2022
164aa39
Merge pull request #127 from JBBgameich/readme-compiler-rt
antoyo Feb 19, 2022
56b7080
Remove build_sibling_block
bjorn3 Feb 18, 2022
18c34e4
Introduce Bx::switch_to_block
bjorn3 Feb 18, 2022
648d038
Auto merge of #94123 - bjorn3:cg_ssa_singleton_builder, r=tmiasko
bors Feb 24, 2022
471234f
Sync from rust 3d127e2040b57157936f5f24e114a8b4c9a505ef
bjorn3 Feb 24, 2022
d565f60
Rustup to rustc 1.61.0-nightly (4b043faba 2022-02-24)
bjorn3 Feb 25, 2022
ddbbded
Merge pull request #130 from bjorn3/rustup
antoyo Feb 25, 2022
ff6b398
Use bx.switch_to_block where possible
bjorn3 Feb 25, 2022
b48ed38
Make bx.block non-optional
bjorn3 Feb 25, 2022
07afdb8
Use bitcast for ptrtoint and inttoptr
bjorn3 Feb 25, 2022
62e9b50
Remove current_block field of CodegenCx
bjorn3 Feb 25, 2022
a7c1c47
Fix review comments
bjorn3 Feb 25, 2022
3e35fab
Fix inttoptr
bjorn3 Feb 26, 2022
9d09842
Add and change a TODO
bjorn3 Feb 26, 2022
1fb9821
Merge pull request #131 from bjorn3/fix_non_singleton_builder
antoyo Feb 26, 2022
f706317
Support -Cpanic=unwind without unwinding
bjorn3 Feb 26, 2022
ac4baf3
Allow unreachable blocks for now
bjorn3 Feb 26, 2022
710b741
Merge pull request #132 from bjorn3/panic_unwind
antoyo Feb 27, 2022
beb1767
Don't export global allocs which are not statics 8000
bjorn3 Feb 26, 2022
1a9ae8d
Merge pull request #133 from bjorn3/less_exports
antoyo Feb 27, 2022
dcc0853
Add support for on_stack parameters
antoyo Feb 27, 2022
f4ea709
Merge pull request #135 from rust-lang/feature/byval-params
antoyo Feb 28, 2022
962b8cf
Revert "Auto merge of #92419 - erikdesjardins:coldland, r=nagisa"
erikdesjardins Feb 26, 2022
4f132cb
Querify `global_backend_features`
nagisa Sep 24, 2021
7df92e4
Auto merge of #87402 - nagisa:nagisa/request-feature-requests-for-fea…
bors Mar 2, 2022
081bf75
rename ErrorReported -> ErrorGuaranteed
mark-i-m Jan 23, 2022
8238b91
all: fix some typos
cuishuang Mar 3, 2022
6fcfc3d
Add -Z oom={panic,abort} command-line option
Amanieu Oct 6, 2021
a19138f
cleanup: remove unused ability to have LLVM null-terminate const strings
erikdesjardins Mar 5, 2022
92d1850
Introduce `ConstAllocation`.
nnethercote Mar 1, 2022
0e36868
Auto merge of #94638 - erikdesjardins:noextranull, r=nagisa
bors Mar 7, 2022
d35fc85
Clarify `Layout` interning.
nnethercote Mar 4, 2022
3e7035f
Auto merge of #94690 - nnethercote:clarify-Layout-interning, r=fee1-dead
bors Mar 7, 2022
7c1f863
Stop removing the llvm-asm tests in test.sh since they don't exist an…
light4 Mar 8, 2022
0cff1d0
Merge pull request #136 from light4/clean_test
antoyo Mar 8, 2022
64012a1
Improve `AdtDef` interning.
nnethercote Mar 4, 2022
1c38932
debuginfo: Refactor debuginfo generation for types -- Rename DebugInf…
michaelwoerister Mar 14, 2022
fadd1c5
Auto merge of #88098 - Amanieu:oom_panic, r=nagisa
bors Mar 18, 2022
12f782e
Fix version of compiler_builtins to fix compilation failure
antoyo Mar 19, 2022
be9789b
Fix ice in box alloc
antoyo Mar 8, 2022
b3e50bd
Merge pull request #139 from rust-lang/fix/compiler-builtin-version
antoyo Mar 19, 2022
d63ea3e
Merge pull request #137 from rust-lang/fix/box-alloc-ice
antoyo Mar 19, 2022
0fb350f
Fix shift of unsigned integer by signed integer
antoyo Mar 19, 2022
44c0204
Merge pull request #141 from rust-lang/fix/unsigned-by-signed-shift
antoyo Mar 19, 2022
7230660
Add a simple argument parser to `build.sh`
yvt Mar 23, 2022
842a5fb
Add `--release-sysroot` flag to `build.sh`
yvt Mar 23, 2022
a22e15b
Merge pull request #143 from yvt/sysroot-profile
antoyo Mar 23, 2022
db59177
Sync from rust bc881e83d1cced71046e844fa55c0b0e9f9af382
bjorn3 Mar 26, 2022
6faa6a2
Rustup to rustc 1.61.0-nightly (d53246fed 2022-03-25)
bjorn3 Mar 26, 2022
7829437
Enable #[thread_local] on armv6k-nintendo-3ds
ian-h-chamberlain Feb 18, 2022
edf33fe
Add Destruct and Drop traits to static.rs
bjorn3 Mar 26, 2022
724473b
Fix compiletest compilation
bjorn3 Mar 26, 2022
fb9658d
Review comments
bjorn3 Mar 26, 2022
39683d8
Merge pull request #146 from bjorn3/rustup
antoyo Mar 26, 2022
78b680e
interpret: mark a dead match arm as dead
RalfJung Mar 26, 2022
bbff48e
Merge commit '39683d8eb7a32a74bea96ecbf1e87675d3338506' into sync_cg_…
bjorn3 Mar 26, 2022
3bbcf64
interpret: with enforce_number_validity, ensure integers are truly Sc…
RalfJung Mar 26, 2022
419b630
Merge pull request #16 from ian-h-chamberlain/feature/target-thread-l…
Meziu Mar 26, 2022
72ee247
Debug print char 0 as '\0' rather than '\u{0}'
dtolnay Mar 26, 2022
45bc746
stabilize const_ptr_offset
SaltyKitkat Feb 13, 2022
< 8000 div class="select-menu-item-text"> 8f9ba12
allow const_mut_refs
SaltyKitkat Feb 13, 2022
6d0e5f2
update stderr messages
SaltyKitkat Feb 13, 2022
e5d1d97
Bump const_ptr_offset stabilization to 1.61
dtolnay Mar 26, 2022
bea08ae
Rollup merge of #93957 - SaltyKitkat:stablize_const_ptr_offset, r=dto…
Dylan-DPC Mar 26, 2022
4db043f
Rollup merge of #95338 - bjorn3:sync_cg_gcc-2022-03-26, r=antoyo
Dylan-DPC Mar 26, 2022
23ba446
Rollup merge of #95340 - RalfJung:pnvi, r=oli-obk
Dylan-DPC Mar 26, 2022
69f8e2a
Rollup merge of #95341 - Meziu:armv6k-3ds-target, r=nagisa
Dylan-DPC Mar 26, 2022
284bac9
Rollup merge of #95345 - dtolnay:escape0, r=Dylan-DPC
Dylan-DPC Mar 26, 2022
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 library/alloc/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#![feature(const_intrinsic_copy)]
#![feature(const_mut_refs)]
#![feature(const_nonnull_slice_from_raw_parts)]
#![feature(const_ptr_offset)]
#![feature(const_ptr_write)]
#![feature(const_try)]
#![feature(core_intrinsics)]
Expand Down
4 changes: 2 additions & 2 deletions library/core/src/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,7 @@ extern "rust-intrinsic" {
///
/// The stabilized version of this intrinsic is [`pointer::offset`].
#[must_use = "returns a new pointer rather than modifying its argument"]
#[rustc_const_unstable(feature = "const_ptr_offset", issue = "71499")]
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
pub fn offset<T>(dst: *const T, offset: isize) -> *const T;

/// Calculates the offset from a pointer, potentially wrapping.
Expand All @@ -1185,7 +1185,7 @@ extern "rust-intrinsic" {
///
/// The stabilized version of this intrinsic is [`pointer::wrapping_offset`].
#[must_use = "returns a new pointer rather than modifying its argument"]
#[rustc_const_unstable(feature = "const_ptr_offset", issue = "71499")]
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
pub fn arith_offset<T>(dst: *const T, offset: isize) -> *const T;

/// Equivalent to the appropriate `llvm.memcpy.p0i8.0i8.*` intrinsic, with
Expand Down
1 change: 0 additions & 1 deletion library/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@
#![feature(const_pin)]
#![feature(const_replace)]
#![feature(const_ptr_is_null)]
#![feature(const_ptr_offset)]
#![feature(const_ptr_offset_from)]
#![feature(const_ptr_read)]
#![feature(const_ptr_write)]
Expand Down
12 changes: 6 additions & 6 deletions library/core/src/ptr/const_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ impl<T: ?Sized> *const T {
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[must_use = "returns a new pointer rather than modifying its argument"]
#[rustc_const_unstable(feature = "const_ptr_offset", issue = "71499")]
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
#[inline(always)]
pub const unsafe fn offset(self, count: isize) -> *const T
where
Expand Down Expand Up @@ -347,7 +347,7 @@ impl<T: ?Sized> *const T {
/// ```
#[stable(feature = "ptr_wrapping_offset", since = "1.16.0")]
#[must_use = "returns a new pointer rather than modifying its argument"]
#[rustc_const_unstable(feature = "const_ptr_offset", issue = "71499")]
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
#[inline(always)]
pub const fn wrapping_offset(self, count: isize) -> *const T
where
Expand Down Expand Up @@ -566,7 +566,7 @@ impl<T: ?Sized> *const T {
/// ```
#[stable(feature = "pointer_methods", since = "1.26.0")]
#[must_use = "returns a new pointer rather than modifying its argument"]
#[rustc_const_unstable(feature = "const_ptr_offset", issue = "71499")]
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
#[inline(always)]
pub const unsafe fn add(self, count: usize) -> Self
where
Expand Down Expand Up @@ -630,7 +630,7 @@ impl<T: ?Sized> *const T {
/// ```
#[stable(feature = "pointer_methods", since = "1.26.0")]
#[must_use = "returns a new pointer rather than modifying its argument"]
#[rustc_const_unstable(feature = "const_ptr_offset", issue = "71499")]
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
#[inline]
pub const unsafe fn sub(self, count: usize) -> Self
where
Expand Down Expand Up @@ -693,7 +693,7 @@ impl<T: ?Sized> *const T {
/// ```
#[stable(feature = "pointer_methods", since = "1.26.0")]
#[must_use = "returns a new pointer rather than modifying its argument"]
#[rustc_const_unstable(feature = "const_ptr_offset", issue = "71499")]
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
#[inline(always)]
pub const fn wrapping_add(self, count: usize) -> Self
where
Expand Down Expand Up @@ -755,7 +755,7 @@ impl<T: ?Sized> *const T {
/// ```
#[stable(feature = "pointer_methods", since = "1.26.0")]
#[must_use = "returns a new pointer rather than modifying its argument"]
#[rustc_const_unstable(feature = "const_ptr_offset", issue = "71499")]
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
#[inline]
pub const fn wrapping_sub(self, count: usize) -> Self
where
Expand Down
12 changes: 6 additions & 6 deletions library/core/src/ptr/mut_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ impl<T: ?Sized> *mut T {
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[must_use = "returns a new pointer rather than modifying its argument"]
#[rustc_const_unstable(feature = "const_ptr_offset", issue = "71499")]
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
#[inline(always)]
pub const unsafe fn offset(self, count: isize) -> *mut T
where
Expand Down Expand Up @@ -358,7 +358,7 @@ impl<T: ?Sized> *mut T {
/// ```
#[stable(feature = "ptr_wrapping_offset", since = "1.16.0")]
#[must_use = "returns a new pointer rather than modifying its argument"]
#[rustc_const_unstable(feature = "const_ptr_offset", issue = "71499")]
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
#[inline(always)]
pub const fn wrapping_offset(self, count: isize) -> *mut T
where
Expand Down Expand Up @@ -680,7 +680,7 @@ impl<T: ?Sized> *mut T {
/// ```
#[stable(feature = "pointer_methods", since = "1.26.0")]
#[must_use = "returns a new pointer rather than modifying its argument"]
#[rustc_const_unstable(feature = "const_ptr_offset", issue = "71499")]
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
#[inline(always)]
pub const unsafe fn add(self, count: usize) -> Self
where
Expand Down Expand Up @@ -744,7 +744,7 @@ impl<T: ?Sized> *mut T {
/// ```
#[stable(feature = "pointer_methods", since = "1.26.0")]
#[must_use = "returns a new pointer rather than modifying its argument"]
#[rustc_const_unstable(feature = "const_ptr_offset", issue = "71499")]
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
#[inline]
pub const unsafe fn sub(self, count: usize) -> Self
where
Expand Down Expand Up @@ -807,7 +807,7 @@ impl<T: ?Sized> *mut T {
/// ```
#[stable(feature = "pointer_methods", since = "1.26.0")]
#[must_use = "returns a new pointer rather than modifying its argument"]
#[rustc_const_unstable(feature = "const_ptr_offset", issue = "71499")]
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
#[inline(always)]
pub const fn wrapping_add(self, count: usize) -> Self
where
Expand Down Expand Up @@ -869,7 +869,7 @@ impl<T: ?Sized> *mut T {
/// ```
#[stable(feature = "pointer_methods", since = "1.26.0")]
#[must_use = "returns a new pointer rather than modifying its argument"]
#[rustc_const_unstable(feature = "const_ptr_offset", issue = "71499")]
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
#[inline]
pub const fn wrapping_sub(self, count: usize) -> Self
where
Expand Down
8 changes: 5 additions & 3 deletions library/core/src/slice/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,8 @@ impl<T> [T] {
/// assert_eq!(x, &[3, 4, 6]);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ptr_offset", issue = "71499")]
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
#[rustc_allow_const_fn_unstable(const_mut_refs)]
#[inline]
#[must_use]
pub const fn as_mut_ptr(&mut self) -> *mut T {
Expand Down Expand Up @@ -535,7 +536,7 @@ impl<T> [T] {
///
/// [`as_ptr`]: slice::as_ptr
#[stable(feature = "slice_ptr_range", since = "1.48.0")]
#[rustc_const_unstable(feature = "const_ptr_offset", issue = "71499")]
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
#[inline]
#[must_use]
pub const fn as_ptr_range(&self) -> Range<*const T> {
Expand Down Expand Up @@ -578,7 +579,8 @@ impl<T> [T] {
///
/// [`as_mut_ptr`]: slice::as_mut_ptr
#[stable(feature = "slice_ptr_range", since = "1.48.0")]
#[rustc_const_unstable(feature = "const_ptr_offset", issue = "71499")]
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
#[rustc_allow_const_fn_unstable(const_mut_refs)]
#[inline]
#[must_use]
pub const fn as_mut_ptr_range(&mut self) -> Range<*mut T> {
Expand Down
1 change: 0 additions & 1 deletion library/core/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#![feature(const_ptr_as_ref)]
#![feature(const_ptr_read)]
#![feature(const_ptr_write)]
#![feature(const_ptr_offset)]
#![feature(const_trait_impl)]
#![feature(const_likely)]
#![feature(core_ffi_c)]
Expand Down
1 change: 0 additions & 1 deletion src/test/ui/const-ptr/out_of_bounds_read.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// error-pattern: evaluation of constant value failed

#![feature(const_ptr_read)]
#![feature(const_ptr_offset)]

fn main() {
use std::ptr;
Expand Down
12 changes: 6 additions & 6 deletions src/test/ui/const-ptr/out_of_bounds_read.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
| memory access failed: alloc7 has size 4, so pointer to 4 bytes starting at offset 4 is out-of-bounds
| inside `std::ptr::read::<u32>` at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
::: $DIR/out_of_bounds_read.rs:13:33
::: $DIR/out_of_bounds_read.rs:12:33
|
LL | const _READ: u32 = unsafe { ptr::read(PAST_END_PTR) };
| ----------------------- inside `_READ` at $DIR/out_of_bounds_read.rs:13:33
| ----------------------- inside `_READ` at $DIR/out_of_bounds_read.rs:12:33

error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
Expand All @@ -26,10 +26,10 @@ LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
LL | unsafe { read(self) }
| ---------- inside `ptr::const_ptr::<impl *const u32>::read` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
::: $DIR/out_of_bounds_read.rs:14:39
::: $DIR/out_of_bounds_read.rs:13:39
|
LL | const _CONST_READ: u32 = unsafe { PAST_END_PTR.read() };
| ------------------- inside `_CONST_READ` at $DIR/out_of_bounds_read.rs:14:39
| ------------------- inside `_CONST_READ` at $DIR/out_of_bounds_read.rs:13:39

error[E0080]: evaluation of constant value failed
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
Expand All @@ -45,10 +45,10 @@ LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
LL | unsafe { read(self) }
| ---------- inside `ptr::mut_ptr::<impl *mut u32>::read` at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
|
::: $DIR/out_of_bounds_read.rs:15:37
::: $DIR/out_of_bounds_read.rs:14:37
|
LL | const _MUT_READ: u32 = unsafe { (PAST_END_PTR as *mut u32).read() };
| --------------------------------- inside `_MUT_READ` at $DIR/out_of_bounds_read.rs:15:37
| --------------------------------- inside `_MUT_READ` at $DIR/out_of_bounds_read.rs:14:37

error: aborting due to 3 previous errors

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/consts/copy-intrinsic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// ignore-tidy-linelength
#![feature(intrinsics, staged_api)]
#![feature(const_mut_refs, const_intrinsic_copy, const_ptr_offset)]
#![feature(const_mut_refs, const_intrinsic_copy)]
use std::mem;

extern "rust-intrinsic" {
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/consts/invalid-union.32bit.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0080]: it is undefined behavior to use this value
--> $DIR/invalid-union.rs:41:1
--> $DIR/invalid-union.rs:40:1
|
LL | fn main() {
| ^^^^^^^^^ type validation failed at .<deref>.y.<enum-variant(B)>.0: encountered `UnsafeCell` in a `const`
Expand All @@ -10,7 +10,7 @@ LL | fn main() {
}

error: erroneous constant used
--> $DIR/invalid-union.rs:42:25
--> $DIR/invalid-union.rs:41:25
|
LL | let _: &'static _ = &C;
| ^^ referenced constant has errors
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/consts/invalid-union.64bit.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0080]: it is undefined behavior to use this value
--> $DIR/invalid-union.rs:41:1
--> $DIR/invalid-union.rs:40:1
|
LL | fn main() {
| ^^^^^^^^^ type validation failed at .<deref>.y.<enum-variant(B)>.0: encountered `UnsafeCell` in a `const`
Expand All @@ -10,7 +10,7 @@ LL | fn main() {
}

error: erroneous constant used
--> $DIR/invalid-union.rs:42:25
--> $DIR/invalid-union.rs:41:25
|
LL | let _: &'static _ = &C;
| ^^ referenced constant has errors
Expand Down
1 change: 0 additions & 1 deletion src/test/ui/consts/invalid-union.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
// build-fail
// stderr-per-bitwidth
#![feature(const_mut_refs)]
#![feature(const_ptr_offset)]
#![feature(untagged_unions)]
use std::cell::Cell;

Expand Down
1 change: 0 additions & 1 deletion src/test/ui/consts/issue-miri-1910.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// error-pattern unable to turn pointer into raw bytes
#![feature(const_ptr_read)]
#![feature(const_ptr_offset)]

const C: () = unsafe {
let foo = Some(&42 as *const i32);
Expand Down
10000
4 changes: 2 additions & 2 deletions src/test/ui/consts/issue-miri-1910.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
| unable to turn pointer into raw bytes
| inside `std::ptr::read::<u8>` at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
| inside `ptr::const_ptr::<impl *const u8>::read` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
| inside `C` at $DIR/issue-miri-1910.rs:8:5
| inside `C` at $DIR/issue-miri-1910.rs:7:5
|
::: $DIR/issue-miri-1910.rs:5:1
::: $DIR/issue-miri-1910.rs:4:1
|
LL | / const C: () = unsafe {
LL | | let foo = Some(&42 as *const i32);
Expand Down
1 change: 0 additions & 1 deletion src/test/ui/consts/offset.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// run-pass
#![feature(const_ptr_offset)]
#![feature(const_ptr_offset_from)]
use std::ptr;

Expand Down
1 change: 0 additions & 1 deletion src/test/ui/consts/offset_ub.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(const_ptr_offset)]
use std::ptr;

// normalize-stderr-test "alloc\d+" -> "allocN"
Expand Down
Loading
0