Rollup of 7 pull requests#103617
Closed
matthiaskrgr wants to merge 18 commits intorust-lang:masterfrom
Closed
Conversation
Co-authored-by: Ralf Jung <post@ralfj.de>
Co-authored-by: Ralf Jung <post@ralfj.de>
The margin was already being set to 0 only a few lines lower.
Co-authored-by: Ralf Jung <post@ralfj.de>
…n3, r=thomcc
Even nicer errors from assert_unsafe_precondition
For example, now running `cargo test` with this patch I get things like:
```
$ cargo +stage1 test
Finished test [unoptimized + debuginfo] target(s) in 0.01s
Running unittests src/lib.rs (target/debug/deps/malloc_buf-9d105ddf86862995)
running 5 tests
thread 'tests::test_null_buf' panicked at 'unsafe precondition violated: is_aligned_and_not_null(data) &&
crate::mem::size_of::<T>().saturating_mul(len) <= isize::MAX as usize', /home/ben/rust/library/core/src/slice/raw.rs:93:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread panicked while panicking. aborting.
error: test failed, to rerun pass `--lib`
Caused by:
process didn't exit successfully: `/tmp/malloc_buf-1.0.0/target/debug/deps/malloc_buf-9d105ddf86862995` (signal: 6, SIGABRT: process abort signal)
```
This is still not perfect, but these are better for another PR:
* `stringify!` is trying to do clever pretty-printing on the `expr` inside `assert_unsafe_precondition` and can even add a newline.
* It would be nice to print a bit more information about where the problem is. Perhaps this is `cfg_attr(debug_assertions, track_caller)`, or perhaps it the function name added to `Location`.
cc `@RalfJung` this is what I was thinking of for rust-lang#102732 (comment)
Try to say that memory outside the AM is always exposed cc `@Gankra` `@thomcc` I want to confidently tell people that they can use `from_exposed_addr` to get a pointer for doing MMIO and/or other hardware interactions done with volatile reads/writes at particular addresses outside the Rust AM. Currently, the docs indicate that would be UB. With this change, now the docs indicate that this is intended to be a valid use of `from_exposed_addr`. r? `@RalfJung`
…er-errors Do not consider repeated lifetime params for elision. Fixes rust-lang#103330
Make param index generation a bit more robust r? ```@lcnr``` While not really necessary for closure and anon const ids, it's strictly more correct
…ait, r=lcnr Move a wf-check into the site where the value is instantiated r? `@lcnr`
…ckh726 Process registered region obligation in `resolve_regions_with_wf_tys` Fixes rust-lang#103573
…-notable, r=GuillaumeGomez rustdoc: remove redundant CSS selector `.notable-traits .notable` The margin was already being set to 0 only a few lines lower.
Member
Author
|
@bors r+ rollup=never p=7 |
Collaborator
Collaborator
|
⌛ Testing commit 30fc2a4 with merge 64f804c14cd75977747ced46507beab68f0c7c35... |
Contributor
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
resolve_regions_with_wf_tys#103586 (Process registered region obligation inresolve_regions_with_wf_tys).notable-traits .notable#103592 (rustdoc: remove redundant CSS selector.notable-traits .notable)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup