This CSS was added in 5e01ba36c9, and served to
override CSS right above it that set a 5px padding for several kinds of
buttons in the same toolbar.
The CSS that it overrode is still there, but now it only applies to
`#settings-menu > a`, so there's nothing to override.
const_generics: correctly deal with bound variables
removes the hack in `resolve` which was needed because we evaluated constants without caring about their bound variables.
Each commit should be fairly self-contained, even if they build on each other
r? `@jackh726`
Rollup of 6 pull requests
Successful merges:
- #101153 (Migrate another part of rustc_infer to session diagnostic)
- #101399 (Shrink span for bindings with subpatterns.)
- #101422 (Hermit: Add File::set_time stub)
- #101455 (Avoid UB in the Windows filesystem code in... bootstrap?)
- #101498 (rustc: Parameterize `ty::Visibility` over used ID)
- #101549 (Use HashStable_Generic in rustc_type_ir)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
Use HashStable_Generic in rustc_type_ir
A lot of the types in this crate implemented HashStable directly to avoid circular dependencies. One way around that is to use HashStable_Generic. We adopt that here to avoid a lot of boilerplate.
This doesn't update all the types, because some would require `I: Interner + HashStable`.
r? `@cjgillot`
rustc: Parameterize `ty::Visibility` over used ID
It allows using `LocalDefId` instead of `DefId` when possible, and also encode cheaper `Visibility<DefIndex>` into metadata.
Avoid UB in the Windows filesystem code in... bootstrap?
This basically a subset of the changes from https://github.com/rust-lang/rust/pull/101171. I didn't think to look in src/bootstrap for more windows filesystem API usage, which was apparently a mistake on my part. It's kinda goofy that stuff like this is in here, but what are you gonna do, computers are awful.
I also added `winbase` to the `winapi` dep -- I tested this in a tmp crate but needed to add this to your Cargo.toml -- you `use winapi::stuff::winbase` in this function, but are relying on something else turning on that feature.
Shrink span for bindings with subpatterns.
Bindings with nested patterns (`binding @ pat` syntax) currently point to the full pattern. This PR proposes to shrink the span to stop before the ````@`.``` This makes the diagnostics for move/mutability conflicts clearer, as they not point to the `binding` only, instead of the full pat.
r? ```@estebank```
Migrate another part of rustc_infer to session diagnostic
Probably will migrate another file before marking this one as ready-to-merge.
`@rustbot` label +A-translation
r? rust-lang/diagnostics
cc https://github.com/rust-lang/rust/issues/100717
Fix `-Zgcc-ld=lld`
`-Zgcc-ld=lld` is currently broken. CI is currently ignoring its tests.
cc `@Mark-Simulacrum` on the `compiletest` change: I'm not sure which of `bootstrap`'s test step or `compiletest` is currently incorrect wrt windows' `--compile-lib-path`. Since `sysroot/bin` is passed on windows, that means that `compiletest` can't find `rust-lld` on windows and tests are currently ignored: it's looking for something that is in `sysroot/lib` instead.
They are currently ignored on unixes for a different reason: the lld wrapper has a different name than what is checked.
(I've changed `compiletest` in this PR, just because I could make a very targeted change there, whereas completely changing the intentional lib path that is passed seemed it'd have wider reaching implications on all tests.)
And in both unix/win cases, I've changed the detection to look for `rust-lld` rather than the wrappers in `bin/gcc-ld/`. It seems like the more stable of all these executable names.
r? `@petrochenkov`
I've tested the `lld-wrapper` change on linux and osx, but couldn't test on windows gnu targets (I only have MSVC targets, and these can't use `rust-lld` via `-Zgcc-ld=lld`, nor do they use the lld wrapper IIUC).
I'd expect it to work whether or not the wrapper is called with or without an executable suffix. But at least now CI should test it in these targets.
Fixes#101370.
A lot of the types in this crate implemented HashStable directly to
avoid circular dependencies. One way around that is to use
HashStable_Generic. We adopt that here to avoid a lot of boilerplate.
This doesn't update all the types, because some would require
`I: Interner + HashStable`.
rustdoc: remove unused CSS `.content .methods > div`
This selector has its roots in these commits:
* current version:
`.content .methods > div:not(.notable-traits):not(.method)` from 9077d540da
* intermediate version:
`.content .methods > div:not(.important-traits)` from d86621f69e
* original version:
`.content .methods > div { margin-left: 40px; }` from 0a46933c4d
Based on the call stack, where [`class='methods'`] calls `trait_item` and [`trait_item`] calls [`document`], this div selector was probably intended to target docblock and stability tags.
In the current version of the code, neither of these can possibly be nested directly below the `class='methods'` wrapper, because the [current version of the `trait_item` function] always wraps them in a `<details>` tag if they exist. The only div tag that can possibly be nested directly below it now is the one with class `method`, which is explicitly excluded.
[`class='methods'`]: 0a46933c4d/src/librustdoc/html/render.rs (L1811-L1842)
[`trait_item`]: 0a46933c4d/src/librustdoc/html/render.rs (L1807)
[`document`]: 0a46933c4d/src/librustdoc/html/render.rs (L1515-L1523)
[current version of the `trait_item` function]: e7c7aa7288/src/librustdoc/html/render/print_item.rs (L710)
rustdoc: remove unused CSS `#main-content > table td`
This rule was added in 4e2c59a970 to benefit the module items table. However, the module items table stopped using table tags when 6020c79dde switched us over to grid layout.
You can see when this one used to be triggered by visiting <https://doc.rust-lang.org/1.54.0/alloc/slice/index.html#structs-1> in a very narrow window, but it doesn't any more, because the module table is now rendered using `<div>` tags.
Pass ImplTraitContext as &mut to avoid the need of ImplTraitContext::reborrow
`@oli-obk` requested this and other changes as a way of simplifying #101345. This is just going to make the diff of #101345 smaller.
r? `@oli-obk` `@cjgillot`
Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH`
This commit removes the annotation only for those tests where the 32 bit and 64 bit files were exactly identical. I didn't touch anything in the `mir-opt/const` directory, since having this annotation there seems more principled, even if it doesn't make a difference.
This also removes four additional files related to the `separate_const_switch.rs` test. The associated annotations were removed in #100827 , but I forgot to remove the files as well. (#97564 is the issue tracking an automated check here)
r? ```@wesleywiser```
stdio: Document no support for writing to non-blocking stdio/stderr
Printing to stdio/stderr that have been opened with non-blocking
(O_NONBLOCK in linux) can result in an error, which is not handled
by std::io module causing a panic.
Signed-off-by: Usama Arif <usama.arif@bytedance.com>
Add -api-level to pm command
As of ~Aug 30th, `pm build` commands require an `api-level` flag. This flag should match the fuchsia api-level that's being targeted by the code. Since this is dependent on the version of the SDK that's being used, we may want to change this to something a bit more robust in the future.
Open a BCrypt algorithm handle
Fixes#101474, supplants #101456.
Replaces use of a pseduo handle with manually opening a algorithm handle.
Most interesting thing here is the atomics.
r? `@thomcc`
This rule was added in 4e2c59a970
to benefit the module items table. However, the module items table stopped
using table tags when 6020c79dde
switched us over to grid layout.
You can see when this one used to be triggered by visiting
<https://doc.rust-lang.org/1.54.0/alloc/slice/index.html#structs-1> in a
very narrow window, but it doesn't any more, because the module table is
now rendered using `<div>` tags.
This selector has its roots in these commits:
* current version:
`.content .methods > div:not(.notable-traits):not(.method)` from
9077d540da
* intermediate version:
`.content .methods > div:not(.important-traits)` from
d86621f69e
* original version:
`.content .methods > div { margin-left: 40px; }` from
0a46933c4d
Based on the call stack, where [`class='methods'`] calls `trait_item` and
[`trait_item`] calls [`document`], this div selector was probably intended to
target docblock and stability tags.
In the current version of the code, neither of these can possibly be nested
directly below the `class='methods'` wrapper, because the [current version of
the `trait_item` function] always wraps them in a `<details>` tag if they
exist. The only div tag that can possibly be nested directly below it now is
the one with class `method`, which is explicitly excluded.
[`class='methods'`]: 0a46933c4d/src/librustdoc/html/render.rs (L1811-L1842)
[`trait_item`]: 0a46933c4d/src/librustdoc/html/render.rs (L1807)
[`document`]: 0a46933c4d/src/librustdoc/html/render.rs (L1515-L1523)
[current version of the `trait_item` function]: e7c7aa7288/src/librustdoc/html/render/print_item.rs (L710)
Printing to stdio/stderr that have been opened with non-blocking
(O_NONBLOCK in linux) can result in an error, which is not handled
by std::io module causing a panic.
Signed-off-by: Usama Arif <usama.arif@bytedance.com>
now that CI correctly detects rust-lld in run-make tests, we ignore this
test since it relies on `-Zgcc-ld=lld` which is not made to work on the
windows-msvc targets: it requires a gcc flavor.