Skip to content

Rollup of 10 pull requests #76129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
acd3962
Fix typo in release notes
camelid Aug 25, 2020
91e4aaa
Use intra-doc links for `core/src/slice.mod.rs`
Amjad50 Aug 26, 2020
8e33137
Fixes `intra-doc` same scope links
Amjad50 Aug 26, 2020
a04e120
Used intra-doc links for `NonNull::dangling()` occurrences
Amjad50 Aug 26, 2020
6aae4a2
Used intra-doc links for `ptr#safety` occurrences
Amjad50 Aug 26, 2020
2d6ab12
Liballoc extend use intra doc link
pickfire Aug 28, 2020
7be129e
Add missing hyphen
camelid Aug 28, 2020
c7e428e
Liballoc vec doc use associated function
pickfire Aug 29, 2020
8a92718
Switch to intra-doc links in core/src/{convert,iter}/mod.rs
nixphix Aug 27, 2020
01d95f2
resolve comments
nixphix Aug 27, 2020
300a007
Fix intra-doc path resolution problem in `library/alloc/src/slice.rs`
Amjad50 Aug 30, 2020
7ea4c28
add i32::MAX link
nixphix Aug 30, 2020
523fea4
revert Some(Item) link
nixphix Aug 30, 2020
a97dcfa
Run cfg-stripping on generic parameters before invoking derive macros
Aaron1011 Aug 28, 2020
ccffea5
Move lexer unit tests to rustc_lexer
matklad Aug 29, 2020
518cac9
Remove unused function
matklad Aug 29, 2020
6ff471b
ty: remove obsolete printer
davidtwco Aug 28, 2020
7dfbf59
cleanup: Remove duplicate library names from `Cargo.toml`s
petrochenkov Jul 23, 2020
30dc32b
Add (non-public) slice::split_at_unchecked() and split_at_mut_uncheck…
sdroege Aug 28, 2020
d08996a
Get rid of bounds check in slice::chunks_exact() and related function…
sdroege Aug 26, 2020
8d3cf92
Improve documentation of slice::get_unchecked() / split_at_unchecked()
sdroege Aug 30, 2020
096b49c
Rollup merge of #74668 - petrochenkov:noname, r=mark-i-m
Dylan-DPC Aug 30, 2020
74d6b94
Rollup merge of #75926 - camelid:patch-5, r=jonas-schievink
Dylan-DPC Aug 30, 2020
213116f
Rollup merge of #75932 - Amjad50:intra-doc-core-slice, r=jyn514
Dylan-DPC Aug 30, 2020
7919f05
Rollup merge of #75936 - sdroege:chunks-exact-construction-bounds-che…
Dylan-DPC Aug 30, 2020
e1276a3
Rollup merge of #75969 - nixphix:docs/mod, r=jyn514
Dylan-DPC Aug 30, 2020
de5646d
Rollup merge of #76010 - Aaron1011:fix/cfg-generic-param, r=petrochenkov
Dylan-DPC Aug 30, 2020
54fd272
Rollup merge of #76023 - pickfire:patch-4, r=jyn514
Dylan-DPC Aug 30, 2020
10fb8d4
Rollup merge of #76027 - davidtwco:issue-61139-remove-obsolete-pretty…
Dylan-DPC Aug 30, 2020
264356f
Rollup merge of #76033 - camelid:patch-7, r=Dylan-DPC
Dylan-DPC Aug 30, 2020
46d66d9
Rollup merge of #76050 - matklad:pos, r=petrochenkov
Dylan-DPC Aug 30, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 14 additions & 38 deletions library/core/src/convert/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,6 @@
//! `into` themselves and `from` themselves
//!
//! See each trait for usage examples.
//!
//! [`Into`]: trait.Into.html
//! [`From`]: trait.From.html
//! [`TryFrom`]: trait.TryFrom.html
//! [`TryInto`]: trait.TryInto.html
//! [`AsRef`]: trait.AsRef.html
//! [`AsMut`]: trait.AsMut.html
#![stable(feature = "rust1", since = "1.0.0")]

