| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
This avoids unnecessary allocations to grow vector to sufficient size.
|
|
[miri][typo] Fix a typo in a vector_block comment.
|
|
update Miri
|
|
|
|
|
|
fix typo: is_reserved
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A bit of spell-checking
I noticed the one error in miri-script and took care of a few more shallow ones.
|
|
|
|
|
|
Add `internal_features` lint
Implements https://github.com/rust-lang/compiler-team/issues/596
Also requires some more test blessing for codegen tests etc
`@jyn514` had the idea of just `allow`ing the lint by default in the test suite. I'm not sure whether this is a good idea, but it's definitely one worth considering. Additional input encouraged.
|
|
|
|
It lints against features that are inteded to be internal to the
compiler and standard library. Implements MCP #596.
We allow `internal_features` in the standard library and compiler as those
use many features and this _is_ the standard library from the "internal to the compiler and
standard library" after all.
Marking some features as internal wasn't exactly the most scientific approach, I just marked some
mostly obvious features. While there is a categorization in the macro,
it's not very well upheld (should probably be fixed in another PR).
We always pass `-Ainternal_features` in the testsuite
About 400 UI tests and several other tests use internal features.
Instead of throwing the attribute on each one, just always allow them.
There's nothing wrong with testing internal features^^
|
|
Avoid infinite recursion for auto-fmt and auto-clippy
I got stack overflows after I fixed the `-`/`_` typo 😆
|
|
|
|
|
|
|
|
|
|
|
|
|
|
custom debugging code
|
|
|
|
|
|
add some SB and TB tests
Also I realized the `direct_mut_to_const_raw` test can be enabled in TB, so let's do that.
|
|
|
|
|
|
|
|
direct_mut_to_const_raw test in TB
|
|
Improve `invalid_reference_casting` lint
This PR is a follow-up to https://github.com/rust-lang/rust/pull/111567 and https://github.com/rust-lang/rust/pull/113422.
This PR does multiple things:
- First it adds support for deferred de-reference, the goal is to support code like this, where the casting and de-reference are not done on the same expression
```rust
let myself = self as *const Self as *mut Self;
*myself = Self::Ready(value);
```
- Second it does not lint anymore on SB/TB UB code by only checking assignments (`=`, `+=`, ...) and creation of mutable references `&mut *`
- Thirdly it greatly improves the diagnostics in particular for cast from `&mut` to `&mut` or assignments
- ~~And lastly it renames the lint from `cast_ref_to_mut` to `invalid_reference_casting` which is more consistent with the ["rules"](https://github.com/rust-lang/rust-clippy/issues/2845) and also more consistent with what the lint checks~~ *https://github.com/rust-lang/rust/pull/113422*
This PR is best reviewed commit by commit.
r? compiler
|
|
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`
|
|
|
|
|
|
|
|
Rollup of 7 pull requests
Successful merges:
- #100455 (Implement RefUnwindSafe for Backtrace)
- #113428 (coverage: Replace `ExpressionOperandId` with enum `Operand`)
- #114283 (Use parking lot's rwlock even without parallel-rustc)
- #114288 (Improve diagnostic for wrong borrow on binary operations)
- #114296 (interpret: fix alignment handling for Repeat expressions)
- #114306 ([rustc_data_structures][perf] Simplify base_n::push_str.)
- #114320 (Cover statements for stable_mir)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
also simplify the in-bounds checking in Miri's borrow trackers
|
|
interpret: fix alignment handling for Repeat expressions
|
|
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.
|
|
|