doc: Clarify the lifetime returned by `Box::leak`
`Box::leak` mentions that it can return a `'static` reference, but it
wasn't immediately clear to me why it doesn't always do so. This is
because of the `T: 'a` constraint needed to form a valid reference, and
in general we want to be more flexible than requiring `T: 'static`.
This patch tries to clarify the relationship between `T` and `'a`.
Rollup of 10 pull requests
Successful merges:
- #52538 (Remove obsolete flags in the i586_musl Dockerfile)
- #52548 (Cursor: update docs to clarify Cursor only works with in-memory buffers)
- #52605 (Do not suggest using `to_owned()` on `&str += &str`)
- #52621 (Fix color detection for Windows msys terminals.)
- #52622 (Use MultiSpan in E0707 and E709)
- #52627 (Compile rustc before building tests for rustdoc)
- #52637 (Don't use NonNull::dangling as sentinel value in Rc, Arc)
- #52640 (Forget Waker when cloning LocalWaker)
- #52641 (Simplify 2 functions in rustc_mir/dataflow)
- #52642 (Replace a few expect+format combos with unwrap_or_else+panic)
Failed merges:
r? @ghost
Simplify 2 functions in rustc_mir/dataflow
- `graphviz::outgoing`: the `enumerate` only provides indices; use a range instead
- `DataflowState::interpret_set`: change a push loop to an iterator and remove the `each_bit` helper function
Forget Waker when cloning LocalWaker
Since NonNull is Copy the inner field of the cloned Waker was copied for
use in the new LocalWaker, however this left Waker to be dropped. Which
means that when cloning LocalWaker would also erroneously call drop_raw.
This change forgets the Waker, rather then dropping it, leaving the
inner field to be used by the returned LocalWaker.
Closes#52629.
Do not suggest using `to_owned()` on `&str += &str`
- Don't provide incorrect suggestion for `&str += &str` (fix#52410)
- On `&str + String` suggest `&str.to_owned() + &String` as a single suggestion
Cursor: update docs to clarify Cursor only works with in-memory buffers
Reduce misconceptions about Cursor being more general than it really is.
Fixes: #52470