diff options
| author | Charles Lew <crlf0710@gmail.com> | 2021-04-06 23:49:59 +0800 |
|---|---|---|
| committer | Charles Lew <crlf0710@gmail.com> | 2021-04-07 09:56:50 +0800 |
| commit | 4752a54ad00f4e1e8307958b80d0ba8258e93f1b (patch) | |
| tree | 4ed51402a80fcc1f3bcd521706f8149672abc9a2 /src/test/ui/feature-gates | |
| parent | 5c897d430dcbec6b10a9925f7de054dbc0ad3c52 (diff) | |
| download | rust-4752a54ad00f4e1e8307958b80d0ba8258e93f1b.tar.gz rust-4752a54ad00f4e1e8307958b80d0ba8258e93f1b.zip | |
Disable using non-ascii identifiers in extern blocks.
Diffstat (limited to 'src/test/ui/feature-gates')
| -rw-r--r-- | src/test/ui/feature-gates/feature-gate-non_ascii_idents.rs | 1 | ||||
| -rw-r--r-- | src/test/ui/feature-gates/feature-gate-non_ascii_idents.stderr | 12 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/test/ui/feature-gates/feature-gate-non_ascii_idents.rs b/src/test/ui/feature-gates/feature-gate-non_ascii_idents.rs index 5cc04ad5cdf..524ad3c83fc 100644 --- a/src/test/ui/feature-gates/feature-gate-non_ascii_idents.rs +++ b/src/test/ui/feature-gates/feature-gate-non_ascii_idents.rs @@ -28,6 +28,7 @@ enum Bär { //~ ERROR non-ascii idents extern "C" { fn qüx(); //~ ERROR non-ascii idents + //~^ ERROR items in `extern` blocks } fn main() {} diff --git a/src/test/ui/feature-gates/feature-gate-non_ascii_idents.stderr b/src/test/ui/feature-gates/feature-gate-non_ascii_idents.stderr index e9392ace4ce..c712acee37f 100644 --- a/src/test/ui/feature-gates/feature-gate-non_ascii_idents.stderr +++ b/src/test/ui/feature-gates/feature-gate-non_ascii_idents.stderr @@ -1,3 +1,13 @@ +error: items in `extern` blocks cannot use non-ascii identifiers + --> $DIR/feature-gate-non_ascii_idents.rs:30:8 + | +LL | extern "C" { + | ---------- in this `extern` block +LL | fn qüx(); + | ^^^ + | + = note: This limitation may be lifted in the future; see issue #83942 <https://github.com/rust-lang/rust/issues/83942> for more information + error[E0658]: non-ascii idents are not fully supported --> $DIR/feature-gate-non_ascii_idents.rs:1:22 | @@ -115,6 +125,6 @@ LL | fn qüx(); = note: see issue #55467 <https://github.com/rust-lang/rust/issues/55467> for more information = help: add `#![feature(non_ascii_idents)]` to the crate attributes to enable -error: aborting due to 13 previous errors +error: aborting due to 14 previous errors For more information about this error, try `rustc --explain E0658`. |
