Skip to content

Commit 821ff2a

Browse files
committed
Revert "Remove useless feature gating test for stable feature"
This reverts commit c4b84e9.
1 parent 5bc3c58 commit 821ff2a

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// edition: 2021
2+
// force-host
3+
#![crate_type = "proc-macro"]
4+
5+
extern crate proc_macro;
6+
7+
use proc_macro::Literal;
8+
9+
fn test() {
10+
Literal::c_string(c"a"); //~ ERROR use of unstable library feature 'c_str_literals'
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
error[E0658]: use of unstable library feature 'c_str_literals'
2+
--> $DIR/feature-gate-c_str_literals.rs:10:5
3+
|
4+
LL | Literal::c_string(c"a");
5+
| ^^^^^^^^^^^^^^^^^
6+
|
7+
= note: see issue #115268 <https://github.com/rust-lang/rust/issues/105723> for more information
8+
= help: add `#![feature(c_str_literals)]` to the crate attributes to enable
9+
10+
error: aborting due to 1 previous error
11+
12+
For more information about this error, try `rustc --explain E0658`.

0 commit comments

Comments
 (0)