-
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 9 pull requests #133322
Rollup of 9 pull requests #133322
Conversation
The old name and comment suggest that this parser is only used for options beginning with `no-`, which is mostly true but not entirely true.
Passing an explicit boolean value (`on`, `off` etc.) appears to work, but actually puts the compiler into an unintended state where unstable _options_ are still forbidden, but unstable values of _some_ stable options are allowed.
The `src/tools/rustc-perf` submodule is needed for vendoring because it is included in the vendor set.
For the code pattern reported in <rust-lang#133272>, ```rs impl Foo { fn fun() { let S { ref Self } = todo!(); } } ``` <rust-lang#121208> converted this to a `span_bug` from a `span_delayed_bug` because this specific self-ctor code pattern lacked test coverage. It turns out this can be hit but we just lacked test coverage, so change it back to a `span_delayed_bug` and add a target tested case.
This moves the list of submodules needed to vendor close to the list of cargo workspaces with the intent to help ensure they keep up-to-date and in sync.
Is available since libc 0.2.162
…ocal, r=dtolnay Stabilize `Ipv6Addr::is_unique_local` and `Ipv6Addr::is_unicast_link_local` Make `Ipv6Addr::is_unique_local` and `Ipv6Addr::is_unicast_link_local` stable (+const). Newly stable API: ```rust impl Ipv6Addr { // Newly stable under `ipv6_is_unique_local` const fn is_unique_local(&self) -> bool; // Newly stable under `ipv6_is_unique_local` const fn is_unicast_link_local(&self) -> bool; } ``` These stabilise a subset of the following tracking issue: - rust-lang#27709 I have looked and could not find any issues with `is_unique_local` and `is_unicast_link_local`. There is a well received comment calling for stabilisation of the latter function. Both functions are well defined and consistent with implementations in other languages: - [Go](https://cs.opensource.google/go/go/+/refs/tags/go1.23.0:src/net/netip/netip.go;l=518) - [Python](https://github.com/python/cpython/blob/e9d1bf353c3ccafc0d9b61b1b3688051bc976604/Lib/ipaddress.py#L2319-L2321) - [Ruby (unique local)](https://ruby-doc.org/stdlib-2.5.1/libdoc/ipaddr/rdoc/IPAddr.html#private-3F-source) - [Ruby (unicast link local)](https://ruby-doc.org/stdlib-2.5.1/libdoc/ipaddr/rdoc/IPAddr.html#link_local-3F-source) cc implementor `@little-dude` (I can't find the original PR for `is_unqiue_local`) r? libs-api `@rustbot` label +T-libs-api +needs-fcp
distinguish overflow and unimplemented in Step::steps_between
…olnay use `confstr(_CS_DARWIN_USER_TEMP_DIR, ...)` as a `TMPDIR` fallback on Darwin Rebased version of rust-lang#100824, FCP has completed there. Motivation from rust-lang#100824 (comment): > This is a behavioral change in an edge case on Darwin platforms (macOS, iOS, ...). > > Specifically, this changes it so that iff `TMPDIR` is unset in the environment, then we use `confstr(_CS_DARWIN_USER_TEMP_DIR, ...)` to query the user temporary directory (previously we just returned `"/tmp"`). If this fails (probably possible in a sandboxed program), only then do we fallback to `"/tmp"` (as before). > > The motivations here are two-fold: > > 1. This is better for security, and is in line with the [platform security recommendations](https://developer.apple.com/library/archive/documentation/Security/Conceptual/SecureCodingGuide/Articles/RaceConditions.html#//apple_ref/doc/uid/TP40002585-SW10), as it is unavailable to other users (although it is the same value as seen by all other processes run by the same user). > 2. This is a more consistent fallback for when `getenv("TMPDIR")` is unavailable, as `$TMPDIR` is usually initialized to the `DARWIN_USER_TEMP_DIR`. > > It seems quite unlikely that anybody will break because of this, and I think it falls under the carve-out we have for platform specific behavior: https://doc.rust-lang.org/nightly/std/io/index.html#platform-specific-behavior. Closes rust-lang#99608. Closes rust-lang#100824. `@rustbot` label O-apple T-libs-api r? Dylan-DPC
Stop being so bail-y in candidate assembly A conceptual follow-up to rust-lang#132084. We gotta stop bailing so much when there are errors; it's both unnecessary, leads to weird knock-on errors, and it's messing up the vibes lol
…, r=jieyouxu Don't allow `-Zunstable-options` to take a value Passing an explicit boolean value (`-Zunstable-options=on`, `off` etc.) sometimes appears to work, but actually puts the compiler into an unintended state where unstable _options_ are still forbidden, but unstable values of _some_ stable options are allowed. This is a result of `-Zunstable-options` being checked in multiple different places, in slightly different ways. Fixing the checks in `config::nightly_options` to understand boolean values would be non-trivial, so for now it's easier to make things consistent by forbidding values in the `-Z` parser. --- There were a few uses of this in tests, which happened to work because they were tests of unstable values.
Fix missing submodule in `./x vendor` The `src/tools/rustc-perf` submodule is needed for vendoring because it is included in the vendor set. To test this: 1. Get a fresh clone of `rust-lang/rust` 2. `./x vendor`
…-errors Re-delay a resolve `bug` related to `Self`-ctor in patterns For the code pattern reported in <rust-lang#133272>, ```rs impl Foo { fn fun() { let S { ref Self } = todo!(); } } ``` <rust-lang#121208> converted this to a `span_bug` from a `span_delayed_bug` because this specific self-ctor code pattern lacked test coverage. It turns out this can be hit but we just lacked test coverage, so change it back to a `span_delayed_bug` and add a targeted test case. Follow-up to rust-lang#121208, cc `@nnethercote` (very good exercise to expose our test coverage gaps). Fixes rust-lang#133272.
…g-neg, r=workingjubilee Add code example for `wrapping_neg` method for signed integers With this example, we make it obvious that `wrapping_neg` works both ways (neg to pos and pos to neg). r? `@workingjubilee`
Use arc4random of libc for RTEMS target Switch to the `arc4random` from libc. It is available since libc 0.2.162
@bors r+ rollup=never p=9 |
…mpiler-errors Rollup of 9 pull requests Successful merges: - rust-lang#129238 (Stabilize `Ipv6Addr::is_unique_local` and `Ipv6Addr::is_unicast_link_local`) - rust-lang#130867 (distinguish overflow and unimplemented in Step::steps_between) - rust-lang#131505 (use `confstr(_CS_DARWIN_USER_TEMP_DIR, ...)` as a `TMPDIR` fallback on Darwin) - rust-lang#132090 (Stop being so bail-y in candidate assembly) - rust-lang#133159 (Don't allow `-Zunstable-options` to take a value ) - rust-lang#133215 (Fix missing submodule in `./x vendor`) - rust-lang#133286 (Re-delay a resolve `bug` related to `Self`-ctor in patterns) - rust-lang#133301 (Add code example for `wrapping_neg` method for signed integers) - rust-lang#133313 (Use arc4random of libc for RTEMS target) r? `@ghost` `@rustbot` modify labels: rollup
💔 Test failed - checks-actions |
@bors retry |
2024-11-22T04:40:36.9729829Z �[1m�[31merror�[0m�[1m:�[0m failed to remove file |
…mpiler-errors Rollup of 9 pull requests Successful merges: - rust-lang#129238 (Stabilize `Ipv6Addr::is_unique_local` and `Ipv6Addr::is_unicast_link_local`) - rust-lang#130867 (distinguish overflow and unimplemented in Step::steps_between) - rust-lang#131505 (use `confstr(_CS_DARWIN_USER_TEMP_DIR, ...)` as a `TMPDIR` fallback on Darwin) - rust-lang#132090 (Stop being so bail-y in candidate assembly) - rust-lang#133159 (Don't allow `-Zunstable-options` to take a value ) - rust-lang#133215 (Fix missing submodule in `./x vendor`) - rust-lang#133286 (Re-delay a resolve `bug` related to `Self`-ctor in patterns) - rust-lang#133301 (Add code example for `wrapping_neg` method for signed integers) - rust-lang#133313 (Use arc4random of libc for RTEMS target) 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 |
Successful merges:
Ipv6Addr::is_unique_local
andIpv6Addr::is_unicast_link_local
#129238 (StabilizeIpv6Addr::is_unique_local
andIpv6Addr::is_unicast_link_local
)confstr(_CS_DARWIN_USER_TEMP_DIR, ...)
as aTMPDIR
fallback on Darwin #131505 (useconfstr(_CS_DARWIN_USER_TEMP_DIR, ...)
as aTMPDIR
fallback on Darwin)-Zunstable-options
to take a value #133159 (Don't allow-Zunstable-options
to take a value )./x vendor
#133215 (Fix missing submodule in./x vendor
)bug
related toSelf
-ctor in patterns #133286 (Re-delay a resolvebug
related toSelf
-ctor in patterns)wrapping_neg
method for signed integers #133301 (Add code example forwrapping_neg
method for signed integers)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup