* Since it's used exclusively on source pages, no need to explicitly
select.
* No need to hide it when the sidebar is open, since it fills the whole
page.
Rollup of 5 pull requests
Successful merges:
- #103087 (Documentation BTreeMap::append's behavior for already existing keys)
- #103089 (Mark derived StructuralEq as automatically derived.)
- #103102 (Clarify the possible return values of `len_utf16`)
- #103109 (PhantomData: inline a macro that is used only once)
- #103120 (rustdoc: Do not expect `doc(primitive)` modules to always exist)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
Clarify the possible return values of `len_utf16`
`char::len_utf16` always return 1 or 2. Clarify this in the docs, in the same way as `char::len_utf8`.
Documentation BTreeMap::append's behavior for already existing keys
`BTreeMap::append` overwrites existing values with new ones. This commit adds explicit documentation for that.
Rollup of 4 pull requests
Successful merges:
- #102857 (Add a regression test for #39137)
- #102953 (Improve docs for `struct_lint_level` function.)
- #103060 (rustdoc: make the help button a link to a page)
- #103115 (Clean up anchors.goml rustdoc GUI test)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
feat: Diagnose some incorrect usages of the question mark operator
Trying to figure out how the type stuff in r-a works some more, I think I am doing this correct here but I am not quite sure :)
Bump chalk
There's a bug in current chalk that prevents us from properly supporting GATs, which is supposed to be fixed in v0.86. Note the following:
- v0.86 is only going to be released next Sunday so I'll keep this PR as draft until then.
- This doesn't compile without https://github.com/rust-lang/chalk/pull/779, which I hope will be included in v0.86. I confirmed this compiles with it locally.
Two breaking changes from v0.84:
- `TypeFolder` has been split into `TypeFolder` and `FallibleTypeFolder` (https://github.com/rust-lang/chalk/pull/772)
- `ProjectionTy::self_type_parameter()` has been removed (https://github.com/rust-lang/chalk/pull/778)
Two breaking changes:
- `TypeFolder` has been split into `TypeFolder` and `FallibleTypeFolder`
- `ProjectionTy::self_type_parameter()` has been removed
Fix subst issues with return-position `impl Trait` in trait
1. Fix an issue where we were rebase impl substs onto trait method substs, instead of trait substs
2. Fix an issue where early-bound regions aren't being mapped correctly for RPITIT hidden types
Fixes#102301Fixes#102310Fixes#102334Fixes#102918
Fix missing explanation of where the borrowed reference is used when the same borrow occurs multiple times due to loop iterations
Fix#99824.
Problem of the issue:
If a borrow occurs in a loop, the borrowed reference could be invalidated at the same place at next iteration of the loop. When this happens, the point where the borrow occurs is the same as the intervening point that might invalidate the reference in the loop. This causes a problem for the current code finding the point where the resulting reference is used, so that the explanation of the cause will be missing. As the second point of "explain all errors in terms of three points" (see [leveraging intuition framing errors in terms of points"](https://rust-lang.github.io/rfcs/2094-nll.html#leveraging-intuition-framing-errors-in-terms-of-points), this explanation is very helpful for user to understand the error.
In the current implementation, the searching region for finding the location where the borrowed reference is used is limited to between the place where the borrow occurs and the place where the reference is invalidated. If those two places happen to be the same, which indicates that the borrow and invalidation occur at the same place in a loop, the search will fail.
One solution to the problem is when these two places are the same, find the terminator of the loop, and then use the location of the loop terminator instead of the location of the borrow for the region to find the place where the borrowed reference is used.
pretty: fix to print some lifetimes on HIR pretty-print
HIR pretty-printer doesn't seem to print some lifetimes in types. This PR fixes that.
Closes https://github.com/rust-lang/rust/issues/85089