@@ -21,7 +21,7 @@ use rustc::mir::visit::{PlaceContext, Visitor, MutatingUseContext, NonMutatingUs
21
21
use rustc:: middle:: lang_items;
22
22
use rustc:: session:: config:: nightly_options;
23
23
use syntax:: ast:: LitKind ;
24
- use syntax:: feature_gate:: { UnstableFeatures , emit_feature_err, GateIssue } ;
24
+ use syntax:: feature_gate:: { emit_feature_err, GateIssue } ;
25
25
use syntax_pos:: { Span , DUMMY_SP } ;
26
26
27
27
use std:: fmt;
@@ -1062,32 +1062,14 @@ impl<'a, 'tcx> Visitor<'tcx> for Checker<'a, 'tcx> {
1062
1062
err. emit ( ) ;
1063
1063
}
1064
1064
} 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
- } ;
1081
1065
let mut err = struct_span_err ! (
1082
1066
self . tcx. sess,
1083
1067
self . span,
1084
1068
E0015 ,
1085
- "{}" ,
1086
- msg,
1069
+ "calls in {}s are limited to constant functions, \
1070
+ tuple structs and tuple variants",
1071
+ self . mode,
1087
1072
) ;
1088
- if let Some ( note) = note {
1089
- err. span_note ( self . span , note) ;
1090
- }
1091
1073
err. emit ( ) ;
1092
1074
}
1093
1075
}
0 commit comments