File tree Expand file tree Collapse file tree 5 files changed +24
-5
lines changed
lexical-parse-integer/src
lexical-write-integer/src Expand file tree Collapse file tree 5 files changed +24
-5
lines changed Original file line number Diff line number Diff line change @@ -653,7 +653,8 @@ impl OptionsBuilder {
653
653
///
654
654
/// # Panics
655
655
///
656
- /// If the built options are not valid.
656
+ /// If the built options are not valid. This should always
657
+ /// be used within a const context to avoid panics at runtime.
657
658
#[ inline( always) ]
658
659
pub const fn build_strict ( & self ) -> Options {
659
660
match self . build ( ) {
Original file line number Diff line number Diff line change @@ -131,7 +131,15 @@ impl OptionsBuilder {
131
131
}
132
132
}
133
133
134
- /// Build the [`Options`] struct. This can never panic.
134
+ /// Build the [`Options`] struct.
135
+ ///
136
+ /// This can never panic.
137
+ ///
138
+ /// <!-- # Panics
139
+ ///
140
+ /// If the built options are not valid. This should always
141
+ /// be used within a const context to avoid panics at runtime.
142
+ /// -->
135
143
#[ inline( always) ]
136
144
pub const fn build_strict ( & self ) -> Options {
137
145
match self . build ( ) {
Original file line number Diff line number Diff line change @@ -3277,7 +3277,8 @@ impl NumberFormatBuilder {
3277
3277
///
3278
3278
/// # Panics
3279
3279
///
3280
- /// If the built format is not valid.
3280
+ /// If the built format is not valid. This should always
3281
+ /// be used within a const context to avoid panics at runtime.
3281
3282
#[ inline( always) ]
3282
3283
pub const fn build_strict ( & self ) -> u128 {
3283
3284
use crate :: format:: format_error_impl;
Original file line number Diff line number Diff line change @@ -1014,7 +1014,8 @@ impl OptionsBuilder {
1014
1014
///
1015
1015
/// # Panics
1016
1016
///
1017
- /// If the built options are not valid.
1017
+ /// If the built options are not valid. This should always
1018
+ /// be used within a const context to avoid panics at runtime.
1018
1019
#[ inline( always) ]
1019
1020
pub const fn build_strict ( & self ) -> Options {
1020
1021
match self . build ( ) {
Original file line number Diff line number Diff line change @@ -78,7 +78,15 @@ impl OptionsBuilder {
78
78
Options { }
79
79
}
80
80
81
- /// Build the [`Options`] struct. This can never panic.
81
+ /// Build the [`Options`] struct.
82
+ ///
83
+ /// This can never panic.
84
+ ///
85
+ /// <!-- # Panics
86
+ ///
87
+ /// If the built options are not valid. This should always
88
+ /// be used within a const context to avoid panics at runtime.
89
+ /// -->
82
90
#[ inline( always) ]
83
91
pub const fn build_strict ( & self ) -> Options {
84
92
match self . build ( ) {
You can’t perform that action at this time.
0 commit comments