From 3e4f7fc4c0ac5ab3269fcad996368b9c19ec92e6 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Mon, 10 Sep 2018 15:44:41 +0200 Subject: [PATCH] Don't use the old feature gate --- tests/ui/methods.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/ui/methods.rs b/tests/ui/methods.rs index 37f4cb2f71e..7faa45b987d 100644 --- a/tests/ui/methods.rs +++ b/tests/ui/methods.rs @@ -1,5 +1,5 @@ #![feature(tool_lints)] -#![feature(const_fn)] + #![warn(clippy::all, clippy::pedantic, clippy::option_unwrap_used)] #![allow(clippy::blacklisted_name, unused, clippy::print_stdout, clippy::non_ascii_literal, clippy::new_without_default, @@ -294,15 +294,15 @@ fn or_fun_call() { A(i32), } - const fn make_const(i: i32) -> i32 { i } + fn make() -> T { unimplemented!(); } let with_enum = Some(Enum::A(1)); with_enum.unwrap_or(Enum::A(5)); - let with_const_fn = Some(1); - with_const_fn.unwrap_or(make_const(5)); + let with_const_fn = Some(::std::time::Duration::from_secs(1)); + with_const_fn.unwrap_or(::std::time::Duration::from_secs(5)); let with_constructor = Some(vec![1]); with_constructor.unwrap_or(make());