Expand Down Expand Up @@ -141,13 +134,11 @@ pub const fn identity<T>(x: T) -> T {
/// want to accept all references that can be converted to [`&str`] as an argument.
/// Since both [`String`] and [`&str`] implement `AsRef<str>` we can accept both as input argument.
///
/// [`Option<T>`]: ../../std/option/enum.Option.html
/// [`Result<T, E>`]: ../../std/result/enum.Result.html
/// [`Borrow`]: ../../std/borrow/trait.Borrow.html
/// [`Hash`]: ../../std/hash/trait.Hash.html
/// [`Eq`]: ../../std/cmp/trait.Eq.html
/// [`Ord`]: ../../std/cmp/trait.Ord.html
/// [`&str`]: ../../std/primitive.str.html
/// [`Option<T>`]: Option
/// [`Result<T, E>`]: Result
/// [`Borrow`]: crate::borrow::Borrow
/// [`Eq`]: crate::cmp::Eq
/// [`Ord`]: crate::cmp::Ord
/// [`String`]: ../../std/string/struct.String.html
///
/// ```
Expand Down Expand Up @@ -177,8 +168,8 @@ pub trait AsRef<T: ?Sized> {
/// **Note: This trait must not fail**. If the conversion can fail, use a
/// dedicated method which returns an [`Option<T>`] or a [`Result<T, E>`].
///
/// [`Option<T>`]: ../../std/option/enum.Option.html
/// [`Result<T, E>`]: ../../std/result/enum.Result.html
/// [`Option<T>`]: Option
/// [`Result<T, E>`]: Result
///
/// # Generic Implementations
///
Expand Down Expand Up @@ -278,12 +269,9 @@ pub trait AsMut<T: ?Sized> {
/// is_hello(s);
/// ```
///
/// [`TryInto`]: trait.TryInto.html
/// [`Option<T>`]: ../../std/option/enum.Option.html
/// [`Result<T, E>`]: ../../std/result/enum.Result.html
/// [`Option<T>`]: Option
/// [`Result<T, E>`]: Result
/// [`String`]: ../../std/string/struct.String.html
/// [`From`]: trait.From.html
/// [`Into`]: trait.Into.html
/// [`Vec`]: ../../std/vec/struct.Vec.html
#[stable(feature = "rust1", since = "1.0.0")]
pub trait Into<T>: Sized {
Expand Down Expand Up @@ -370,12 +358,10 @@ pub trait Into<T>: Sized {
/// }
/// ```
///
/// [`TryFrom`]: trait.TryFrom.html
/// [`Option<T>`]: ../../std/option/enum.Option.html
/// [`Result<T, E>`]: ../../std/result/enum.Result.html
/// [`Option<T>`]: Option
/// [`Result<T, E>`]: Result
/// [`String`]: ../../std/string/struct.String.html
/// [`Into`]: trait.Into.html
/// [`from`]: trait.From.html#tymethod.from
/// [`from`]: From::from
/// [book]: ../../book/ch09-00-error-handling.html
#[rustc_diagnostic_item = "from_trait"]
#[stable(feature = "rust1", since = "1.0.0")]
Expand Down Expand Up @@ -404,9 +390,6 @@ pub trait From<T>: Sized {
///
/// This suffers the same restrictions and reasoning as implementing
/// [`Into`], see there for details.
///
/// [`TryFrom`]: trait.TryFrom.html
/// [`Into`]: trait.Into.html
#[stable(feature = "try_from", since = "1.34.0")]
pub trait TryInto<T>: Sized {
/// The type returned in the event of a conversion error.
Expand Down Expand Up @@ -485,11 +468,9 @@ pub trait TryInto<T>: Sized {
/// assert!(try_successful_smaller_number.is_ok());
/// ```
///
/// [`try_from`]: trait.TryFrom.html#tymethod.try_from
/// [`TryInto`]: trait.TryInto.html
/// [`i32::MAX`]: ../../std/i32/constant.MAX.html
/// [`i32::MAX`]: crate::i32::MAX
/// [`try_from`]: TryFrom::try_from
/// [`!`]: ../../std/primitive.never.html
/// [`Infallible`]: enum.Infallible.html
#[stable(feature = "try_from", since = "1.34.0")]
pub trait TryFrom<T>: Sized {
/// The type returned in the event of a conversion error.
Expand Down Expand Up @@ -676,7 +657,6 @@ impl AsRef<str> for str {
///
/// … and eventually deprecate `Infallible`.
///
///
/// However there is one case where `!` syntax can be used
/// before `!` is stabilized as a full-fledged type: in the position of a function’s return type.
/// Specifically, it is possible implementations for two different function pointer types:
Expand All @@ -692,10 +672,6 @@ impl AsRef<str> for str {
/// the two `impl`s will start to overlap
/// and therefore will be disallowed by the language’s trait coherence rules.
///
/// [`Ok`]: ../result/enum.Result.html#variant.Ok
/// [`Result`]: ../result/enum.Result.html
/// [`TryFrom`]: trait.TryFrom.html
/// [`Into`]: trait.Into.html
/// [never]: ../../std/primitive.never.html
#[stable(feature = "convert_infallible", since = "1.34.0")]
#[derive(Copy)]
Expand Down
22 changes: 10 additions & 12 deletions library/core/src/iter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@
//! below for more details.
//!
//! [`Some(Item)`]: Some
//! [`Iterator`]: trait.Iterator.html
//! [`next`]: trait.Iterator.html#tymethod.next
//! [`next`]: Iterator::next
//! [`TryIter`]: ../../std/sync/mpsc/struct.TryIter.html
//!
//! # The three forms of iteration
Expand Down Expand Up @@ -159,8 +158,7 @@
//! Let's take a look at that `for` loop again, and what the compiler converts
//! it into:
//!
//! [`IntoIterator`]: trait.IntoIterator.html
//! [`into_iter`]: trait.IntoIterator.html#tymethod.into_iter
//! [`into_iter`]: IntoIterator::into_iter
//!
//! ```
//! let values = vec![1, 2, 3, 4, 5];
Expand Down Expand Up @@ -222,9 +220,9 @@
//! across versions of Rust, so you should avoid relying on the exact values
//! returned by an iterator which panicked.
//!
//! [`map`]: trait.Iterator.html#method.map
//! [`take`]: trait.Iterator.html#method.take
//! [`filter`]: trait.Iterator.html#method.filter
//! [`map`]: Iterator::map
//! [`take`]: Iterator::take
//! [`filter`]: Iterator::filter
//!
//! # Laziness
//!
Expand Down Expand Up @@ -261,13 +259,13 @@
//! }
//! ```
//!
//! [`map`]: trait.Iterator.html#method.map
//! [`for_each`]: trait.Iterator.html#method.for_each
//! [`map`]: Iterator::map
//! [`for_each`]: Iterator::for_each
//!
//! Another common way to evaluate an iterator is to use the [`collect`]
//! method to produce a new collection.
//!
//! [`collect`]: trait.Iterator.html#method.collect
//! [`collect`]: Iterator::collect
//!
//! # Infinity
//!
Expand Down Expand Up @@ -305,8 +303,8 @@
//! println!("The smallest number one is {}.", least);
//! ```
//!
//! [`take`]: trait.Iterator.html#method.take
//! [`min`]: trait.Iterator.html#method.min
//! [`take`]: Iterator::take
//! [`min`]: Iterator::min

#![stable(feature = "rust1", since = "1.0.0")]

Expand Down