@@ -654,39 +654,6 @@ impl GatedCfg {
654
654
}
655
655
}
656
656
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
-
690
657
struct Context < ' a > {
691
658
features : & ' a Features ,
692
659
span_handler : & ' a Handler ,
@@ -809,6 +776,12 @@ pub fn emit_feature_err(diag: &Handler, feature: &str, span: Span, issue: GateIs
809
776
err. emit ( ) ;
810
777
}
811
778
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
+
812
785
pub const EXPLAIN_ASM : & ' static str =
813
786
"inline assembly is not stable enough for use and is subject to change" ;
814
787
@@ -829,6 +802,9 @@ pub const EXPLAIN_CUSTOM_DERIVE: &'static str =
829
802
pub const EXPLAIN_DERIVE_UNDERSCORE : & ' static str =
830
803
"attributes of the form `#[derive_*]` are reserved for the compiler" ;
831
804
805
+ pub const EXPLAIN_PLACEMENT_IN : & ' static str =
806
+ "placement-in expression syntax is experimental and subject to change." ;
807
+
832
808
struct PostExpansionVisitor < ' a > {
833
809
context : & ' a Context < ' a > ,
834
810
}
0 commit comments