about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorDan Aloni <alonid@gmail.com>2018-11-19 16:32:18 +0200
committerDan Aloni <alonid@gmail.com>2018-11-21 21:31:46 +0200
commitfc284c1eee0180903fe11463dcee06e414202cf7 (patch)
tree2fe1bd7e903b7c03f05582ef34d435ca7a398f85 /src/test
parent910ec6d97ff03549c22352d7763be02b60d73470 (diff)
downloadrust-fc284c1eee0180903fe11463dcee06e414202cf7.tar.gz
rust-fc284c1eee0180903fe11463dcee06e414202cf7.zip
Stabilize macro_literal_matcher
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-pass/issues/issue-52169.rs2
-rw-r--r--src/test/run-pass/macros/macro-literal.rs2
-rw-r--r--src/test/ui/feature-gates/feature-gate-macro-literal-matcher.rs19
-rw-r--r--src/test/ui/feature-gates/feature-gate-macro-literal-matcher.stderr11
4 files changed, 2 insertions, 32 deletions
diff --git a/src/test/run-pass/issues/issue-52169.rs b/src/test/run-pass/issues/issue-52169.rs
index 19c0f51d235..9421dfc7897 100644
--- a/src/test/run-pass/issues/issue-52169.rs
+++ b/src/test/run-pass/issues/issue-52169.rs
@@ -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" };
diff --git a/src/test/run-pass/macros/macro-literal.rs b/src/test/run-pass/macros/macro-literal.rs
index ecbb47757d1..07e27d9f516 100644
--- a/src/test/run-pass/macros/macro-literal.rs
+++ b/src/test/run-pass/macros/macro-literal.rs
@@ -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) => {
diff --git a/src/test/ui/feature-gates/feature-gate-macro-literal-matcher.rs b/src/test/ui/feature-gates/feature-gate-macro-literal-matcher.rs
deleted file mode 100644
index db5cca193ab..00000000000
--- a/src/test/ui/feature-gates/feature-gate-macro-literal-matcher.rs
+++ /dev/null
@@ -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");
-}
diff --git a/src/test/ui/feature-gates/feature-gate-macro-literal-matcher.stderr b/src/test/ui/feature-gates/feature-gate-macro-literal-matcher.stderr
deleted file mode 100644
index f714b916966..00000000000
--- a/src/test/ui/feature-gates/feature-gate-macro-literal-matcher.stderr
+++ /dev/null
@@ -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`.