-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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 #131672
Rollup of 8 pull requests #131672
Conversation
what matters is we re doing the right things as doing sizeof, rather than KINFO_FILE_SIZE (only defined on intel architectures), the kernel making sure it matches the expectation in its side.
Co-authored-by: Ralf Jung <[email protected]>
This should fix our precompiled std being unsound in `std::fs` code.
This finally unites TyAndLayout, Layout, and LayoutS into the same crate, as one might imagine they would be placed. No functional changes.
std::fs::get_path freebsd update. what matters is we re doing the right things as doing sizeof, rather than passing KINFO_FILE_SIZE (only defined on intel architectures), the kernel making sure it matches the expectation in its side.
core/net: add Ipv[46]Addr::from_octets, Ipv6Addr::from_segments. Adds: - `Ipv4Address::from_octets([u8;4])` - `Ipv6Address::from_octets([u8;16])` - `Ipv6Address::from_segments([u16;8])` equivalent to the existing `From` impls. Advantages: - Consistent with `to_bits, from_bits`. - More discoverable than the `From` impls. - Helps with type inference: it's common to want to convert byte slices to IP addrs. If you try this ```rust fn foo(x: &[u8]) -> Ipv4Addr { Ipv4Addr::from(foo.try_into().unwrap()) } ``` it [doesn't work](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=0e2873312de275a58fa6e33d1b213bec). You have to write `Ipv4Addr::from(<[u8;4]>::try_from(x).unwrap())` instead, which is not great. With `from_octets` it is able to infer the right types. Found this while porting [smoltcp](https://github.com/smoltcp-rs/smoltcp/) from its own IP address types to the `core::net` types. ~~Tracking issues rust-lang#27709 rust-lang#76205~~ Tracking issue: rust-lang#131360
…hat-got-away, r=scottmcm library: Const-stabilize `MaybeUninit::assume_init_mut` FCP completed in rust-lang#86722 (comment) Also moves const-ness of an unstable fn under the `maybe_uninit_slice` gate, Cc rust-lang#63569
…=saethlin compiler: `{TyAnd,}Layout` comes home The `Layout` and `TyAndLayout` types are heavily abstract and have no particular target-specific qualities, though we do use them to answer questions particular to targets. We can keep it that way if we simply move them out of `rustc_target` and into `rustc_abi`. They bring a small entourage of connected types with them, but that's fine. This will allow us to strengthen a few abstraction barriers over time and thus make the notoriously gnarly layout code easier to refactor. For now, we don't need to worry about that and deliberately use reexports to minimize this particular diff.
…ersion, r=Kobzol emscripten: Use the latest emsdk 3.1.68 This should fix our precompiled std being unsound in `std::fs` code. Should resolve rust-lang#131467 I hope.
miri: avoid cloning AllocExtra We shouldn't be cloning Miri allocations, so make `AllocExtra::clone` panic instead, and adjust the one case where we *do* clone (the leak check) to avoid cloning. This is in preparation for rust-lang/miri#3966 where I am adding something to `AllocExtra` that cannot (easily) be cloned. r? ``@saethlin``
merge const_ipv4 / const_ipv6 feature gate into 'ip' feature gate rust-lang#76205 has been closed a while ago, but there are still some functions that reference it. Those functions are all unstable *and* const-unstable. There's no good reason to use a separate feature gate for their const-stability, so this PR moves their const-stability under the same gate as their regular stability, and therefore removes the remaining references to rust-lang#76205.
…ouxu Also use outermost const-anon for impl items in `non_local_defs` lint This PR update the logic for the impl paths (items) in the `non_local_definitions` lint to also consider const-anon in case the impl definition is wrapped inside const-anon it-self wrapped into a const-anon where the items are. r? `@jieyouxu` *(since you interacted on the issue)* Fixes *(after beta-backport)* rust-lang#131643
@bors r+ rollup=never p=8 |
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
@bors retry |
⌛ Testing commit d34b932 with merge bcbbea8bb86e7a28de232c49d421ebd6a40c47c0... |
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#128967 (std::fs::get_path freebsd update.) - rust-lang#130629 (core/net: add Ipv[46]Addr::from_octets, Ipv6Addr::from_segments.) - rust-lang#131274 (library: Const-stabilize `MaybeUninit::assume_init_mut`) - rust-lang#131473 (compiler: `{TyAnd,}Layout` comes home) - rust-lang#131533 (emscripten: Use the latest emsdk 3.1.68) - rust-lang#131593 (miri: avoid cloning AllocExtra) - rust-lang#131616 (merge const_ipv4 / const_ipv6 feature gate into 'ip' feature gate) - rust-lang#131660 (Also use outermost const-anon for impl items in `non_local_defs` lint) r? `@ghost` `@rustbot` modify labels: rollup
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
@bors retry |
⌛ Testing commit d34b932 with merge 17a19e684cdf3ca088af8b4da6a6209d128913f4... |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: f6648f252a In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (17a19e6): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (secondary -3.1%)This 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.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 782.104s -> 782.597s (0.06%) |
Successful merges:
MaybeUninit::assume_init_mut
#131274 (library: Const-stabilizeMaybeUninit::assume_init_mut
){TyAnd,}Layout
comes home #131473 (compiler:{TyAnd,}Layout
comes home)non_local_defs
lint #131660 (Also use outermost const-anon for impl items innon_local_defs
lint)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup