-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 8 pull requests #123913
Rollup of 8 pull requests #123913
Conversation
The `thread_local!` examples use `RefCell` for `Copy` types. Update examples to have one `Copy` and one non-`Copy` type using `Cell` and `RefCell`, respectively.
Reduce `unsafe` block scope and add `SAFETY` comments.
This is in accordance with Clippy's redundant_closure_for_method_calls.
Original diff from @notgull in rust-lang#118349, small changes from me. on OpenBSD, getsockname(2) returns the actual size of the socket address, and not the len of the content. Figure out the length for ourselves. see https://marc.info/?l=openbsd-bugs&m=170105481926736&w=2 Fixes rust-lang#116523
…d::min_stack_size`
This change makes tidy to handle run-make checks with a single iteration, avoiding the need for multiple iterations and copying. Signed-off-by: onur-ozkan <work@onurozkan.dev>
Add a helper macro for adding common methods to command wrappers. Common methods include helpers that delegate to `Command` and running methods. - `arg` and `args` (delegates to `Command`) - `env`, `env_remove` and `env_clear` (delegates to `Command`) - `output`, `run` and `run_fail` This helps to avoid needing to copy-pasta / reimplement these common methods on a new command wrapper, which hopefully reduces the friction for run-make test writers wanting to introduce new command wrappers.
Removes the manual copy-pasta'd implementation of common methods.
…ark-Simulacrum Thread local updates for idiomatic examples Update thread local examples to make more idiomatic use of `Cell` for `Copy` types, `RefCell` for non-`Copy` types. Also shrink the size of `unsafe` blocks, add `SAFETY` comments, and fix `clippy::redundant_closure_for_method_calls`.
…mulacrum run-make-support: tidy up support library - Make `handle_failed_output` take `&Command` instead of having the caller keep doing `format!("{:#?}", s)`. - Introduce a helper macro for implementing common command wrappers, such as `arg`, `args`, `run`, `run_fail`. - Use the helper macro on existing command wrappers and remove manual copy-pasta'd implementations.
…Mark-Simulacrum OpenBSD fix long socket addresses Original diff from ``@notgull`` in rust-lang#118349, small changes from me. on OpenBSD, getsockname(2) returns the actual size of the socket address, and not the len of the content. Figure out the length for ourselves. see https://marc.info/?l=openbsd-bugs&m=170105481926736&w=2 Fixes rust-lang#116523
Doc: replace x with y for hexa-decimal fmt I found it a bit unintuitive to know which is variable and which is the format string in `format!("{x:x}")`, so I switched it to `y`.
…mulacrum Add missing `unsafe` to some internal `std` functions Adds `unsafe` to a few internal functions that have safety requirements but were previously not marked as `unsafe`. Specifically: - `std::sys::pal::unix::thread::min_stack_size` needs to be `unsafe` as `__pthread_get_minstack` might dereference the passed pointer. All callers currently pass a valid initialised `libc::pthread_attr_t`. - `std::thread::Thread::new` (and `new_inner`) need to be `unsafe` as it requires the passed thread name to be valid UTF-8, otherwise `Thread::name` will trigger undefined behaviour. I've taken the opportunity to split out the unnamed thread case into a separate `new_unnamed` function to make the safety requirement clearer. All callers meet the safety requirement now that rust-lang#123505 has been merged.
…mulacrum reduce tidy overheads in run-make checks This change makes tidy to handle run-make checks with a single iteration, avoiding the need for multiple iterations and copying.
…, r=compiler-errors Generic associated consts: Check regions earlier when comparing impl with trait item def Fixes rust-lang#123836. r? compiler-errors or compiler
…lacrum compiletest: Update rustfix to 0.8.1 This updates the version of rustfix used in compiletest to be closer to what cargo is using. This is to help ensure `cargo fix` and compiletest are aligned. There are some unpublished changes to `rustfix`, which will update in a future PR when those are published. Will plan to update ui_test in the near future to avoid the duplicate.
@bors r+ rollup=never p=8 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: a3269e920c In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (78bc0a5): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Bootstrap: 676.944s -> 677.009s (0.01%) |
Successful merges:
unsafe
to some internalstd
functions #123879 (Add missingunsafe
to some internalstd
functions)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup