Skip to content

Commit 3e4f7fc

Browse files
committed
Don't use the old feature gate
1 parent c884357 commit 3e4f7fc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/ui/methods.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![feature(tool_lints)]
2-
#![feature(const_fn)]
2+
33

44
#![warn(clippy::all, clippy::pedantic, clippy::option_unwrap_used)]
55
#![allow(clippy::blacklisted_name, unused, clippy::print_stdout, clippy::non_ascii_literal, clippy::new_without_default,
@@ -294,15 +294,15 @@ fn or_fun_call() {
294294
A(i32),
295295
}
296296

297-
const fn make_const(i: i32) -> i32 { i }
297+
298298

299299
fn make<T>() -> T { unimplemented!(); }
300300

301301
let with_enum = Some(Enum::A(1));
302302
with_enum.unwrap_or(Enum::A(5));
303303

304-
let with_const_fn = Some(1);
305-
with_const_fn.unwrap_or(make_const(5));
304+
let with_const_fn = Some(::std::time::Duration::from_secs(1));
305+
with_const_fn.unwrap_or(::std::time::Duration::from_secs(5));
306306

307307
let with_constructor = Some(vec![1]);
308308
with_constructor.unwrap_or(make());

0 commit comments

Comments
 (0)