diff --git a/compiler/rustc_ast_passes/src/feature_gate.rs b/compiler/rustc_ast_passes/src/feature_gate.rs index f6b18bdea51ab..c803c8a83b15c 100644 --- a/compiler/rustc_ast_passes/src/feature_gate.rs +++ b/compiler/rustc_ast_passes/src/feature_gate.rs @@ -8,7 +8,7 @@ use rustc_feature::{Features, GateIssue}; use rustc_session::parse::{feature_err, feature_err_issue}; use rustc_session::Session; use rustc_span::source_map::Spanned; -use rustc_span::symbol::{sym, Symbol}; +use rustc_span::symbol::sym; use rustc_span::Span; use tracing::debug; @@ -328,17 +328,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { } } - fn visit_name(&mut self, sp: Span, name: Symbol) { - if !name.as_str().is_ascii() { - gate_feature_post!( - &self, - non_ascii_idents, - self.sess.parse_sess.source_map().guess_head_span(sp), - "non-ascii idents are not fully supported" - ); - } - } - fn visit_item(&mut self, i: &'a ast::Item) { match i.kind { ast::ItemKind::ForeignMod(ref foreign_module) => { diff --git a/compiler/rustc_error_codes/src/error_codes/E0554.md b/compiler/rustc_error_codes/src/error_codes/E0554.md index e55fa4c6ede8b..3178bf21919e8 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0554.md +++ b/compiler/rustc_error_codes/src/error_codes/E0554.md @@ -4,8 +4,8 @@ beta compilers will not comply. Erroneous code example: ```ignore (depends on release channel) -#![feature(non_ascii_idents)] // error: `#![feature]` may not be used on the - // stable release channel +#![feature(lang_items)] // error: `#![feature]` may not be used on the + // stable release channel ``` If you need the feature, make sure to use a nightly release of the compiler diff --git a/compiler/rustc_error_codes/src/error_codes/E0754.md b/compiler/rustc_error_codes/src/error_codes/E0754.md index 9f4b19cfda6b4..acddb69aaba56 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0754.md +++ b/compiler/rustc_error_codes/src/error_codes/E0754.md @@ -3,7 +3,6 @@ A non-ASCII identifier was used in an invalid context. Erroneous code examples: ```compile_fail,E0754 -# #![feature(non_ascii_idents)] mod řųśť; // error! @@ -17,8 +16,6 @@ Non-ASCII can be used as module names if it is inlined or if a `#[path]` attribute is specified. For example: ``` -# #![feature(non_ascii_idents)] - mod řųśť { // ok! const IS_GREAT: bool = true; } diff --git a/compiler/rustc_feature/src/accepted.rs b/compiler/rustc_feature/src/accepted.rs index f006351647e40..e8642a52749c4 100644 --- a/compiler/rustc_feature/src/accepted.rs +++ b/compiler/rustc_feature/src/accepted.rs @@ -279,6 +279,8 @@ declare_features! ( (accepted, unsafe_block_in_unsafe_fn, "1.52.0", Some(71668), None), /// Allows the use of or-patterns (e.g., `0 | 1`). (accepted, or_patterns, "1.53.0", Some(54883), None), + /// Allows defining identifiers beyond ASCII. + (accepted, non_ascii_idents, "1.53.0", Some(55467), None), // ------------------------------------------------------------------------- // feature-group-end: accepted features diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs index 6fd1af60fe2d8..a410826d3fda6 100644 --- a/compiler/rustc_feature/src/active.rs +++ b/compiler/rustc_feature/src/active.rs @@ -255,9 +255,6 @@ declare_features! ( // feature-group-start: actual feature gates // ------------------------------------------------------------------------- - /// Allows defining identifiers beyond ASCII. - (active, non_ascii_idents, "1.0.0", Some(55467), None), - /// Allows using `#[plugin_registrar]` on functions. (active, plugin_registrar, "1.0.0", Some(29597), None), diff --git a/compiler/rustc_lint/src/non_ascii_idents.rs b/compiler/rustc_lint/src/non_ascii_idents.rs index a1c7e47e749ad..301e607fc58ad 100644 --- a/compiler/rustc_lint/src/non_ascii_idents.rs +++ b/compiler/rustc_lint/src/non_ascii_idents.rs @@ -10,7 +10,6 @@ declare_lint! { /// /// ```rust,compile_fail /// # #![allow(unused)] - /// #![feature(non_ascii_idents)] /// #![deny(non_ascii_idents)] /// fn main() { /// let föö = 1; @@ -21,14 +20,11 @@ declare_lint! { /// /// ### Explanation /// - /// Currently on stable Rust, identifiers must contain ASCII characters. - /// The [`non_ascii_idents`] nightly-only feature allows identifiers to - /// contain non-ASCII characters. This lint allows projects that wish to - /// retain the limit of only using ASCII characters to switch this lint to - /// "forbid" (for example to ease collaboration or for security reasons). + /// This lint allows projects that wish to retain the limit of only using + /// ASCII characters to switch this lint to "forbid" (for example to ease + /// collaboration or for security reasons). /// See [RFC 2457] for more details. /// - /// [`non_ascii_idents`]: https://doc.rust-lang.org/nightly/unstable-book/language-features/non-ascii-idents.html /// [RFC 2457]: https://github.com/rust-lang/rfcs/blob/master/text/2457-non-ascii-idents.md pub NON_ASCII_IDENTS, Allow, @@ -44,7 +40,6 @@ declare_lint! { /// /// ```rust /// # #![allow(unused)] - /// #![feature(non_ascii_idents)] /// const µ: f64 = 0.000001; /// ``` /// @@ -52,10 +47,8 @@ declare_lint! { /// /// ### Explanation /// - /// With the [`non_ascii_idents`] nightly-only feature enabled, - /// identifiers are allowed to use non-ASCII characters. This lint warns - /// about using characters which are not commonly used, and may cause - /// visual confusion. + /// This lint warns about using characters which are not commonly used, and may + /// cause visual confusion. /// /// This lint is triggered by identifiers that contain a codepoint that is /// not part of the set of "Allowed" codepoints as described by [Unicode® @@ -66,7 +59,6 @@ declare_lint! { /// that if you "forbid" this lint that existing code may fail in the /// future. /// - /// [`non_ascii_idents`]: https://doc.rust-lang.org/nightly/unstable-book/language-features/non-ascii-idents.html /// [TR39Allowed]: https://www.unicode.org/reports/tr39/#General_Security_Profile pub UNCOMMON_CODEPOINTS, Warn, @@ -81,8 +73,6 @@ declare_lint! { /// ### Example /// /// ```rust - /// #![feature(non_ascii_idents)] - /// /// // Latin Capital Letter E With Caron /// pub const Ě: i32 = 1; /// // Latin Capital Letter E With Breve @@ -93,10 +83,8 @@ declare_lint! { /// /// ### Explanation /// - /// With the [`non_ascii_idents`] nightly-only feature enabled, - /// identifiers are allowed to use non-ASCII characters. This lint warns - /// when different identifiers may appear visually similar, which can - /// cause confusion. + /// This lint warns when different identifiers may appear visually similar, + /// which can cause confusion. /// /// The confusable detection algorithm is based on [Unicode® Technical /// Standard #39 Unicode Security Mechanisms Section 4 Confusable @@ -110,7 +98,6 @@ declare_lint! { /// Beware that if you "forbid" this lint that existing code may fail in /// the future. /// - /// [`non_ascii_idents`]: https://doc.rust-lang.org/nightly/unstable-book/language-features/non-ascii-idents.html /// [TR39Confusable]: https://www.unicode.org/reports/tr39/#Confusable_Detection pub CONFUSABLE_IDENTS, Warn, @@ -127,8 +114,6 @@ declare_lint! { /// ### Example /// /// ```rust - /// #![feature(non_ascii_idents)] - /// /// // The Japanese katakana character エ can be confused with the Han character 工. /// const エ: &'static str = "アイウ"; /// ``` @@ -137,10 +122,8 @@ declare_lint! { /// /// ### Explanation /// - /// With the [`non_ascii_idents`] nightly-only feature enabled, - /// identifiers are allowed to use non-ASCII characters. This lint warns - /// when characters between different scripts may appear visually similar, - /// which can cause confusion. + /// This lint warns when characters between different scripts may appear + /// visually similar, which can cause confusion. /// /// If the crate contains other identifiers in the same script that have /// non-confusable characters, then this lint will *not* be issued. For @@ -152,8 +135,6 @@ declare_lint! { /// Note that the set of confusable characters may change over time. /// Beware that if you "forbid" this lint that existing code may fail in /// the future. - /// - /// [`non_ascii_idents`]: https://doc.rust-lang.org/nightly/unstable-book/language-features/non-ascii-idents.html pub MIXED_SCRIPT_CONFUSABLES, Warn, "detects Unicode scripts whose mixed script confusables codepoints are solely used", diff --git a/src/doc/unstable-book/src/language-features/non-ascii-idents.md b/src/doc/unstable-book/src/language-features/non-ascii-idents.md deleted file mode 100644 index 847f25ecab132..0000000000000 --- a/src/doc/unstable-book/src/language-features/non-ascii-idents.md +++ /dev/null @@ -1,48 +0,0 @@ -# `non_ascii_idents` - -The tracking issue for this feature is: [#55467] - -[#55467]: https://github.com/rust-lang/rust/issues/55467 - ------------------------- - -The `non_ascii_idents` feature adds support for non-ASCII identifiers. - -## Examples - -```rust -#![feature(non_ascii_idents)] - -const ε: f64 = 0.00001f64; -const Π: f64 = 3.14f64; -``` - -## Changes to the language reference - -> **Lexer:**\ -> IDENTIFIER :\ ->       XID_start XID_continue\*\ ->    | `_` XID_continue+ - -An identifier is any nonempty Unicode string of the following form: - -Either - - * The first character has property [`XID_start`] - * The remaining characters have property [`XID_continue`] - -Or - - * The first character is `_` - * The identifier is more than one character, `_` alone is not an identifier - * The remaining characters have property [`XID_continue`] - -that does _not_ occur in the set of [strict keywords]. - -> **Note**: [`XID_start`] and [`XID_continue`] as character properties cover the -> character ranges used to form the more familiar C and Java language-family -> identifiers. - -[`XID_start`]: http://unicode.org/cldr/utility/list-unicodeset.jsp?a=%5B%3AXID_Start%3A%5D&abb=on&g=&i= -[`XID_continue`]: http://unicode.org/cldr/utility/list-unicodeset.jsp?a=%5B%3AXID_Continue%3A%5D&abb=on&g=&i= -[strict keywords]: ../../reference/keywords.md#strict-keywords diff --git a/src/test/debuginfo/multi-byte-chars.rs b/src/test/debuginfo/multi-byte-chars.rs index 5382dd1a3234b..5c68a88f2fb1b 100644 --- a/src/test/debuginfo/multi-byte-chars.rs +++ b/src/test/debuginfo/multi-byte-chars.rs @@ -2,8 +2,6 @@ // compile-flags:-g -#![feature(non_ascii_idents)] - // This test checks whether debuginfo generation can handle multi-byte UTF-8 // characters at the end of a block. There's no need to do anything in the // debugger -- just make sure that the compiler doesn't crash. diff --git a/src/test/ui/codemap_tests/unicode_2.rs b/src/test/ui/codemap_tests/unicode_2.rs index fa69115b2daaf..3301e7a18d11a 100644 --- a/src/test/ui/codemap_tests/unicode_2.rs +++ b/src/test/ui/codemap_tests/unicode_2.rs @@ -1,5 +1,3 @@ -#![feature(non_ascii_idents)] - fn main() { let _ = ("a̐éö̲", 0u7); //~ ERROR invalid width let _ = ("아あ", 1i42); //~ ERROR invalid width diff --git a/src/test/ui/codemap_tests/unicode_2.stderr b/src/test/ui/codemap_tests/unicode_2.stderr index c01942712d4f3..a776a4a1e7e13 100644 --- a/src/test/ui/codemap_tests/unicode_2.stderr +++ b/src/test/ui/codemap_tests/unicode_2.stderr @@ -1,5 +1,5 @@ error: invalid width `7` for integer literal - --> $DIR/unicode_2.rs:4:25 + --> $DIR/unicode_2.rs:2:25 | LL | let _ = ("a̐éö̲", 0u7); | ^^^ @@ -7,7 +7,7 @@ LL | let _ = ("a̐éö̲", 0u7); = help: valid widths are 8, 16, 32, 64 and 128 error: invalid width `42` for integer literal - --> $DIR/unicode_2.rs:5:20 + --> $DIR/unicode_2.rs:3:20 | LL | let _ = ("아あ", 1i42); | ^^^^ @@ -15,7 +15,7 @@ LL | let _ = ("아あ", 1i42); = help: valid widths are 8, 16, 32, 64 and 128 error[E0425]: cannot find value `a̐é` in this scope - --> $DIR/unicode_2.rs:6:13 + --> $DIR/unicode_2.rs:4:13 | LL | let _ = a̐é; | ^^ not found in this scope 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 deleted file mode 100644 index 524ad3c83fcbc..0000000000000 --- a/src/test/ui/feature-gates/feature-gate-non_ascii_idents.rs +++ /dev/null @@ -1,34 +0,0 @@ -extern crate core as bäz; //~ ERROR non-ascii idents - -use föö::bar; //~ ERROR non-ascii idents - -mod föö { //~ ERROR non-ascii idents - pub fn bar() {} -} - -fn bär( //~ ERROR non-ascii idents - bäz: isize //~ ERROR non-ascii idents - ) { - let _ö: isize; //~ ERROR non-ascii idents - - match (1, 2) { - (_ä, _) => {} //~ ERROR non-ascii idents - } -} - -struct Föö { //~ ERROR non-ascii idents - föö: isize //~ ERROR non-ascii idents -} - -enum Bär { //~ ERROR non-ascii idents - Bäz { //~ ERROR non-ascii idents - qüx: isize //~ 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 deleted file mode 100644 index c712acee37f94..0000000000000 --- a/src/test/ui/feature-gates/feature-gate-non_ascii_idents.stderr +++ /dev/null @@ -1,130 +0,0 @@ -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 for more information - -error[E0658]: non-ascii idents are not fully supported - --> $DIR/feature-gate-non_ascii_idents.rs:1:22 - | -LL | extern crate core as bäz; - | ^^^ - | - = note: see issue #55467 for more information - = help: add `#![feature(non_ascii_idents)]` to the crate attributes to enable - -error[E0658]: non-ascii idents are not fully supported - --> $DIR/feature-gate-non_ascii_idents.rs:3:5 - | -LL | use föö::bar; - | ^^^ - | - = note: see issue #55467 for more information - = help: add `#![feature(non_ascii_idents)]` to the crate attributes to enable - -error[E0658]: non-ascii idents are not fully supported - --> $DIR/feature-gate-non_ascii_idents.rs:5:5 - | -LL | mod föö { - | ^^^ - | - = note: see issue #55467 for more information - = help: add `#![feature(non_ascii_idents)]` to the crate attributes to enable - -error[E0658]: non-ascii idents are not fully supported - --> $DIR/feature-gate-non_ascii_idents.rs:9:4 - | -LL | fn bär( - | ^^^ - | - = note: see issue #55467 for more information - = help: add `#![feature(non_ascii_idents)]` to the crate attributes to enable - -error[E0658]: non-ascii idents are not fully supported - --> $DIR/feature-gate-non_ascii_idents.rs:10:5 - | -LL | bäz: isize - | ^^^ - | - = note: see issue #55467 for more information - = help: add `#![feature(non_ascii_idents)]` to the crate attributes to enable - -error[E0658]: non-ascii idents are not fully supported - --> $DIR/feature-gate-non_ascii_idents.rs:12:9 - | -LL | let _ö: isize; - | ^^ - | - = note: see issue #55467 for more information - = help: add `#![feature(non_ascii_idents)]` to the crate attributes to enable - -error[E0658]: non-ascii idents are not fully supported - --> $DIR/feature-gate-non_ascii_idents.rs:15:10 - | -LL | (_ä, _) => {} - | ^^ - | - = note: see issue #55467 for more information - = help: add `#![feature(non_ascii_idents)]` to the crate attributes to enable - -error[E0658]: non-ascii idents are not fully supported - --> $DIR/feature-gate-non_ascii_idents.rs:19:8 - | -LL | struct Föö { - | ^^^ - | - = note: see issue #55467 for more information - = help: add `#![feature(non_ascii_idents)]` to the crate attributes to enable - -error[E0658]: non-ascii idents are not fully supported - --> $DIR/feature-gate-non_ascii_idents.rs:20:5 - | -LL | föö: isize - | ^^^ - | - = note: see issue #55467 for more information - = help: add `#![feature(non_ascii_idents)]` to the crate attributes to enable - -error[E0658]: non-ascii idents are not fully supported - --> $DIR/feature-gate-non_ascii_idents.rs:23:6 - | -LL | enum Bär { - | ^^^ - | - = note: see issue #55467 for more information - = help: add `#![feature(non_ascii_idents)]` to the crate attributes to enable - -error[E0658]: non-ascii idents are not fully supported - --> $DIR/feature-gate-non_ascii_idents.rs:24:5 - | -LL | Bäz { - | ^^^ - | - = note: see issue #55467 for more information - = help: add `#![feature(non_ascii_idents)]` to the crate attributes to enable - -error[E0658]: non-ascii idents are not fully supported - --> $DIR/feature-gate-non_ascii_idents.rs:25:9 - | -LL | qüx: isize - | ^^^ - | - = note: see issue #55467 for more information - = help: add `#![feature(non_ascii_idents)]` to the crate attributes to enable - -error[E0658]: non-ascii idents are not fully supported - --> $DIR/feature-gate-non_ascii_idents.rs:30:8 - | -LL | fn qüx(); - | ^^^ - | - = note: see issue #55467 for more information - = help: add `#![feature(non_ascii_idents)]` to the crate attributes to enable - -error: aborting due to 14 previous errors - -For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/imports/local-modularized-tricky-fail-2.rs b/src/test/ui/imports/local-modularized-tricky-fail-2.rs index e637edadb0074..386de88bc3d62 100644 --- a/src/test/ui/imports/local-modularized-tricky-fail-2.rs +++ b/src/test/ui/imports/local-modularized-tricky-fail-2.rs @@ -1,48 +1,22 @@ -// `#[macro_export] macro_rules` that doesn't originate from macro expansions can be placed -// into the root module soon enough to act as usual items and shadow globs and preludes. +// Crate-local macro expanded `macro_export` macros cannot be accessed with module-relative paths. -#![feature(decl_macro)] - -// `macro_export` shadows globs -use inner1::*; - -mod inner1 { - pub macro exported() {} -} - -exported!(); - -mod deep { - fn deep() { - type Deeper = [u8; { - #[macro_export] - macro_rules! exported { - () => ( struct Б; ) //~ ERROR non-ascii idents are not fully supported - } - - 0 - }]; +macro_rules! define_exported { () => { + #[macro_export] + macro_rules! exported { + () => () } -} +}} -// `macro_export` shadows std prelude -fn main() { - panic!(); -} +define_exported!(); -mod inner3 { - #[macro_export] - macro_rules! panic { - () => ( struct Г; ) //~ ERROR non-ascii idents are not fully supported - } +mod m { + use exported; + //~^ ERROR macro-expanded `macro_export` macros from the current crate cannot + //~| WARN this was previously accepted } -// `macro_export` shadows builtin macros -include!(); - -mod inner4 { - #[macro_export] - macro_rules! include { - () => ( struct Д; ) //~ ERROR non-ascii idents are not fully supported - } +fn main() { + ::exported!(); + //~^ ERROR macro-expanded `macro_export` macros from the current crate cannot + //~| WARN this was previously accepted } diff --git a/src/test/ui/imports/local-modularized-tricky-fail-2.stderr b/src/test/ui/imports/local-modularized-tricky-fail-2.stderr index 714c04add5f79..5cc6fa1e40a88 100644 --- a/src/test/ui/imports/local-modularized-tricky-fail-2.stderr +++ b/src/test/ui/imports/local-modularized-tricky-fail-2.stderr @@ -1,42 +1,43 @@ -error[E0658]: non-ascii idents are not fully supported - --> $DIR/local-modularized-tricky-fail-2.rs:20:32 +error: macro-expanded `macro_export` macros from the current crate cannot be referred to by absolute paths + --> $DIR/local-modularized-tricky-fail-2.rs:13:9 | -LL | exported!(); - | ------------ in this macro invocation -... -LL | () => ( struct Б; ) - | ^ +LL | use exported; + | ^^^^^^^^ | - = note: see issue #55467 for more information - = help: add `#![feature(non_ascii_idents)]` to the crate attributes to enable - = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0658]: non-ascii idents are not fully supported - --> $DIR/local-modularized-tricky-fail-2.rs:36:24 + = note: `#[deny(macro_expanded_macro_exports_accessed_by_absolute_paths)]` on by default + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = note: for more information, see issue #52234 +note: the macro is defined here + --> $DIR/local-modularized-tricky-fail-2.rs:5:5 | -LL | panic!(); - | --------- in this macro invocation +LL | / macro_rules! exported { +LL | | () => () +LL | | } + | |_____^ ... -LL | () => ( struct Г; ) - | ^ - | - = note: see issue #55467 for more information - = help: add `#![feature(non_ascii_idents)]` to the crate attributes to enable +LL | define_exported!(); + | ------------------- in this macro invocation = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0658]: non-ascii idents are not fully supported - --> $DIR/local-modularized-tricky-fail-2.rs:46:24 +error: macro-expanded `macro_export` macros from the current crate cannot be referred to by absolute paths + --> $DIR/local-modularized-tricky-fail-2.rs:19:5 | -LL | include!(); - | ----------- in this macro invocation -... -LL | () => ( struct Д; ) - | ^ +LL | ::exported!(); + | ^^^^^^^^^^ + | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = note: for more information, see issue #52234 +note: the macro is defined here + --> $DIR/local-modularized-tricky-fail-2.rs:5:5 | - = note: see issue #55467 for more information - = help: add `#![feature(non_ascii_idents)]` to the crate attributes to enable +LL | / macro_rules! exported { +LL | | () => () +LL | | } + | |_____^ +... +LL | define_exported!(); + | ------------------- in this macro invocation = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error: aborting due to 3 previous errors +error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/imports/local-modularized-tricky-fail-3.rs b/src/test/ui/imports/local-modularized-tricky-fail-3.rs deleted file mode 100644 index 386de88bc3d62..0000000000000 --- a/src/test/ui/imports/local-modularized-tricky-fail-3.rs +++ /dev/null @@ -1,22 +0,0 @@ -// Crate-local macro expanded `macro_export` macros cannot be accessed with module-relative paths. - -macro_rules! define_exported { () => { - #[macro_export] - macro_rules! exported { - () => () - } -}} - -define_exported!(); - -mod m { - use exported; - //~^ ERROR macro-expanded `macro_export` macros from the current crate cannot - //~| WARN this was previously accepted -} - -fn main() { - ::exported!(); - //~^ ERROR macro-expanded `macro_export` macros from the current crate cannot - //~| WARN this was previously accepted -} diff --git a/src/test/ui/imports/local-modularized-tricky-fail-3.stderr b/src/test/ui/imports/local-modularized-tricky-fail-3.stderr deleted file mode 100644 index 4494a88a5cf95..0000000000000 --- a/src/test/ui/imports/local-modularized-tricky-fail-3.stderr +++ /dev/null @@ -1,43 +0,0 @@ -error: macro-expanded `macro_export` macros from the current crate cannot be referred to by absolute paths - --> $DIR/local-modularized-tricky-fail-3.rs:13:9 - | -LL | use exported; - | ^^^^^^^^ - | - = note: `#[deny(macro_expanded_macro_exports_accessed_by_absolute_paths)]` on by default - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #52234 -note: the macro is defined here - --> $DIR/local-modularized-tricky-fail-3.rs:5:5 - | -LL | / macro_rules! exported { -LL | | () => () -LL | | } - | |_____^ -... -LL | define_exported!(); - | ------------------- in this macro invocation - = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) - -error: macro-expanded `macro_export` macros from the current crate cannot be referred to by absolute paths - --> $DIR/local-modularized-tricky-fail-3.rs:19:5 - | -LL | ::exported!(); - | ^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #52234 -note: the macro is defined here - --> $DIR/local-modularized-tricky-fail-3.rs:5:5 - | -LL | / macro_rules! exported { -LL | | () => () -LL | | } - | |_____^ -... -LL | define_exported!(); - | ------------------- in this macro invocation - = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) - -error: aborting due to 2 previous errors - diff --git a/src/test/ui/imports/local-modularized-tricky-pass.rs b/src/test/ui/imports/local-modularized-tricky-pass-1.rs similarity index 100% rename from src/test/ui/imports/local-modularized-tricky-pass.rs rename to src/test/ui/imports/local-modularized-tricky-pass-1.rs diff --git a/src/test/ui/imports/local-modularized-tricky-pass-2.rs b/src/test/ui/imports/local-modularized-tricky-pass-2.rs new file mode 100644 index 0000000000000..d5efbdf78af0f --- /dev/null +++ b/src/test/ui/imports/local-modularized-tricky-pass-2.rs @@ -0,0 +1,50 @@ +// check-pass +// +// `#[macro_export] macro_rules` that doesn't originate from macro expansions can be placed +// into the root module soon enough to act as usual items and shadow globs and preludes. + +#![feature(decl_macro)] + +// `macro_export` shadows globs +use inner1::*; + +mod inner1 { + pub macro exported() {} +} + +exported!(); + +mod deep { + fn deep() { + type Deeper = [u8; { + #[macro_export] + macro_rules! exported { + () => ( struct Б; ) + } + + 0 + }]; + } +} + +// `macro_export` shadows std prelude +fn main() { + panic!(); +} + +mod inner3 { + #[macro_export] + macro_rules! panic { + () => ( struct Г; ) + } +} + +// `macro_export` shadows builtin macros +include!(); + +mod inner4 { + #[macro_export] + macro_rules! include { + () => ( struct Д; ) + } +} diff --git a/src/test/ui/issues/issue-44023.rs b/src/test/ui/issues/issue-44023.rs index 4c38ddfcdf189..e4320b7dac592 100644 --- a/src/test/ui/issues/issue-44023.rs +++ b/src/test/ui/issues/issue-44023.rs @@ -1,5 +1,3 @@ -#![feature(non_ascii_idents)] - pub fn main () {} fn საჭმელად_გემრიელი_სადილი ( ) -> isize { //~ ERROR mismatched types diff --git a/src/test/ui/issues/issue-44023.stderr b/src/test/ui/issues/issue-44023.stderr index fc54e7c62bb24..9e97012416a94 100644 --- a/src/test/ui/issues/issue-44023.stderr +++ b/src/test/ui/issues/issue-44023.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-44023.rs:5:36 + --> $DIR/issue-44023.rs:3:36 | LL | fn საჭმელად_გემრიელი_სადილი ( ) -> isize { | ------------------------ ^^^^^ expected `isize`, found `()` diff --git a/src/test/ui/lint/lint-non-snake-case-no-lowercase-equivalent.rs b/src/test/ui/lint/lint-non-snake-case-no-lowercase-equivalent.rs index 710eebe4b6525..9f0c87dcaa61c 100644 --- a/src/test/ui/lint/lint-non-snake-case-no-lowercase-equivalent.rs +++ b/src/test/ui/lint/lint-non-snake-case-no-lowercase-equivalent.rs @@ -3,7 +3,6 @@ #![allow(dead_code)] // pretty-expanded FIXME #23616 -#![feature(non_ascii_idents)] #![deny(non_snake_case)] // This name is neither upper nor lower case diff --git a/src/test/ui/lint/lint-nonstandard-style-unicode-1.rs b/src/test/ui/lint/lint-nonstandard-style-unicode-1.rs index 034499145b780..527d0ea943285 100644 --- a/src/test/ui/lint/lint-nonstandard-style-unicode-1.rs +++ b/src/test/ui/lint/lint-nonstandard-style-unicode-1.rs @@ -1,7 +1,6 @@ #![allow(dead_code)] #![forbid(non_camel_case_types)] -#![feature(non_ascii_idents)] // Some scripts (e.g., hiragana) don't have a concept of // upper/lowercase diff --git a/src/test/ui/lint/lint-nonstandard-style-unicode-1.stderr b/src/test/ui/lint/lint-nonstandard-style-unicode-1.stderr index 371002656591c..6c2aa225e602e 100644 --- a/src/test/ui/lint/lint-nonstandard-style-unicode-1.stderr +++ b/src/test/ui/lint/lint-nonstandard-style-unicode-1.stderr @@ -1,5 +1,5 @@ error: type `χa` should have an upper camel case name - --> $DIR/lint-nonstandard-style-unicode-1.rs:15:8 + --> $DIR/lint-nonstandard-style-unicode-1.rs:14:8 | LL | struct χa; | ^^ help: convert the identifier to upper camel case: `Χa` @@ -11,37 +11,37 @@ LL | #![forbid(non_camel_case_types)] | ^^^^^^^^^^^^^^^^^^^^ error: type `__χa` should have an upper camel case name - --> $DIR/lint-nonstandard-style-unicode-1.rs:23:8 + --> $DIR/lint-nonstandard-style-unicode-1.rs:22:8 | LL | struct __χa; | ^^^^ help: convert the identifier to upper camel case: `Χa` error: type `对__否` should have an upper camel case name - --> $DIR/lint-nonstandard-style-unicode-1.rs:28:8 + --> $DIR/lint-nonstandard-style-unicode-1.rs:27:8 | LL | struct 对__否; | ^^^^^^ help: convert the identifier to upper camel case: `对_否` error: type `ヒ__χ` should have an upper camel case name - --> $DIR/lint-nonstandard-style-unicode-1.rs:31:8 + --> $DIR/lint-nonstandard-style-unicode-1.rs:30:8 | LL | struct ヒ__χ; | ^^^^^ help: convert the identifier to upper camel case: `ヒΧ` error: type `Hello_你好` should have an upper camel case name - --> $DIR/lint-nonstandard-style-unicode-1.rs:37:8 + --> $DIR/lint-nonstandard-style-unicode-1.rs:36:8 | LL | struct Hello_你好; | ^^^^^^^^^^ help: convert the identifier to upper camel case: `Hello你好` error: type `Hello_World` should have an upper camel case name - --> $DIR/lint-nonstandard-style-unicode-1.rs:40:8 + --> $DIR/lint-nonstandard-style-unicode-1.rs:39:8 | LL | struct Hello_World; | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `HelloWorld` error: type `你_ӟ` should have an upper camel case name - --> $DIR/lint-nonstandard-style-unicode-1.rs:43:8 + --> $DIR/lint-nonstandard-style-unicode-1.rs:42:8 | LL | struct 你_ӟ; | ^^^^ help: convert the identifier to upper camel case: `你Ӟ` diff --git a/src/test/ui/lint/lint-nonstandard-style-unicode-2.rs b/src/test/ui/lint/lint-nonstandard-style-unicode-2.rs index 0b52a5fde35dc..9690be5908b73 100644 --- a/src/test/ui/lint/lint-nonstandard-style-unicode-2.rs +++ b/src/test/ui/lint/lint-nonstandard-style-unicode-2.rs @@ -1,7 +1,6 @@ #![allow(dead_code)] #![forbid(non_snake_case)] -#![feature(non_ascii_idents)] // Some scripts (e.g., hiragana) don't have a concept of // upper/lowercase diff --git a/src/test/ui/lint/lint-nonstandard-style-unicode-2.stderr b/src/test/ui/lint/lint-nonstandard-style-unicode-2.stderr index 0b309e315a411..8eb0654e0a193 100644 --- a/src/test/ui/lint/lint-nonstandard-style-unicode-2.stderr +++ b/src/test/ui/lint/lint-nonstandard-style-unicode-2.stderr @@ -1,5 +1,5 @@ error: function `Ц` should have a snake case name - --> $DIR/lint-nonstandard-style-unicode-2.rs:18:4 + --> $DIR/lint-nonstandard-style-unicode-2.rs:17:4 | LL | fn Ц() {} | ^ help: convert the identifier to snake case: `ц` @@ -11,7 +11,7 @@ LL | #![forbid(non_snake_case)] | ^^^^^^^^^^^^^^ error: function `分__隔` should have a snake case name - --> $DIR/lint-nonstandard-style-unicode-2.rs:23:4 + --> $DIR/lint-nonstandard-style-unicode-2.rs:22:4 | LL | fn 分__隔() {} | ^^^^^^ help: convert the identifier to snake case: `分_隔` diff --git a/src/test/ui/lint/lint-nonstandard-style-unicode-3.rs b/src/test/ui/lint/lint-nonstandard-style-unicode-3.rs index b17c2de39a0c0..9175be7a0f49d 100644 --- a/src/test/ui/lint/lint-nonstandard-style-unicode-3.rs +++ b/src/test/ui/lint/lint-nonstandard-style-unicode-3.rs @@ -1,7 +1,6 @@ #![allow(dead_code)] #![forbid(non_upper_case_globals)] -#![feature(non_ascii_idents)] // Some scripts (e.g., hiragana) don't have a concept of // upper/lowercase diff --git a/src/test/ui/lint/lint-nonstandard-style-unicode-3.stderr b/src/test/ui/lint/lint-nonstandard-style-unicode-3.stderr index 44bd5ad55ff5c..970e6b838ada0 100644 --- a/src/test/ui/lint/lint-nonstandard-style-unicode-3.stderr +++ b/src/test/ui/lint/lint-nonstandard-style-unicode-3.stderr @@ -1,5 +1,5 @@ error: static variable `τεχ` should have an upper case name - --> $DIR/lint-nonstandard-style-unicode-3.rs:18:8 + --> $DIR/lint-nonstandard-style-unicode-3.rs:17:8 | LL | static τεχ: f32 = 3.14159265; | ^^^ help: convert the identifier to upper case: `ΤΕΧ` diff --git a/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-confusable-idents.rs b/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-confusable-idents.rs index 2c711f994043f..e7da825ae36d1 100644 --- a/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-confusable-idents.rs +++ b/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-confusable-idents.rs @@ -1,4 +1,3 @@ -#![feature(non_ascii_idents)] #![deny(confusable_idents)] #![allow(uncommon_codepoints, non_upper_case_globals)] diff --git a/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-confusable-idents.stderr b/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-confusable-idents.stderr index b9af60963adf6..e9906c83d126c 100644 --- a/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-confusable-idents.stderr +++ b/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-confusable-idents.stderr @@ -1,5 +1,5 @@ error: identifier pair considered confusable between `s` and `s` - --> $DIR/lint-confusable-idents.rs:9:9 + --> $DIR/lint-confusable-idents.rs:8:9 | LL | const s: usize = 42; | -- this is where the previous identifier occurred @@ -8,13 +8,13 @@ LL | let s = "rust"; | ^ | note: the lint level is defined here - --> $DIR/lint-confusable-idents.rs:2:9 + --> $DIR/lint-confusable-idents.rs:1:9 | LL | #![deny(confusable_idents)] | ^^^^^^^^^^^^^^^^^ error: identifier pair considered confusable between `s_s` and `s_s` - --> $DIR/lint-confusable-idents.rs:10:9 + --> $DIR/lint-confusable-idents.rs:9:9 | LL | const s_s: usize = 42; | --- this is where the previous identifier occurred diff --git a/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables-2.rs b/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables-2.rs index a5b45466da5ca..f62c8a19031dc 100644 --- a/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables-2.rs +++ b/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables-2.rs @@ -1,5 +1,4 @@ // check-pass -#![feature(non_ascii_idents)] #![deny(mixed_script_confusables)] struct ΑctuallyNotLatin; diff --git a/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables.rs b/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables.rs index 4637b03f250de..7ee9c41f6a091 100644 --- a/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables.rs +++ b/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables.rs @@ -1,4 +1,3 @@ -#![feature(non_ascii_idents)] #![deny(mixed_script_confusables)] struct ΑctuallyNotLatin; diff --git a/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables.stderr b/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables.stderr index 6f75a1ece3766..4018b381fb8c5 100644 --- a/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables.stderr +++ b/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables.stderr @@ -1,11 +1,11 @@ error: The usage of Script Group `Greek` in this crate consists solely of mixed script confusables - --> $DIR/lint-mixed-script-confusables.rs:4:8 + --> $DIR/lint-mixed-script-confusables.rs:3:8 | LL | struct ΑctuallyNotLatin; | ^^^^^^^^^^^^^^^^ | note: the lint level is defined here - --> $DIR/lint-mixed-script-confusables.rs:2:9 + --> $DIR/lint-mixed-script-confusables.rs:1:9 | LL | #![deny(mixed_script_confusables)] | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -13,7 +13,7 @@ LL | #![deny(mixed_script_confusables)] = note: Please recheck to make sure their usages are indeed what you want. error: The usage of Script Group `Cyrillic` in this crate consists solely of mixed script confusables - --> $DIR/lint-mixed-script-confusables.rs:11:5 + --> $DIR/lint-mixed-script-confusables.rs:10:5 | LL | mod роре { | ^^^^ @@ -22,7 +22,7 @@ LL | mod роре { = note: Please recheck to make sure their usages are indeed what you want. error: The usage of Script Group `Japanese, Katakana` in this crate consists solely of mixed script confusables - --> $DIR/lint-mixed-script-confusables.rs:13:11 + --> $DIR/lint-mixed-script-confusables.rs:12:11 | LL | const エ: &'static str = "アイウ"; | ^^ diff --git a/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-non-ascii-idents.rs b/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-non-ascii-idents.rs index 20d00cf701a15..8ae1744096dde 100644 --- a/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-non-ascii-idents.rs +++ b/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-non-ascii-idents.rs @@ -1,4 +1,3 @@ -#![feature(non_ascii_idents)] #![deny(non_ascii_idents)] const חלודה: usize = 2; //~ ERROR identifier contains non-ASCII characters diff --git a/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-non-ascii-idents.stderr b/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-non-ascii-idents.stderr index 048b6ff5d687f..8ed7f093ce340 100644 --- a/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-non-ascii-idents.stderr +++ b/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-non-ascii-idents.stderr @@ -1,23 +1,23 @@ error: identifier contains non-ASCII characters - --> $DIR/lint-non-ascii-idents.rs:4:7 + --> $DIR/lint-non-ascii-idents.rs:3:7 | LL | const חלודה: usize = 2; | ^^^^^ | note: the lint level is defined here - --> $DIR/lint-non-ascii-idents.rs:2:9 + --> $DIR/lint-non-ascii-idents.rs:1:9 | LL | #![deny(non_ascii_idents)] | ^^^^^^^^^^^^^^^^ error: identifier contains non-ASCII characters - --> $DIR/lint-non-ascii-idents.rs:6:4 + --> $DIR/lint-non-ascii-idents.rs:5:4 | LL | fn coöperation() {} | ^^^^^^^^^^^ error: identifier contains non-ASCII characters - --> $DIR/lint-non-ascii-idents.rs:9:9 + --> $DIR/lint-non-ascii-idents.rs:8:9 | LL | let naïveté = 2; | ^^^^^^^ diff --git a/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-uncommon-codepoints.rs b/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-uncommon-codepoints.rs index b5e251e047b5a..81a3427a10274 100644 --- a/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-uncommon-codepoints.rs +++ b/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-uncommon-codepoints.rs @@ -1,4 +1,3 @@ -#![feature(non_ascii_idents)] #![deny(uncommon_codepoints)] const µ: f64 = 0.000001; //~ ERROR identifier contains uncommon Unicode codepoints diff --git a/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-uncommon-codepoints.stderr b/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-uncommon-codepoints.stderr index 05ea3d5de7dbc..d435282a6e855 100644 --- a/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-uncommon-codepoints.stderr +++ b/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-uncommon-codepoints.stderr @@ -1,23 +1,23 @@ error: identifier contains uncommon Unicode codepoints - --> $DIR/lint-uncommon-codepoints.rs:4:7 + --> $DIR/lint-uncommon-codepoints.rs:3:7 | LL | const µ: f64 = 0.000001; | ^ | note: the lint level is defined here - --> $DIR/lint-uncommon-codepoints.rs:2:9 + --> $DIR/lint-uncommon-codepoints.rs:1:9 | LL | #![deny(uncommon_codepoints)] | ^^^^^^^^^^^^^^^^^^^ error: identifier contains uncommon Unicode codepoints - --> $DIR/lint-uncommon-codepoints.rs:6:4 + --> $DIR/lint-uncommon-codepoints.rs:5:4 | LL | fn dijkstra() {} | ^^^^^^^ error: identifier contains uncommon Unicode codepoints - --> $DIR/lint-uncommon-codepoints.rs:9:9 + --> $DIR/lint-uncommon-codepoints.rs:8:9 | LL | let ㇻㇲㇳ = "rust"; | ^^^^^^ diff --git a/src/test/ui/lint/special-upper-lower-cases.rs b/src/test/ui/lint/special-upper-lower-cases.rs index 71ebf05dd31ab..761be61fa07f6 100644 --- a/src/test/ui/lint/special-upper-lower-cases.rs +++ b/src/test/ui/lint/special-upper-lower-cases.rs @@ -5,7 +5,6 @@ // check-pass -#![feature(non_ascii_idents)] #![allow(uncommon_codepoints, unused)] struct 𝕟𝕠𝕥𝕒𝕔𝕒𝕞𝕖𝕝; diff --git a/src/test/ui/lint/special-upper-lower-cases.stderr b/src/test/ui/lint/special-upper-lower-cases.stderr index e3b451a15a2cc..2aa13c33be3a6 100644 --- a/src/test/ui/lint/special-upper-lower-cases.stderr +++ b/src/test/ui/lint/special-upper-lower-cases.stderr @@ -1,5 +1,5 @@ warning: type `𝕟𝕠𝕥𝕒𝕔𝕒𝕞𝕖𝕝` should have an upper camel case name - --> $DIR/special-upper-lower-cases.rs:11:8 + --> $DIR/special-upper-lower-cases.rs:10:8 | LL | struct 𝕟𝕠𝕥𝕒𝕔𝕒𝕞𝕖𝕝; | ^^^^^^^^^ should have an UpperCamelCase name @@ -7,13 +7,13 @@ LL | struct 𝕟𝕠𝕥𝕒𝕔𝕒𝕞𝕖𝕝; = note: `#[warn(non_camel_case_types)]` on by default warning: type `𝕟𝕠𝕥_𝕒_𝕔𝕒𝕞𝕖𝕝` should have an upper camel case name - --> $DIR/special-upper-lower-cases.rs:15:8 + --> $DIR/special-upper-lower-cases.rs:14:8 | LL | struct 𝕟𝕠𝕥_𝕒_𝕔𝕒𝕞𝕖𝕝; | ^^^^^^^^^^^ should have an UpperCamelCase name warning: static variable `𝗻𝗼𝗻𝘂𝗽𝗽𝗲𝗿𝗰𝗮𝘀𝗲` should have an upper case name - --> $DIR/special-upper-lower-cases.rs:18:8 + --> $DIR/special-upper-lower-cases.rs:17:8 | LL | static 𝗻𝗼𝗻𝘂𝗽𝗽𝗲𝗿𝗰𝗮𝘀𝗲: i32 = 1; | ^^^^^^^^^^^^ should have an UPPER_CASE name @@ -21,7 +21,7 @@ LL | static 𝗻𝗼𝗻𝘂𝗽𝗽𝗲𝗿𝗰𝗮𝘀𝗲: i32 = 1; = note: `#[warn(non_upper_case_globals)]` on by default warning: variable `𝓢𝓝𝓐𝓐𝓐𝓐𝓚𝓔𝓢` should have a snake case name - --> $DIR/special-upper-lower-cases.rs:22:9 + --> $DIR/special-upper-lower-cases.rs:21:9 | LL | let 𝓢𝓝𝓐𝓐𝓐𝓐𝓚𝓔𝓢 = 1; | ^^^^^^^^^ should have a snake_case name diff --git a/src/test/ui/parser/issue-48508.rs b/src/test/ui/parser/issue-48508.rs index 8dc9351260ebc..37d04c5d65f06 100644 --- a/src/test/ui/parser/issue-48508.rs +++ b/src/test/ui/parser/issue-48508.rs @@ -10,7 +10,6 @@ // ignore-pretty issue #37195 // ignore-asmjs wasm2js does not support source maps yet -#![feature(non_ascii_idents)] #![allow(uncommon_codepoints)] #[path = "issue-48508-aux.rs"] diff --git a/src/test/ui/parser/multibyte-char-use-seperator-issue-80134.rs b/src/test/ui/parser/multibyte-char-use-seperator-issue-80134.rs index f3ae3aba9b9e6..7e7995d6724eb 100644 --- a/src/test/ui/parser/multibyte-char-use-seperator-issue-80134.rs +++ b/src/test/ui/parser/multibyte-char-use-seperator-issue-80134.rs @@ -4,9 +4,7 @@ fn main() { (()é); //~^ ERROR: expected one of `)`, `,`, `.`, `?`, or an operator //~| ERROR: cannot find value `é` in this scope - //~| ERROR: non-ascii idents are not fully supported (()氷); //~^ ERROR: expected one of `)`, `,`, `.`, `?`, or an operator //~| ERROR: cannot find value `氷` in this scope - //~| ERROR: non-ascii idents are not fully supported } diff --git a/src/test/ui/parser/multibyte-char-use-seperator-issue-80134.stderr b/src/test/ui/parser/multibyte-char-use-seperator-issue-80134.stderr index 892cc92b1bdeb..21e71aa121560 100644 --- a/src/test/ui/parser/multibyte-char-use-seperator-issue-80134.stderr +++ b/src/test/ui/parser/multibyte-char-use-seperator-issue-80134.stderr @@ -8,7 +8,7 @@ LL | (()é); | help: missing `,` error: expected one of `)`, `,`, `.`, `?`, or an operator, found `氷` - --> $DIR/multibyte-char-use-seperator-issue-80134.rs:8:8 + --> $DIR/multibyte-char-use-seperator-issue-80134.rs:7:8 | LL | (()氷); | -^ @@ -23,30 +23,11 @@ LL | (()é); | ^ not found in this scope error[E0425]: cannot find value `氷` in this scope - --> $DIR/multibyte-char-use-seperator-issue-80134.rs:8:8 + --> $DIR/multibyte-char-use-seperator-issue-80134.rs:7:8 | LL | (()氷); | ^^ not found in this scope -error[E0658]: non-ascii idents are not fully supported - --> $DIR/multibyte-char-use-seperator-issue-80134.rs:4:8 - | -LL | (()é); - | ^ - | - = note: see issue #55467 for more information - = help: add `#![feature(non_ascii_idents)]` to the crate attributes to enable - -error[E0658]: non-ascii idents are not fully supported - --> $DIR/multibyte-char-use-seperator-issue-80134.rs:8:8 - | -LL | (()氷); - | ^^ - | - = note: see issue #55467 for more information - = help: add `#![feature(non_ascii_idents)]` to the crate attributes to enable - -error: aborting due to 6 previous errors +error: aborting due to 4 previous errors -Some errors have detailed explanations: E0425, E0658. -For more information about an error, try `rustc --explain E0425`. +For more information about this error, try `rustc --explain E0425`. diff --git a/src/test/ui/rfc-2457/crate_name_nonascii_forbidden-1.rs b/src/test/ui/rfc-2457/crate_name_nonascii_forbidden-1.rs index 310545b92d549..c07ba54af4032 100644 --- a/src/test/ui/rfc-2457/crate_name_nonascii_forbidden-1.rs +++ b/src/test/ui/rfc-2457/crate_name_nonascii_forbidden-1.rs @@ -1,5 +1,3 @@ -#![feature(non_ascii_idents)] - extern crate ьаг; //~ ERROR cannot load a crate with a non-ascii name `ьаг` fn main() {} diff --git a/src/test/ui/rfc-2457/crate_name_nonascii_forbidden-1.stderr b/src/test/ui/rfc-2457/crate_name_nonascii_forbidden-1.stderr index 11108f2fb8678..a8f3abe599eb2 100644 --- a/src/test/ui/rfc-2457/crate_name_nonascii_forbidden-1.stderr +++ b/src/test/ui/rfc-2457/crate_name_nonascii_forbidden-1.stderr @@ -1,5 +1,5 @@ error: cannot load a crate with a non-ascii name `ьаг` - --> $DIR/crate_name_nonascii_forbidden-1.rs:3:1 + --> $DIR/crate_name_nonascii_forbidden-1.rs:1:1 | LL | extern crate ьаг; | ^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/rfc-2457/crate_name_nonascii_forbidden-2.rs b/src/test/ui/rfc-2457/crate_name_nonascii_forbidden-2.rs index 0249848b35ac0..f8e033937c607 100644 --- a/src/test/ui/rfc-2457/crate_name_nonascii_forbidden-2.rs +++ b/src/test/ui/rfc-2457/crate_name_nonascii_forbidden-2.rs @@ -1,6 +1,5 @@ // compile-flags:--extern му_сгате // edition:2018 -#![feature(non_ascii_idents)] use му_сгате::baz; //~ ERROR cannot load a crate with a non-ascii name `му_сгате` diff --git a/src/test/ui/rfc-2457/crate_name_nonascii_forbidden-2.stderr b/src/test/ui/rfc-2457/crate_name_nonascii_forbidden-2.stderr index 8d3548ed33dcf..05fc4fb22ad1e 100644 --- a/src/test/ui/rfc-2457/crate_name_nonascii_forbidden-2.stderr +++ b/src/test/ui/rfc-2457/crate_name_nonascii_forbidden-2.stderr @@ -1,5 +1,5 @@ error: cannot load a crate with a non-ascii name `му_сгате` - --> $DIR/crate_name_nonascii_forbidden-2.rs:5:5 + --> $DIR/crate_name_nonascii_forbidden-2.rs:4:5 | LL | use му_сгате::baz; | ^^^^^^^^ diff --git a/src/test/ui/rfc-2457/extern_block_nonascii_forbidden.rs b/src/test/ui/rfc-2457/extern_block_nonascii_forbidden.rs index c70ced731d54d..ad6825404306a 100644 --- a/src/test/ui/rfc-2457/extern_block_nonascii_forbidden.rs +++ b/src/test/ui/rfc-2457/extern_block_nonascii_forbidden.rs @@ -1,5 +1,4 @@ #![feature(extern_types)] -#![feature(non_ascii_idents)] extern "C" { type 一; //~ items in `extern` blocks cannot use non-ascii identifiers diff --git a/src/test/ui/rfc-2457/extern_block_nonascii_forbidden.stderr b/src/test/ui/rfc-2457/extern_block_nonascii_forbidden.stderr index 3b18c06ec5c4c..ab8832e916315 100644 --- a/src/test/ui/rfc-2457/extern_block_nonascii_forbidden.stderr +++ b/src/test/ui/rfc-2457/extern_block_nonascii_forbidden.stderr @@ -1,5 +1,5 @@ error: items in `extern` blocks cannot use non-ascii identifiers - --> $DIR/extern_block_nonascii_forbidden.rs:5:10 + --> $DIR/extern_block_nonascii_forbidden.rs:4:10 | LL | extern "C" { | ---------- in this `extern` block @@ -9,7 +9,7 @@ LL | type 一; = note: This limitation may be lifted in the future; see issue #83942 for more information error: items in `extern` blocks cannot use non-ascii identifiers - --> $DIR/extern_block_nonascii_forbidden.rs:6:8 + --> $DIR/extern_block_nonascii_forbidden.rs:5:8 | LL | extern "C" { | ---------- in this `extern` block @@ -20,7 +20,7 @@ LL | fn 二(); = note: This limitation may be lifted in the future; see issue #83942 for more information error: items in `extern` blocks cannot use non-ascii identifiers - --> $DIR/extern_block_nonascii_forbidden.rs:7:12 + --> $DIR/extern_block_nonascii_forbidden.rs:6:12 | LL | extern "C" { | ---------- in this `extern` block diff --git a/src/test/ui/rfc-2457/idents-normalized.rs b/src/test/ui/rfc-2457/idents-normalized.rs index 109cec7548e2f..1023fee37d5dd 100644 --- a/src/test/ui/rfc-2457/idents-normalized.rs +++ b/src/test/ui/rfc-2457/idents-normalized.rs @@ -1,5 +1,4 @@ // check-pass -#![feature(non_ascii_idents)] struct Résumé; // ['LATIN SMALL LETTER E WITH ACUTE'] diff --git a/src/test/ui/rfc-2457/mod_file_nonascii_forbidden.rs b/src/test/ui/rfc-2457/mod_file_nonascii_forbidden.rs index efd2932f15294..e949e2319c1c4 100644 --- a/src/test/ui/rfc-2457/mod_file_nonascii_forbidden.rs +++ b/src/test/ui/rfc-2457/mod_file_nonascii_forbidden.rs @@ -1,5 +1,3 @@ -#![feature(non_ascii_idents)] - mod řųśť; //~ trying to load file for //~^ file not found for diff --git a/src/test/ui/rfc-2457/mod_file_nonascii_forbidden.stderr b/src/test/ui/rfc-2457/mod_file_nonascii_forbidden.stderr index 6e06ab737c215..e857a1e60e5fe 100644 --- a/src/test/ui/rfc-2457/mod_file_nonascii_forbidden.stderr +++ b/src/test/ui/rfc-2457/mod_file_nonascii_forbidden.stderr @@ -1,5 +1,5 @@ error[E0583]: file not found for module `řųśť` - --> $DIR/mod_file_nonascii_forbidden.rs:3:1 + --> $DIR/mod_file_nonascii_forbidden.rs:1:1 | LL | mod řųśť; | ^^^^^^^^^ @@ -7,7 +7,7 @@ LL | mod řųśť; = help: to create the module `řųśť`, create file "$DIR/řųśť.rs" error[E0754]: trying to load file for module `řųśť` with non-ascii identifier name - --> $DIR/mod_file_nonascii_forbidden.rs:3:5 + --> $DIR/mod_file_nonascii_forbidden.rs:1:5 | LL | mod řųśť; | ^^^^ diff --git a/src/test/ui/rfc-2457/mod_file_nonascii_with_path_allowed.rs b/src/test/ui/rfc-2457/mod_file_nonascii_with_path_allowed.rs index e9f3fba2fb01e..94327846d6169 100644 --- a/src/test/ui/rfc-2457/mod_file_nonascii_with_path_allowed.rs +++ b/src/test/ui/rfc-2457/mod_file_nonascii_with_path_allowed.rs @@ -1,5 +1,4 @@ // check-pass -#![feature(non_ascii_idents)] #[path="auxiliary/mod_file_nonascii_with_path_allowed-aux.rs"] mod řųśť; diff --git a/src/test/ui/rfc-2457/mod_inline_nonascii_allowed.rs b/src/test/ui/rfc-2457/mod_inline_nonascii_allowed.rs index dd27da432ba65..e1d836b7c3e34 100644 --- a/src/test/ui/rfc-2457/mod_inline_nonascii_allowed.rs +++ b/src/test/ui/rfc-2457/mod_inline_nonascii_allowed.rs @@ -1,5 +1,4 @@ // check-pass -#![feature(non_ascii_idents)] mod řųśť { const IS_GREAT: bool = true; diff --git a/src/test/ui/rfc-2457/no_mangle_nonascii_forbidden.rs b/src/test/ui/rfc-2457/no_mangle_nonascii_forbidden.rs index a408c9757165c..0325d6436abcb 100644 --- a/src/test/ui/rfc-2457/no_mangle_nonascii_forbidden.rs +++ b/src/test/ui/rfc-2457/no_mangle_nonascii_forbidden.rs @@ -1,5 +1,3 @@ -#![feature(non_ascii_idents)] - #[no_mangle] pub fn řųśť() {} //~ `#[no_mangle]` requires ASCII identifier diff --git a/src/test/ui/rfc-2457/no_mangle_nonascii_forbidden.stderr b/src/test/ui/rfc-2457/no_mangle_nonascii_forbidden.stderr index 4ca83e4103208..b4b2b0c7ee001 100644 --- a/src/test/ui/rfc-2457/no_mangle_nonascii_forbidden.stderr +++ b/src/test/ui/rfc-2457/no_mangle_nonascii_forbidden.stderr @@ -1,5 +1,5 @@ error[E0754]: `#[no_mangle]` requires ASCII identifier - --> $DIR/no_mangle_nonascii_forbidden.rs:4:1 + --> $DIR/no_mangle_nonascii_forbidden.rs:2:1 | LL | pub fn řųśť() {} | ^^^^^^^^^^^^^ diff --git a/src/test/ui/utf8_idents-rpass.rs b/src/test/ui/utf8_idents-rpass.rs index 582b67bc29924..206744a58fde4 100644 --- a/src/test/ui/utf8_idents-rpass.rs +++ b/src/test/ui/utf8_idents-rpass.rs @@ -2,8 +2,6 @@ // #![allow(non_snake_case)] -#![feature(non_ascii_idents)] - pub fn main() { let ε = 0.00001f64; let Π = 3.14f64; diff --git a/src/test/ui/utf8_idents.rs b/src/test/ui/utf8_idents.rs index 6c54086cc2009..1f6326dd94b5c 100644 --- a/src/test/ui/utf8_idents.rs +++ b/src/test/ui/utf8_idents.rs @@ -1,15 +1,16 @@ -#![allow(mixed_script_confusables)] +// check-pass +// +#![allow(mixed_script_confusables, non_camel_case_types)] fn foo< - 'β, //~ ERROR non-ascii idents are not fully supported - γ //~ ERROR non-ascii idents are not fully supported - //~^ WARN type parameter `γ` should have an upper camel case name + 'β, + γ >() {} struct X { - δ: usize //~ ERROR non-ascii idents are not fully supported + δ: usize } pub fn main() { - let α = 0.00001f64; //~ ERROR non-ascii idents are not fully supported + let α = 0.00001f64; } diff --git a/src/test/ui/utf8_idents.stderr b/src/test/ui/utf8_idents.stderr deleted file mode 100644 index 2fc0b1c39effb..0000000000000 --- a/src/test/ui/utf8_idents.stderr +++ /dev/null @@ -1,47 +0,0 @@ -error[E0658]: non-ascii idents are not fully supported - --> $DIR/utf8_idents.rs:4:5 - | -LL | 'β, - | ^^ - | - = note: see issue #55467 for more information - = help: add `#![feature(non_ascii_idents)]` to the crate attributes to enable - -error[E0658]: non-ascii idents are not fully supported - --> $DIR/utf8_idents.rs:5:5 - | -LL | γ - | ^ - | - = note: see issue #55467 for more information - = help: add `#![feature(non_ascii_idents)]` to the crate attributes to enable - -error[E0658]: non-ascii idents are not fully supported - --> $DIR/utf8_idents.rs:10:5 - | -LL | δ: usize - | ^ - | - = note: see issue #55467 for more information - = help: add `#![feature(non_ascii_idents)]` to the crate attributes to enable - -error[E0658]: non-ascii idents are not fully supported - --> $DIR/utf8_idents.rs:14:9 - | -LL | let α = 0.00001f64; - | ^ - | - = note: see issue #55467 for more information - = help: add `#![feature(non_ascii_idents)]` to the crate attributes to enable - -warning: type parameter `γ` should have an upper camel case name - --> $DIR/utf8_idents.rs:5:5 - | -LL | γ - | ^ help: convert the identifier to upper camel case: `Γ` - | - = note: `#[warn(non_camel_case_types)]` on by default - -error: aborting due to 4 previous errors; 1 warning emitted - -For more information about this error, try `rustc --explain E0658`.