We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eaf71f8 commit ee055a1Copy full SHA for ee055a1
src/libsyntax/ext/expand.rs
@@ -491,18 +491,7 @@ fn expand_trait_item(ti: ast::TraitItem, fld: &mut MacroExpander)
491
pub fn expand_type(t: P<ast::Ty>, fld: &mut MacroExpander) -> P<ast::Ty> {
492
let t = match t.node.clone() {
493
ast::TyKind::Mac(mac) => {
494
- if fld.cx.ecfg.features.unwrap().type_macros {
495
- expand_mac_invoc(mac, None, Vec::new(), t.span, fld)
496
- } else {
497
- feature_gate::emit_feature_err(
498
- &fld.cx.parse_sess.span_diagnostic,
499
- "type_macros",
500
- t.span,
501
- feature_gate::GateIssue::Language,
502
- "type macros are experimental");
503
-
504
- DummyResult::raw_ty(t.span)
505
- }
+ expand_mac_invoc(mac, None, Vec::new(), t.span, fld)
506
}
507
_ => t
508
};
src/libsyntax/feature_gate.rs
@@ -213,9 +213,6 @@ declare_features! (
213
// Allows associated type defaults
214
(active, associated_type_defaults, "1.2.0", Some(29661)),
215
216
- // Allows macros to appear in the type position.
217
- (active, type_macros, "1.3.0", Some(27245)),
218
219
// allow `repr(simd)`, and importing the various simd intrinsics
220
(active, repr_simd, "1.4.0", Some(27731)),
221
@@ -321,6 +318,8 @@ declare_features! (
321
318
// mean anything
322
319
(accepted, test_accepted_feature, "1.0.0", None),
323
320
(accepted, tuple_indexing, "1.0.0", None),
+ // Allows macros to appear in the type position.
+ (accepted, type_macros, "1.13.0", Some(27245)),
324
(accepted, while_let, "1.0.0", None),
325
// Allows `#[deprecated]` attribute
326
(accepted, deprecated, "1.9.0", Some(29935))
src/test/compile-fail/issue-30007.rs
@@ -8,8 +8,6 @@
8
// option. This file may not be copied, modified, or distributed
9
// except according to those terms.
10
11
-#![feature(type_macros)]
12
13
macro_rules! t {
14
() => ( String ; ); //~ ERROR macro expansion ignores token `;`
15
src/test/compile-fail/issue-32950.rs
@@ -8,7 +8,7 @@
-#![feature(type_macros, concat_idents)]
+#![feature(concat_idents)]
#[derive(Debug)] //~ NOTE in this expansion
struct Baz<T>(
src/test/compile-fail/macro-context.rs
// (typeof used because it's surprisingly hard to find an unparsed token after a stmt)
macro_rules! m {
() => ( i ; typeof ); //~ ERROR expected expression, found reserved keyword `typeof`
src/test/compile-fail/macro-error.rs
macro_rules! foo {
($a:expr) => $a; //~ ERROR macro rhs must be delimited
src/test/compile-fail/privacy/restricted/tuple-struct-fields/test.rs
-#![feature(pub_restricted, type_macros)]
+#![feature(pub_restricted)]
mod foo {
type T = ();
src/test/compile-fail/privacy/restricted/tuple-struct-fields/test2.rs
macro_rules! define_struct {
($t:ty) => {
src/test/compile-fail/privacy/restricted/tuple-struct-fields/test3.rs
src/test/compile-fail/syntax-extension-minor.rs
-#![feature(concat_idents, type_macros)]
pub fn main() {
struct Foo;
0 commit comments