@@ -654,39 +654,6 @@ impl GatedCfg {
654654 }
655655}
656656
657- const EXPLAIN_BOX_SYNTAX : & ' static str =
658- "box expression syntax is experimental; you can call `Box::new` instead." ;
659-
660- const EXPLAIN_PLACEMENT_IN : & ' static str =
661- "placement-in expression syntax is experimental and subject to change." ;
662-
663- const EXPLAIN_PUSHPOP_UNSAFE : & ' static str =
664- "push/pop_unsafe macros are experimental and subject to change." ;
665-
666- const EXPLAIN_STMT_ATTR_SYNTAX : & ' static str =
667- "attributes on non-item statements and expressions are experimental." ;
668-
669- pub fn check_for_box_syntax ( f : Option < & Features > , diag : & Handler , span : Span ) {
670- if let Some ( & Features { box_syntax : true , .. } ) = f {
671- return ;
672- }
673- emit_feature_err ( diag, "box_syntax" , span, GateIssue :: Language , EXPLAIN_BOX_SYNTAX ) ;
674- }
675-
676- pub fn check_for_placement_in ( f : Option < & Features > , diag : & Handler , span : Span ) {
677- if let Some ( & Features { placement_in_syntax : true , .. } ) = f {
678- return ;
679- }
680- emit_feature_err ( diag, "placement_in_syntax" , span, GateIssue :: Language , EXPLAIN_PLACEMENT_IN ) ;
681- }
682-
683- pub fn check_for_pushpop_syntax ( f : Option < & Features > , diag : & Handler , span : Span ) {
684- if let Some ( & Features { pushpop_unsafe : true , .. } ) = f {
685- return ;
686- }
687- emit_feature_err ( diag, "pushpop_unsafe" , span, GateIssue :: Language , EXPLAIN_PUSHPOP_UNSAFE ) ;
688- }
689-
690657struct Context < ' a > {
691658 features : & ' a Features ,
692659 span_handler : & ' a Handler ,
@@ -809,6 +776,12 @@ pub fn emit_feature_err(diag: &Handler, feature: &str, span: Span, issue: GateIs
809776 err. emit ( ) ;
810777}
811778
779+ const EXPLAIN_BOX_SYNTAX : & ' static str =
780+ "box expression syntax is experimental; you can call `Box::new` instead." ;
781+
782+ const EXPLAIN_STMT_ATTR_SYNTAX : & ' static str =
783+ "attributes on non-item statements and expressions are experimental." ;
784+
812785pub const EXPLAIN_ASM : & ' static str =
813786 "inline assembly is not stable enough for use and is subject to change" ;
814787
@@ -829,6 +802,9 @@ pub const EXPLAIN_CUSTOM_DERIVE: &'static str =
829802pub const EXPLAIN_DERIVE_UNDERSCORE : & ' static str =
830803 "attributes of the form `#[derive_*]` are reserved for the compiler" ;
831804
805+ pub const EXPLAIN_PLACEMENT_IN : & ' static str =
806+ "placement-in expression syntax is experimental and subject to change." ;
807+
832808struct PostExpansionVisitor < ' a > {
833809 context : & ' a Context < ' a > ,
834810}
0 commit comments