File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -137,14 +137,14 @@ fn result_unwrap_or() {
137
137
}
138
138
139
139
// don't lint in const fn
140
- const fn const_fn_unwrap_or () {
140
+ const fn const_fn_option_unwrap_or () {
141
141
match Some(1) {
142
142
Some(s) => s,
143
143
None => 0,
144
144
};
145
145
}
146
146
147
- const fn const_fn_unwrap () {
147
+ const fn const_fn_result_unwrap_or () {
148
148
match Ok::<&str, &str>("Alice") {
149
149
Ok(s) => s,
150
150
Err(_) => "Bob",
Original file line number Diff line number Diff line change @@ -176,14 +176,14 @@ fn result_unwrap_or() {
176
176
}
177
177
178
178
// don't lint in const fn
179
- const fn const_fn_unwrap_or ( ) {
179
+ const fn const_fn_option_unwrap_or ( ) {
180
180
match Some ( 1 ) {
181
181
Some ( s) => s,
182
182
None => 0 ,
183
183
} ;
184
184
}
185
185
186
- const fn const_fn_unwrap ( ) {
186
+ const fn const_fn_result_unwrap_or ( ) {
187
187
match Ok :: < & str , & str > ( "Alice" ) {
188
188
Ok ( s) => s,
189
189
Err ( _) => "Bob" ,
You can’t perform that action at this time.
0 commit comments