The `from_str` implementation from the example had an `unwrap` that would make it panic on invalid input strings. Instead of panicking, it nows returns an error to better reflect the intented behavior of the `FromStr` trait.
Declare `main` as visibility hidden on targets that default to hidden.
On targets with `default_hidden_visibility` set, which is currrently just WebAssembly, declare the generated `main` function with visibility hidden. This makes it consistent with clang's WebAssembly target, where `main` is just a user function that gets the same visibility as any other user function, which is hidden on WebAssembly unless explicitly overridden.
This will help simplify use cases which in the future may want to automatically wasm-export all visibility-"default" symbols. `main` isn't intended to be wasm-exported, and marking it hidden prevents it from being wasm-exported in that scenario.
fix issue with x.py setup running into explicit panic
Fixes problem with [Issue #102555](https://github.com/rust-lang/rust/issues/102555) causing `x.py` setup to fail. Simply requires `rustfmt` be downloaded a little later.
Allow passing rustix_use_libc cfg using RUSTFLAGS
Before this would error with
```
error: unexpected `rustix_use_libc` as condition name
|
= note: `-D unexpected-cfgs` implied by `-D warnings`
= help: was set with `--cfg` but isn't in the `--check-cfg` expected names
```
I'm setting rustix_use_libc when testing bootstrapping rustc with cg_clif as I'm disabling inline asm here.
Update docs so that deprecated method points to relevant method
The docs for the deprecated 'park_timeout_ms' method suggests that the user 'use park_timeout' method instead (at https://doc.rust-lang.org/std/thread/index.html).
Making a similar change so that the docs for the deprecated `sleep_ms` method suggest that the user `use sleep` method instead.
Improve the COPYRIGHT file
This is a cutdown version of #96784 which doesn't include the apfloat changes. At this point, the other 3 commits in this PR don't seem to be controversial and I'd like to go ahead and get those merged which will leave #96784 with only the more complex apfloat related change.
r? `@Mark-Simulacrum` since you are the reviewer on that PR
cc `@joshtriplett` since you also had feedback in that PR
Change argument handling in `remote-test-server` and add new flags
This PR updates `remote-test-server` to add two new flags:
* `--sequential` disables parallel test execution, accepting one connection at the time instead. We need this for Ferrocene as one of our emulators occasionally deadlocks when running multiple tests in parallel.
* `--bind <ip:port>` allows customizing the IP and port `remote-test-server` binds to, rather than using the default value.
While I was changing the flags, and [after chatting on what to do on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/remote-test-server.20flags), I took this opportunity to cleanup argument handling in `remote-test-server`, which is a breaking change:
* The `verbose` argument has been renamed to the `--verbose` flag.
* The `remote` argument has been removed in favor of the `--bind 0.0.0.0:12345` flag. The only thing the argument did was to change the bound IP to 0.0.0.0, which can easily be replicated with `--bind` and also is not secure as our "remote" default.
I'm also open to keep the old arguments with deprecation warnings.
r? `@Mark-Simulacrum`
`dist` creates a `rust-docs-json.tar.xz` tarfile. But build-manifest expected it to be named
`rust-docs-json-preview.tar.xz`. Change build-manifest to allow the name without the `-preview` suffix.
This also adds `rust-docs-json` to the `rust` component. I'm not quite sure why it exists,
but rustup uses it to determine which components are available.
This property was added to help with positioning the `[+]/[-]` toggle.
It is no longer necessary, because `details.rustdoc-toggle` already has
`position:relative` set on it.
When `.impl-items { flex-basis: 100% }` and `h3.impl, h3.method, h4.method,
h3.type, h4.type, h4.associatedconstant` were added in
34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9, it seems like it was a mistake even
then. According to MDN, [flex-basis] does nothing unless the box it's applied
to is a flex *item*, a child of a flex container. However, when this was
added, these elements were flex containers themselves.
[flex-basis]: https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis
Remove `expr_parentheses_needed` from `ParseSess`
Not sure why this method needed to exist on `ParseSess`, but we can achieve the same behavior by just inlining it everywhere.
Improve `File::set_times` error handling
Makes `File::set_times` return an error if the `SystemTime` cannot fit into the required type instead of panicking in `FileTimes::set_{accessed,modified}`. Also makes `File::set_times` return an error on Windows if either of the passed times are `0xFFFF_FFFF_FFFF_FFFF`, as [the documentation for `SetFileTime`](https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-setfiletime) states that this will prevent operations on the file handle from updating the corresponding file time instead of setting the corresponding file time to that value.
Tracking issue: #98245