Feature gate the `rustdoc::missing_doc_code_examples` lint
Moves the lint from being implicitly active on nightly `rustdoc` to requiring a feature to activate, like other unstable lints.
Uses the new tracking issue https://github.com/rust-lang/rust/issues/101730
rustdoc: improve rustdoc HTML suggestions handling of nested generics
Based on some poor suggestions produced when stablizing this lint and running it on `manformed-generics.rs` in #101720
rustdoc: remove no-op `#search`
The margin rule was added in c729e4dca7 to remove an unnecessary left margin that was present on desktop. This desktop-mode margin was itself removed in 135281ed15.
The padding rule was added in 135281ed15 when converting the rule for `#main`, but didn't do anything even then.
Update browser UI test 0 10
The biggest change from this browser-ui-test update is the upgrade of the puppeteer version to `17.1.3` (the latest in short).
I also added the command `click-with-offset` to still allow us to click on the `[-]` part.
cc `@jsha`
r? `@notriddle`
Check that the types in return position `impl Trait` in traits are well-formed
This effectively duplicates `check_associated_type_bounds`, but that shouldn't be for long, since we're going to remove it once we refactor RPITITs into regular associated items.
Fixes#101663
---
We don't check
```rust
trait Foo {
fn bar() -> impl ?Sized;
}
```
currently, but that's for a different reason, which is that we don't currently check that a trait function's return type is sized (i.e. `fn bar() -> [u8]` also works in a trait).
Fix naming format of IEEE 754 standard
Currently the documentation of f64::min refers to "IEEE-754 2008" while the documentation of f64::minimum refers to "IEEE 754-2019".
Note that one has the format IEEE,hyphen,number,space,year while the other is IEEE,space,number,hyphen,year. The official IEEE site [1] uses the later format and it is also the one most commonly used throughout the codebase.
Update all comments and - more importantly - documentation to consistently use the official format.
[1] https://standards.ieee.org/ieee/754/4211/
Add inline-llvm option for disabling/enabling LLVM inlining
In this PR, a new -Z option `inline-llvm` is added in order to be able to turn on/off LLVM inlining.
The capability of turning on/off inlining in LLVM backend is needed for testing performance implications of using recently enabled inlining in rustc's frontend (with -Z inline-mir=yes option, #91743). It would be interesting to see the performance effect using rustc's frontend inlining only without LLVM inlining enabled. Currently LLVM is still doing inlining no mater what value inline-mir is set to. With the option `inline-llvm` being added in this PR, user can turn off LLVM inlining by using `-Z inline-llvm=no` option (the default of inline-llvm is 'yes', LLVM inlining enabled).
Fix ICE in opt_suggest_box_span
We were _totally_ mishandling substs and obligations in `opt_suggest_box_span`, so I reworked that function pretty heavily.
Also some drive-by changes, namely removing `ret_type_span`.
Fixes#101465
The `visit_path_segment` method of both the AST and HIR visitors has a
`path_span` argument that isn't necessary. This commit removes it.
There are two very small and inconsequential functional changes.
- One call to `NodeCollector::insert` now is passed a path segment
identifier span instead of a full path span. This span is only used in
a panic message printed in the case of an internal compiler bug.
- Likewise, one call to `LifetimeCollectVisitor::record_elided_anchor`
now uses a path segment identifier span instead of a full path span.
This span is used to make some `'_` lifetimes.