Skip to content

Commit a41ade7

Browse files
committed
Auto merge of #57888 - Centril:rollup, r=Centril
Rollup of 5 pull requests Successful merges: - #56217 (Add grammar in docs for {f32,f64}::from_str, mention known bug.) - #57294 (When using value after move, point at span of local) - #57652 (Update/remove some old readmes) - #57802 (Print visible name for types as well as modules.) - #57865 (Don't ICE when logging unusual types) Failed merges: r? @ghost
2 parents 278067d + a6fa7de commit a41ade7

File tree

89 files changed

+867
-1135
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+867
-1135
lines changed

src/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ For more information on how various parts of the compiler work, see the [rustc g
88
There is also useful content in the following READMEs, which are gradually being moved over to the guide:
99
- https://github.com/rust-lang/rust/tree/master/src/librustc/ty/query
1010
- https://github.com/rust-lang/rust/tree/master/src/librustc/dep_graph
11-
- https://github.com/rust-lang/rust/blob/master/src/librustc/infer/region_constraints
1211
- https://github.com/rust-lang/rust/tree/master/src/librustc/infer/higher_ranked
1312
- https://github.com/rust-lang/rust/tree/master/src/librustc/infer/lexical_region_resolve
1413

src/libcore/num/dec2flt/mod.rs

+25-1
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,35 @@ macro_rules! from_str_float_impl {
112112
/// * '2.5E10', or equivalently, '2.5e10'
113113
/// * '2.5E-10'
114114
/// * '5.'
115-
/// * '.5', or, equivalently, '0.5'
115+
/// * '.5', or, equivalently, '0.5'
116116
/// * 'inf', '-inf', 'NaN'
117117
///
118118
/// Leading and trailing whitespace represent an error.
119119
///
120+
/// # Grammar
121+
///
122+
/// All strings that adhere to the following [EBNF] grammar
123+
/// will result in an [`Ok`] being returned:
124+
///
125+
/// ```txt
126+
/// Float ::= Sign? ( 'inf' | 'NaN' | Number )
127+
/// Number ::= ( Digit+ |
128+
/// Digit+ '.' Digit* |
129+
/// Digit* '.' Digit+ ) Exp?
130+
/// Exp ::= [eE] Sign? Digit+
131+
/// Sign ::= [+-]
132+
/// Digit ::= [0-9]
133+
/// ```
134+
///
135+
/// [EBNF]: https://www.w3.org/TR/REC-xml/#sec-notation
136+
///
137+
/// # Known bugs
138+
///
139+
/// In some situations, some strings that should create a valid float
140+
/// instead return an error. See [issue #31407] for details.
141+
///
142+
/// [issue #31407]: https://github.com/rust-lang/rust/issues/31407
143+
///
120144
/// # Arguments
121145
///
122146
/// * src - A string

0 commit comments

Comments
 (0)