| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
|
|
|
|
Add as_slice() to slice::IterMut and vec::Drain
In bluss/indexmap#88, we found that there was no easy way to implement
`Debug` for our `IterMut` and `Drain` iterators. Those are built on
`slice::IterMut` and `vec::Drain`, which implement `Debug` themselves,
but have no other way to access their data. With a new `as_slice()`
method, we can read the data and customize its presentation.
|
|
Make `Unique::as_ptr`, `NonNull::dangling` and `NonNull::cast` const
|
|
MaybeUninit: add read_initialized, add examples
This adds a new `read_initialized` method, similar to suggestions by @Amanieu and @shepmaster. I also added examples to this and other methods.
|
|
overhaul unused doc comments lint
This PR contains a number of improvements to the `unused_doc_comments` lint.
- Extends the span to cover the entire comment when using sugared doc comments.
- Triggers the lint for all unused doc comments on a node, instead of just the first one.
- Triggers the lint on macro expansions, and provides a help note explaining that doc comments must be expanded by the macro.
- Adds a label pointing at the node that cannot be documented.
Furthermore, this PR fixes any instances in rustc where a macro expansion was erroneously documented.
|
|
Report the diagnostic on macro expansions, and add a label indicating
why the comment is unused.
|
|
|
|
|
|
Co-Authored-By: RalfJung <post@ralfj.de>
|
|
This is similar to the existing implementation for `Result`. It will
take each item into the accumulator unless a `None` is returned.
|
|
|
|
|
|
Co-Authored-By: cuviper <cuviper@gmail.com>
|
|
|
|
Ensure the core::ffi::VaList structure passes the improper_ctypes lint.
|
|
In bluss/indexmap#88, we found that there was no easy way to implement
`Debug` for our `IterMut` and `Drain` iterators. Those are built on
`slice::IterMut` and `vec::Drain`, which implement `Debug` themselves,
but have no other way to access their data. With a new `as_slice()`
method, we can read the data and customize its presentation.
|
|
Option
|
|
Rollup of 14 pull requests
Successful merges:
- #58730 (Have all methods of Filter and FilterMap use internal iteration)
- #58780 (ManuallyDrop != MaybeUninit)
- #58782 (Replace `s` with `self` in docs for str methods taking self.)
- #58785 (allow specifying attributes for tool lints)
- #58802 (Ensure `record_layout_for_printing()` is inlined.)
- #58821 (Fixed a syntax error in the pin docs)
- #58830 (tidy: deny(rust_2018_idioms))
- #58832 (Revert switching to GCP on AppVeyor)
- #58833 (tools/rustbook: deny(rust_2018_idioms))
- #58835 (tools/remote-test-{client,server}: deny(rust_2018_idioms))
- #58838 (Fix typo in Vec#resize_with documentation)
- #58842 (Forbid duplicating Cargo as a dependency)
- #58852 (Update toolchain to build NetBSD release)
- #58865 (Fix C-variadic function printing)
|
|
|
|
Fixed a syntax error in the pin docs
|
|
Replace `s` with `self` in docs for str methods taking self.
Cherry picked from PR #58596 which is blocked on some intra-doc link bugs.
|
|
ManuallyDrop != MaybeUninit
Cc @Centril
|
|
Have all methods of Filter and FilterMap use internal iteration
This PR changes `Filter::{next, next_back, count}` and `FilterMap::{next, next_back}` to all use internal iteration. The `next` and `next_back` methods are changed to directly forward to `try_for_each` and `try_rfold` respectively, using `Result` as the `Try` type. I think that's okay? Alternatively, I could change their implementations to use `LoopState` instead if there's any benefit in doing so.
r? @scottmcm
|
|
|
|
|
|
|
|
Co-Authored-By: RalfJung <post@ralfj.de>
|
|
|
|
Make `Unique::as_ptr` const without feature attribute as it's unstable
Make `NonNull::dangling` and `NonNull::cast` const with `feature = "const_ptr_nonnull"`
|
|
|
|
|
|
|
|
|
|
|
|
Unfortunately trying to run doctests on my local machine is
not really faster than letting Travis do it...
|
|
|
|
|
|
They're not as good as `From` 'cause they don't stringify
the types and generate examples and so on, but it's a start.
|
|
The examples are still lacking for now, both for module docs
and for methods/impl's.
|
|
|
|
Co-Authored-By: xfix <konrad@borowski.pw>
|
|
|
|
|
|
|
|
|
|
I wondered what the `<<!` operator is although the exclamation mark was
only the end of the sentence.
|