Stabilize macro_literal_matcher

This commit is contained in:
Dan Aloni 2018-11-19 16:32:18 +02:00
parent 910ec6d97f
commit fc284c1eee
7 changed files with 17 additions and 73 deletions

View file

@ -9,7 +9,7 @@
// except according to those terms.
// run-pass
#![feature(macro_literal_matcher)]
#![cfg_attr(stage0, feature(macro_literal_matcher))]
macro_rules! a {
($i:literal) => { "right" };

View file

@ -9,7 +9,7 @@
// except according to those terms.
// run-pass
#![feature(macro_literal_matcher)]
#![cfg_attr(stage0, feature(macro_literal_matcher))]
macro_rules! mtester {
($l:literal) => {

View file

@ -1,19 +0,0 @@
// Copyright 2018 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.
// Test that the :lifetime macro fragment cannot be used when macro_lifetime_matcher
// feature gate is not used.
macro_rules! m { ($lt:literal) => {} }
//~^ ERROR :literal fragment specifier is experimental and subject to change
fn main() {
m!("some string literal");
}

View file

@ -1,11 +0,0 @@
error[E0658]: :literal fragment specifier is experimental and subject to change (see issue #35625)
--> $DIR/feature-gate-macro-literal-matcher.rs:14:19
|
LL | macro_rules! m { ($lt:literal) => {} }
| ^^^^^^^^^^^
|
= help: add #![feature(macro_literal_matcher)] to the crate attributes to enable
error: aborting due to previous error
For more information about this error, try `rustc --explain E0658`.