Skip to content

Commit 51af7da

Browse files
committed
Auto merge of rust-lang#94860 - Dylan-DPC:rollup-n06j8h6, r=Dylan-DPC
Rollup of 7 pull requests Successful merges: - rust-lang#87618 (Add missing documentation for std::char types) - rust-lang#94769 (Collapse blanket and auto-trait impls by default) - rust-lang#94798 (`parse_tt` refactorings) - rust-lang#94818 (Rename `IntoFuture::Future` to `IntoFuture::IntoFuture`) - rust-lang#94827 (CTFE/Miri: detect out-of-bounds pointers in offset_from) - rust-lang#94838 (Make float parsing docs more comprehensive) - rust-lang#94839 (Suggest using double colon when a struct field type include single colon) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 4029b55 + 274c0e9 commit 51af7da

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

core/src/char/convert.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ impl const From<u8> for char {
218218
}
219219

220220
/// An error which can be returned when parsing a char.
221+
///
222+
/// This `struct` is created when using the [`char::from_str`] method.
221223
#[stable(feature = "char_from_str", since = "1.20.0")]
222224
#[derive(Clone, Debug, PartialEq, Eq)]
223225
pub struct ParseCharError {
@@ -300,7 +302,10 @@ impl TryFrom<u32> for char {
300302
}
301303
}
302304

303-
/// The error type returned when a conversion from u32 to char fails.
305+
/// The error type returned when a conversion from [`prim@u32`] to [`prim@char`] fails.
306+
///
307+
/// This `struct` is created by the [`char::try_from<u32>`](char#impl-TryFrom<u32>) method.
308+
/// See its documentation for more.
304309
#[stable(feature = "try_from", since = "1.34.0")]
305310
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
306311
pub struct CharTryFromError(());

core/src/future/into_future.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@ pub trait IntoFuture {
99

1010
/// Which kind of future are we turning this into?
1111
#[unstable(feature = "into_future", issue = "67644")]
12-
type Future: Future<Output = Self::Output>;
12+
type IntoFuture: Future<Output = Self::Output>;
1313

1414
/// Creates a future from a value.
1515
#[unstable(feature = "into_future", issue = "67644")]
1616
#[lang = "into_future"]
17-
fn into_future(self) -> Self::Future;
17+
fn into_future(self) -> Self::IntoFuture;
1818
}
1919

2020
#[unstable(feature = "into_future", issue = "67644")]
2121
impl<F: Future> IntoFuture for F {
2222
type Output = F::Output;
23-
type Future = F;
23+
type IntoFuture = F;
2424

25-
fn into_future(self) -> Self::Future {
25+
fn into_future(self) -> Self::IntoFuture {
2626
self
2727
}
2828
}

core/src/num/dec2flt/mod.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,21 +112,24 @@ macro_rules! from_str_float_impl {
112112
/// * '2.5E-10'
113113
/// * '5.'
114114
/// * '.5', or, equivalently, '0.5'
115-
/// * 'inf', '-inf', 'NaN'
115+
/// * 'inf', '-inf', '+infinity', 'NaN'
116+
///
117+
/// Note that alphabetical characters are not case-sensitive.
116118
///
117119
/// Leading and trailing whitespace represent an error.
118120
///
119121
/// # Grammar
120122
///
121-
/// All strings that adhere to the following [EBNF] grammar
122-
/// will result in an [`Ok`] being returned:
123+
/// All strings that adhere to the following [EBNF] grammar when
124+
/// lowercased will result in an [`Ok`] being returned:
123125
///
124126
/// ```txt
125-
/// Float ::= Sign? ( 'inf' | 'NaN' | Number )
127+
/// Float ::= Sign? ( 'inf' | 'infinity' | 'nan' | Number )
126128
/// Number ::= ( Digit+ |
129+
/// '.' Digit* |
127130
/// Digit+ '.' Digit* |
128131
/// Digit* '.' Digit+ ) Exp?
129-
/// Exp ::= [eE] Sign? Digit+
132+
/// Exp ::= 'e' Sign? Digit+
130133
/// Sign ::= [+-]
131134
/// Digit ::= [0-9]
132135
/// ```

0 commit comments

Comments
 (0)