core: ensure `no_fp_fmt_parse` builds are warning-free
Rust recently introduced a new `unused_imports` warning in `no_fp_fmt_parse` builds, which was fixed in
https://github.com/rust-lang/rust/pull/105434.
To avoid accumulating more over time, let's keep the builds warning-free. This ensures projects compiling `core` with this custom config do not see the warnings in the future and that they can keep enabling `-Dwarnings`.
Similarly, https://github.com/rust-lang/rust/pull/98652 did it for `alloc`'s `no_global_oom_handling`.
Rollup of 6 pull requests
Successful merges:
- #105493 (Help rust-analyzer normalize query return types)
- #105710 (Don't bug if we're trying to cast `dyn*` to another type)
- #105711 (bail in `collect_trait_impl_trait_tys` if signatures reference errors)
- #105768 (Detect inherent associated types not having CamelCase)
- #105780 (rustdoc: Don't add "Read more" link if there is no extra content)
- #105802 (Make enum-match.rs test robust against variable name changes)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
Make enum-match.rs test robust against variable name changes
https://reviews.llvm.org/D140192 caused the LLVM variable generated for enum discriminant checks to be named differently (%narrow vs %1).
This adjusts the test CHECK directives to match any name.
Rust recently introduced a new `unused_imports` warning
in `no_fp_fmt_parse` builds, which was fixed in
https://github.com/rust-lang/rust/pull/105434.
To avoid accumulating more over time, let's keep the builds
warning-free. This ensures projects compiling `core` with
this custom config do not see the warnings in the future
and that they can keep enabling `-Dwarnings`.
Similarly, https://github.com/rust-lang/rust/pull/98652 did it
for `alloc`'s `no_global_oom_handling`.
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
https://reviews.llvm.org/D140192 caused the LLVM variable generated
for enum discriminant checks to be named differently (%narrow vs %1).
This adjusts the test CHECK directives to match any name.
Stabilize default_alloc_error_handler
Tracking issue: #66741
This turns `feature(default_alloc_error_handler)` on by default, which causes the compiler to automatically generate a default OOM handler which panics if `#[alloc_error_handler]` is not provided.
The FCP completed over 2 years ago but the stabilization was blocked due to an issue with unwinding. This was fixed by #88098 so stabilization can be unblocked.
Closes#66741
Implement DerefMut for PathBuf
Without this, there's no way to get a `&mut Path` from `PathBuf` without
going through `into_boxed_path`. This is relevant now that #105002 adds
`PathBuf::as_mut_os_string` and `Path::as_mut_os_str`.
* This stops applying a margin to the additional example links.
Because these links are `display: inline`, it doesn't actually do anything.
* This switches from using a margin-bottom with a special exception for
the examples themselves, plus an additional margin on the hide button,
to instead using just margin-top on the examples, with an exception for
the first one.
No user-visible changes should result from this.
There used to be a logical bug where IncrementVisitor would
completely stop checking an expression/block after seeing a continue
statement. This led to issue #10058 where a variable incremented
(or otherwise modified) after any continue statement would still be
considered incremented only once.
The solution is to continue scanning the expression after seeing a
`continue` statement, but increment self.depth so that the Visitor
thinks that the rest of the loop is within a conditional.
rustdoc: simplify CSS for codeblock tooltips
Instead of making its parts `display: none` and then changing it on hover, just make the pseudo-element itself on hover.
doc: Fix a few small issues
Hey, while reading through the (awesome) stdlib docs, I found a few minor typos.
* A few typos around generic types (`;` vs `,`)
* Use inline code formatting for code fragments
* One instance of wrong wording
Rewrite `E0158` error-code docs for clarity
Fixes#105585.
The `E0158` error-code docs are unclear. It doesn't explain all three different variants of the error and doesn't explain *why* the error occurs. This PR cleans it up a bit and brings it properly into line with [RFC1567](https://rust-lang.github.io/rfcs/1567-long-error-codes-explanation-normalization.html).
I'm a first time Rust contributor so I've probably not got it quite right. I also haven't run the whole build process because I assume that my minor docs changes shouldn't break everything.
Use relative links in the unstable and rustc book
Fixes#98227.
As it stands, potential issues could arise from mismatch of stable/ nightly in the books. This PR fixes this issue by using relative links instead of absolute ones. I have replaced every absolute link under `src/doc/rustc` and `src/doc/unstable-book/` and tested each manually.
The link at `src/doc/rustc/src/targets/index.md:7`:
`[here](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_target/spec/struct.Target.html).`
I need help with because my local directory structure and https://doc.rust-lang.org/ seem to be different, where is `nightly-rustc`?
`@jyn514`
always use `anonymize_bound_vars`
Unless this is perf-sensitive, it's probably best to always use one anonymize function that does the right thing for all bound vars.
r? types