coverage of async function bodies should match non-async
This fixes some missing coverage within async function bodies.
Commit 1 demonstrates the problem in the fixed issue, and commit 2 corrects it.
Fixes: #83985
Add coverage to continue statements
`continue` statements were missing coverage. This was particularly
noticeable in a match pattern that contained only a `continue`
statement, leaving the branch appear uncounted. This PR addresses the
problem and adds tests to prove it.
r? `@tmandry`
cc: `@wesleywiser`
When encountering a E0382 borrow error involving an `Option` or `Result`
provide a suggestion to use `.as_ref()` on the prior move location to
avoid the move.
Fix#84165.
useless use of format! should return function directly
fixes#7066
changelog: [`useless_format`] wraps the content in the braces when it's needed.
r? `@giraffate`
* Remove `prefix` param of `document_short/full`, `render_markdown`, as its always an empty string.
* Remove `Option` wrapping of `document_short` `parent`, as its always `Some`.
Rustdoc doesn't work on IE11. It's been broken for months, it isn't supported
by the [tiered browser support list], it's even more severely broken on other
Rust websites, and IE11 doesn't support the `<details>` tag that we want
to use.
In the interest of honesty, let's give an actual error message for anyone
on IE11.
[tiered browser support list]: https://github.com/rust-lang/rfcs/blob/master/text/1985-tiered-browser-support.md
Remove unused footer section
I realized yesterday while working on docs.rs that rustdoc was generating a "footer"section that it doesn't use. No need to keep it then.
r? `@jyn514`
Introduce CompileMonoItem DepNode
This is likely required for allowing efficient hot code swap support in cg_clif's jit mode. My prototype currently requires re-compiling all functions, which is both slow and uses a lot of memory as there is not support for freeing the memory used by replaced functions yet.
cc https://github.com/bjorn3/rustc_codegen_cranelift/issues/1087
Match against attribute name when validating attributes
Extract attribute name once and match it against symbols that are being
validated, instead of using `Session::check_name` for each symbol
individually.
Assume that all validated attributes are used, instead of marking them
as such, since the attribute check should be exhaustive.
Instead of creating a JS toggle, this injects details/summary for
sub-variants of enums. This also fixes the CSS so that the toggle button
does not jump when expanding/collapsing.
rustdoc: Reduce visual weight of attributes.
Followup from #83337. As part of that PR, we stopped hiding attributes behind a toggle, because most things have just zero or one attributes. However, this made clear that the current rendering of attributes emphasizes them a lot, which distracts from function signatures. This PR changes their color of attributes to be the same as the toggles, and reduces their font weight.
This also removes `#[lang]` from the list of ALLOWED_ATTRIBUTES. This attribute is an implementation detail rather than part of the public-facing documentation.
![image](https://user-images.githubusercontent.com/220205/115131061-cc407d80-9fa9-11eb-9a77-ad3f3217f391.png)
Demo at https://hoffman-andrews.com/rust/de-emph-attr/std/string/struct.String.html#method.trim