| Age | Commit message (Collapse) | Author | Lines |
|
an extern type tail
|
|
Co-authored-by: Waffle Maybe <waffle.lapkin@gmail.com>
|
|
|
|
|
|
pointer occurs
|
|
r=workingjubilee
Portable SIMD subtree update
Syncs nightly to the latest changes from rust-lang/portable-simd
r? `@rust-lang/libs`
|
|
|
|
|
|
|
|
|
|
|
|
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
|
|
|
|
Const stabilize mem::discriminant
Tracking issue: #69821.
This PR is a rebase of https://github.com/rust-lang/rust/pull/103893 to resolve conflicts in library/core/src/lib.rs (against #102470 and #110393).
|
|
|
|
|
|
|
|
|
|
|
|
happens
|
|
|
|
const-eval: allow calling functions with targat features disabled at compile time in WASM
This is not unsafe on WASM, see https://github.com/rust-lang/rust/pull/84988
r? `@RalfJung`
Fixes https://github.com/rust-lang/rust/issues/116516
|
|
time in WASM
This is not unsafe on WASM, see https://github.com/rust-lang/rust/pull/84988
|
|
const_eval: allow function pointer signatures containing &mut T in const contexts
potentially fixes #114994
We utilize a `TypeVisitor` here in order to more easily handle control flow.
- In the event the typekind the Visitor sees is a function pointer, we skip over it
- However, otherwise we do one of two things:
- If we find a mutable reference, check it, then continue visiting types
- If we find any other type, continue visiting types
This means we will check if the function pointer _itself_ is mutable, but not if any of the types _within_ are.
|
|
const-eval: make misalignment a hard error
It's been a future-incompat error (showing up in cargo's reports) since https://github.com/rust-lang/rust/pull/104616, Rust 1.68, released in March. That should be long enough.
The question for the lang team is simply -- should we move ahead with this, making const-eval alignment failures a hard error? (It turns out some of them accidentally already were hard errors since #104616. But not all so this is still a breaking change. Crater found no regression.)
|
|
add test for const-eval error in dead code during monomorphization
|
|
|
|
update some comments around swap()
Based on ``@eddyb's`` comment [here](https://github.com/rust-lang/unsafe-code-guidelines/issues/461#issuecomment-1742156410).
And then I noticed the wrong capitalization for Miri and fixed it in some other places as well.
|
|
|
|
|
|
|
|
and some other raw pointer shenanigans while we are at it
|
|
- add new testcase for TypeVisitor on const-eval mutable ref check
|
|
also share the code that emits the actual error
|
|
read_via_copy: don't prematurely optimize away the read
Always do the read to ensure consistent UB error messages in const-eval/Miri.
r? `@scottmcm`
|
|
|
|
Don't forget to normalize the translated message
This PR adds a missing call to `normalize_whitespace` after translating an label.
Fixes https://github.com/rust-lang/rust/issues/115498
|
|
|
|
As of commit 7767cbb3b0b332fd0a46e347ea7f68f20109d768,
the tests/ui/consts/const-eval/ub-int-array.rs test is
failing on big-endian platforms (in particular s390x),
as the stderr output contains a hex dump that depends
on endianness.
Since this point intentionally verifies the hex dump to
check the uninitialized byte markers, I think we should
not simply standardize away the hex dump as is done with
some of the other tests in this directory.
However, most of the test is already endian-independent.
The only exception is one line of hex dump, which can
also be made endian-independent by choosing appropriate
constants in the source code.
Since the 32bit and 64bit stderr outputs were already
(and remain) identical, I've merged them and removed
the stderr-per-bitwidth marker.
Fixes (again) https://github.com/rust-lang/rust/issues/105383.
|
|
|
|
Miri: fix error on dangling pointer inbounds offset
We used to claim that the pointer was "dereferenced", but that is just not true.
Can be reviewed commit-by-commit. The first commit is an unrelated rename that didn't seem worth splitting into its own PR.
r? `@oli-obk`
|
|
also simplify the in-bounds checking in Miri's borrow trackers
|
|
Change default panic handler message format.
This changes the default panic hook's message format from:
```
thread '{thread}' panicked at '{message}', {location}
```
to
```
thread '{thread}' panicked at {location}:
{message}
```
This puts the message on its own line without surrounding quotes, making it easiser to read. For example:
Before:
```
thread 'main' panicked at 'env variable `IMPORTANT_PATH` should be set by `wrapper_script.sh`', src/main.rs:4:6
```
After:
```
thread 'main' panicked at src/main.rs:4:6:
env variable `IMPORTANT_PATH` should be set by `wrapper_script.sh`
```
---
See this PR by `@nyurik,` which does that for only multi-line messages (specifically because of `assert_eq`): https://github.com/rust-lang/rust/pull/111071
This is the change that does that for *all* panic messages.
|
|
Print omitted frames count for short backtrace mode
Fixes #111730
|
|
`const`-stablilize `NonNull::as_ref`
A bunch of pointer to reference methods have been made unstably const some time ago in #91823 under the feature gate `const_ptr_as_ref`.
Out of these, `NonNull::as_ref` can be implemented as a `const fn` in stable rust today, so i hereby propose to const stabilize this function only.
Tracking issue: #91822
``@rustbot`` label +T-libs-api -T-libs
|
|
|
|
|
|
|
|
for visitors
|
|
|