@@ -21,7 +21,7 @@ use rustc::mir::visit::{PlaceContext, Visitor, MutatingUseContext, NonMutatingUs
2121use rustc:: middle:: lang_items;
2222use rustc:: session:: config:: nightly_options;
2323use syntax:: ast:: LitKind ;
24- use syntax:: feature_gate:: { UnstableFeatures , emit_feature_err, GateIssue } ;
24+ use syntax:: feature_gate:: { emit_feature_err, GateIssue } ;
2525use syntax_pos:: { Span , DUMMY_SP } ;
2626
2727use std:: fmt;
@@ -1062,32 +1062,14 @@ impl<'a, 'tcx> Visitor<'tcx> for Checker<'a, 'tcx> {
10621062 err. emit ( ) ;
10631063 }
10641064 } else {
1065- // FIXME(#57563): remove this check when const fn stabilizes.
1066- let ( msg, note) = if let UnstableFeatures :: Disallow =
1067- self . tcx . sess . opts . unstable_features {
1068- ( format ! ( "calls in {}s are limited to \
1069- tuple structs and tuple variants",
1070- self . mode) ,
1071- Some ( "a limited form of compile-time function \
1072- evaluation is available on a nightly \
1073- compiler via `const fn`") )
1074- } else {
1075- ( format ! ( "calls in {}s are limited \
1076- to constant functions, \
1077- tuple structs and tuple variants",
1078- self . mode) ,
1079- None )
1080- } ;
10811065 let mut err = struct_span_err ! (
10821066 self . tcx. sess,
10831067 self . span,
10841068 E0015 ,
1085- "{}" ,
1086- msg,
1069+ "calls in {}s are limited to constant functions, \
1070+ tuple structs and tuple variants",
1071+ self . mode,
10871072 ) ;
1088- if let Some ( note) = note {
1089- err. span_note ( self . span , note) ;
1090- }
10911073 err. emit ( ) ;
10921074 }
10931075 }
0 commit comments