Stabilize type-macros

Closes #27245
This commit is contained in:
Daniele Baracchi 2016-08-24 13:07:43 +02:00
parent eaf71f8d10
commit ee055a1ff3
No known key found for this signature in database
GPG key ID: 53FD0FB16BCDA5DC
14 changed files with 9 additions and 54 deletions

View file

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(type_macros)]
macro_rules! t {
() => ( String ; ); //~ ERROR macro expansion ignores token `;`
}

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(type_macros, concat_idents)]
#![feature(concat_idents)]
#[derive(Debug)] //~ NOTE in this expansion
struct Baz<T>(

View file

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(type_macros)]
// (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`

View file

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(type_macros)]
macro_rules! foo {
($a:expr) => $a; //~ ERROR macro rhs must be delimited
}

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(pub_restricted, type_macros)]
#![feature(pub_restricted)]
mod foo {
type T = ();

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(pub_restricted, type_macros)]
#![feature(pub_restricted)]
macro_rules! define_struct {
($t:ty) => {

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(pub_restricted, type_macros)]
#![feature(pub_restricted)]
macro_rules! define_struct {
($t:ty) => {

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(concat_idents, type_macros)]
#![feature(concat_idents)]
pub fn main() {
struct Foo;

View file

@ -1,22 +0,0 @@
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
macro_rules! Id {
($T:tt) => ($T);
}
struct Foo<T> {
x: Id!(T)
//~^ ERROR: type macros are experimental (see issue #27245)
}
fn main() {
let foo = Foo { x: i32 };
}

View file

@ -8,8 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(repr_simd, platform_intrinsics, concat_idents,
type_macros, test)]
#![feature(repr_simd, platform_intrinsics, concat_idents, test)]
#![allow(non_camel_case_types)]
extern crate test;

View file

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(type_macros)]
use std::ops::*;
#[derive(Copy, Clone, Debug, Eq, Ord, PartialEq, PartialOrd)]

View file

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(type_macros)]
macro_rules! Tuple {
{ $A:ty,$B:ty } => { ($A, $B) }
}