Rollup of 22 pull requests
Successful merges:
- #53507 (Add doc for impl From for Waker)
- #53931 (Gradually expanding libstd's keyword documentation)
- #54965 (update tcp stream documentation)
- #54977 (Accept `Option<Box<$t:ty>>` in macro argument)
- #55138 (in which unused-parens suggestions heed what the user actually wrote)
- #55173 (Suggest appropriate syntax on missing lifetime specifier in return type)
- #55200 (Documents `From` implementations for `Stdio`)
- #55245 (submodules: update clippy from 5afdf8b7 to b1d03437)
- #55247 (Clarified code example in char primitive doc)
- #55251 (Fix a typo in the documentation of RangeInclusive)
- #55253 (only issue "variant of the expected type" suggestion for enums)
- #55254 (Correct trailing ellipsis in name_from_pat)
- #55269 (fix typos in various places)
- #55282 (Remove redundant clone)
- #55285 (Do some copy editing on the release notes)
- #55291 (Update stdsimd submodule)
- #55296 (Set RUST_BACKTRACE=0 for rustdoc-ui/failed-doctest-output.rs)
- #55306 (Regression test for #54478.)
- #55328 (Fix doc for new copysign functions)
- #55340 (Operands no longer appear in places)
- #55345 (Remove is_null)
- #55348 (Update RELEASES.md after destabilization of non_modrs_mods)
Failed merges:
r? @ghost
Remove is_null
It was confusingly named (`is_zero` would have been better, as someone pointed out somewhere but I forgot who or where), and it didn't even reliably test for "is this value 0 at run-time" because out-of-bounds pointers *can* be 0.
It's not used in rustc, and miri only really needs `is_null_ptr` and `to_bytes() == 0`, so let's just kill this method.
r? @oli-obk
Regression test for #54478.
This is a regression test for #54478.
I confirmed that it fails on:
rustdoc 1.30.0-beta.12 (96a229824 2018-10-04)
and passes on:
rustdoc 1.31.0-nightly (f99911a4a 2018-10-23)
Fix#54478
Set RUST_BACKTRACE=0 for rustdoc-ui/failed-doctest-output.rs
This UI test is sensitive to backtrace output, so it should make sure
that backtraces are not enabled by the environment.
Do some copy editing on the release notes
I was reading through the release notes to find something and noticed
some small grammatical and consistency issues.
I'm happy to revert any of these changes if folks disagree with them!
only issue "variant of the expected type" suggestion for enums
This suggestion (introduced in pull-request #43178 / eac74104) was being issued for one-field-struct expected types (in which case it is misleading and outright wrong), even though it was only intended for one-field enum-variants (most notably, `Some`).
Add a conditional to adhere to the original intent. (It would be possible to generalize to structs, but not obviously net desirable.) This adds a level of indentation, so the diff here is going to be
easier to read in [ignore-whitespace mode](https://github.com/rust-lang/rust/commit/b0d3d3b9?w=1).
Resolves#55250.
r? @pnkfelix
Clarified code example in char primitive doc
The example was not as clear as it could be because it was making an assumption about the structure of the data in order to multiply the number of elements in the slice by the item size. This change demonstrates the idea more straightforwardly, without needing a calculation, by just comparing the size of the slices.
submodules: update clippy from 5afdf8b7 to b1d03437
Just a routine update.
Changes:
````
new_ret_no_self: add sample from #3313 to Known Problems section.
Support multiline comments and hopefully fix panic
Check for comments in collapsible ifs
Resolve ICE in needless range loop lint
RIIR update_lints: Update changelog links
Rename if_let_redundant_pattern_matching to redundant_pattern_matching
Add lint for redundant pattern matching for explicit return boolean
Fix issue #3322: reword help message for len_zero
Simplify manual_memcpy suggestion in some cases
Fix dogfood
Update known problems for unnecessary_fold
RIIR update_lints: Replace lint count in README.md
Rename `active_lints` to `usable_lints`
Add comment on WalkDir vs. fs::read_dir
sort_by -> sort_by_key
Some more documentation for clippy_dev
Use `WalkDir` to also gather from subdirectories
Avoid linting `boxed_local` on trait implementations.
Website: Make lint categories linkable
Restore clippy_dummy's placeholder name
Swap order of methods in `needless_range_loop` suggestion in some cases
Revert "Exclude pattern guards from unnecessary_fold lint"
Exclude pattern guards from unnecessary_fold lint
````
Documents `From` implementations for `Stdio`
This PR solves part of #51430 by adding a basic summary and an example to each `impl From` inside `process` module (`ChildStdin`, `ChildStdout`, `ChildStderr`, `File`).
It does not document if the conversions allocate memory and how expensive they are.
Suggest appropriate syntax on missing lifetime specifier in return type
Suggest using `'static` when a lifetime is missing in the return type
with a structured suggestion instead of a note.
Fix#55170.
in which unused-parens suggestions heed what the user actually wrote
Aaron Hill pointed out that unnecessary parens around a macro call (paradigmatically, `format!`) yielded a suggestion of hideous macro-expanded code. `span_to_snippet` is fallable as far as the type system is concerned, so the pretty-printing can live on in the oft-neglected `else` branch.
Resolves#55109.
Gradually expanding libstd's keyword documentation
I'm working on adding new keywords to the documentation and refreshing the incomplete older ones, and I'm hoping that I can eventually add all the standalone-usable keywords after a bunch of incremental work. It would be cool to see the keywords section of std's docs be a definitive reference as to what each keyword means when you see it, and that's what I'm aiming towards with this work.
I'm far from a Rust expert so there will inevitably be things to fix in this, also I'm not sure if this should be a bunch of quickly-merged PRs or one gradually-updated PR that gets merged once it's done.