Try to make clear that this isn't an API guarantee for now, as we likely
want to refine these errors in the future, e.g. `ENOSPC` "No space left
on device".
CC #40322
Reword OsStr docs to clarify that utf8 may contain nulls
The use of the word "but" in the OsStr docs implies (at least to me) that valid UTF-8 does not contain null bytes.
Using "which" instead makes it clear that valid UTF-8 may contain null bytes.
only set "overruled by outer forbid" once for lint groups, by group name
Previously, conflicting forbid/allow attributes for a lint group would
result in a separate "allow(L) overruled by outer forbid(L)" error for
every lint L in the group. This was needlessly and annoyingly verbose;
we prefer to just have one error pointing out the conflicting
attributes.
(Also, while we're touching context.rs, clean up some unused arguments.)
Resolves#42873.
change binding name of for loop lowering to appease clippy
With the latest change to for loop lowering (#42634), a `_next` binding was introduced.
Unfortunately, this [disturbs](https://github.com/Manishearth/rust-clippy/issues/1846) clippy's `used_underscore_binding` lint. This commit just renames the binding to `__next` so clippy will be happy. It should have no other effect.
Expand Derivable docblock section for `Ord` and `PartialOrd` to cover
`enum` types, in addition to the existing language explaining it for
`struct` types.
rustdoc: Fix a few issues with associated consts
* Make sure private consts are stripped.
* Don't show a code block for the value if there is none.
* Make sure default values are shown in impls.
* Make sure docs from the trait are used if the impl has no docs.
Make wasm32 buildbot test LLVM backend
This adds the experimental targets option to configure so it can be used
by the builders and changes the wasm32 Dockerfile accordingly. Instead
of using LLVM from the emsdk, the builder's emscripten tools now uses
the Rust in-tree LLVM, since this is the one built with wasm support.
assert_eq failure message easier to read
By having the left and right strings aligned with one another it helps spot the difference between the two far quicker than if they are on the same line.
E.g.
Before:
```
thread 'tests::test_safe_filename' panicked at 'assertion failed: `(left == right)` left: `"-aandb--S123.html"` right: `"-aandb-S123.html"`',
```
After:
```
thread 'tests::test_safe_filename' panicked at 'assertion failed: `(left == right)`
left: `"-aandb--S123.html"`
right: `"-aandb-S123.html"`',
```
When the strings are both on the same line it take a lot longer to spot the difference. It is a small change but the small time savings add up with repetition. This would help Rust be an excellent language to write tests in out of the box.
Closes https://github.com/rust-lang/rust/issues/41615