summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lint/rfc-2457-non-ascii-idents
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/lint/rfc-2457-non-ascii-idents')
-rw-r--r--src/test/ui/lint/rfc-2457-non-ascii-idents/lint-confusable-idents.rs16
-rw-r--r--src/test/ui/lint/rfc-2457-non-ascii-idents/lint-confusable-idents.stderr26
-rw-r--r--src/test/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables-2.rs19
-rw-r--r--src/test/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables.rs14
-rw-r--r--src/test/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables.stderr34
-rw-r--r--src/test/ui/lint/rfc-2457-non-ascii-idents/lint-non-ascii-idents.rs12
-rw-r--r--src/test/ui/lint/rfc-2457-non-ascii-idents/lint-non-ascii-idents.stderr26
-rw-r--r--src/test/ui/lint/rfc-2457-non-ascii-idents/lint-uncommon-codepoints.rs13
-rw-r--r--src/test/ui/lint/rfc-2457-non-ascii-idents/lint-uncommon-codepoints.stderr34
9 files changed, 0 insertions, 194 deletions
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
deleted file mode 100644
index e7da825ae..000000000
--- a/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-confusable-idents.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-#![deny(confusable_idents)]
-#![allow(uncommon_codepoints, non_upper_case_globals)]
-
-const s: usize = 42;
-const s_s: usize = 42;
-
-fn main() {
- let s = "rust"; //~ ERROR identifier pair considered confusable
- let s_s = "rust2"; //~ ERROR identifier pair considered confusable
- not_affected();
-}
-
-fn not_affected() {
- let s1 = 1;
- let sl = 'l';
-}
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
deleted file mode 100644
index e9906c83d..000000000
--- a/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-confusable-idents.stderr
+++ /dev/null
@@ -1,26 +0,0 @@
-error: identifier pair considered confusable between `s` and `s`
- --> $DIR/lint-confusable-idents.rs:8:9
- |
-LL | const s: usize = 42;
- | -- this is where the previous identifier occurred
-...
-LL | let s = "rust";
- | ^
- |
-note: the lint level is defined here
- --> $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:9:9
- |
-LL | const s_s: usize = 42;
- | --- this is where the previous identifier occurred
-...
-LL | let s_s = "rust2";
- | ^^^^^
-
-error: aborting due to 2 previous errors
-
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
deleted file mode 100644
index f62c8a190..000000000
--- a/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables-2.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// check-pass
-#![deny(mixed_script_confusables)]
-
-struct ΑctuallyNotLatin;
-
-fn main() {
- let λ = 42; // this usage of Greek confirms that Greek is used intentionally.
-}
-
-mod роре {
- const エ: &'static str = "アイウ";
-
- // this usage of Katakana confirms that Katakana is used intentionally.
- fn ニャン() {
- let д: usize = 100; // this usage of Cyrillic confirms that Cyrillic is used intentionally.
-
- println!("meow!");
- }
-}
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
deleted file mode 100644
index 9d837d41f..000000000
--- a/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-#![deny(mixed_script_confusables)]
-
-struct ΑctuallyNotLatin;
-//~^ ERROR the usage of Script Group `Greek` in this crate consists solely of
-
-fn main() {
- let v = ΑctuallyNotLatin;
-}
-
-mod роре {
-//~^ ERROR the usage of Script Group `Cyrillic` in this crate consists solely of
- const エ: &'static str = "アイウ";
- //~^ ERROR the usage of Script Group `Japanese, Katakana` in this crate consists solely of
-}
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
deleted file mode 100644
index 884a4a453..000000000
--- a/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-mixed-script-confusables.stderr
+++ /dev/null
@@ -1,34 +0,0 @@
-error: the usage of Script Group `Greek` in this crate consists solely of mixed script confusables
- --> $DIR/lint-mixed-script-confusables.rs:3:8
- |
-LL | struct ΑctuallyNotLatin;
- | ^^^^^^^^^^^^^^^^
- |
- = note: the usage includes 'Α' (U+0391)
- = note: please recheck to make sure their usages are indeed what you want
-note: the lint level is defined here
- --> $DIR/lint-mixed-script-confusables.rs:1:9
- |
-LL | #![deny(mixed_script_confusables)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: the usage of Script Group `Cyrillic` in this crate consists solely of mixed script confusables
- --> $DIR/lint-mixed-script-confusables.rs:10:5
- |
-LL | mod роре {
- | ^^^^
- |
- = note: the usage includes 'е' (U+0435), 'о' (U+043E), 'р' (U+0440)
- = 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:12:11
- |
-LL | const エ: &'static str = "アイウ";
- | ^^
- |
- = note: the usage includes 'エ' (U+30A8)
- = note: please recheck to make sure their usages are indeed what you want
-
-error: aborting due to 3 previous errors
-
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
deleted file mode 100644
index 8ae174409..000000000
--- a/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-non-ascii-idents.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-#![deny(non_ascii_idents)]
-
-const חלודה: usize = 2; //~ ERROR identifier contains non-ASCII characters
-
-fn coöperation() {} //~ ERROR identifier contains non-ASCII characters
-
-fn main() {
- let naïveté = 2; //~ ERROR identifier contains non-ASCII characters
-
- // using the same identifier the second time won't trigger the lint.
- println!("{}", naïveté);
-}
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
deleted file mode 100644
index 8ed7f093c..000000000
--- a/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-non-ascii-idents.stderr
+++ /dev/null
@@ -1,26 +0,0 @@
-error: identifier contains non-ASCII characters
- --> $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:1:9
- |
-LL | #![deny(non_ascii_idents)]
- | ^^^^^^^^^^^^^^^^
-
-error: identifier contains non-ASCII characters
- --> $DIR/lint-non-ascii-idents.rs:5:4
- |
-LL | fn coöperation() {}
- | ^^^^^^^^^^^
-
-error: identifier contains non-ASCII characters
- --> $DIR/lint-non-ascii-idents.rs:8:9
- |
-LL | let naïveté = 2;
- | ^^^^^^^
-
-error: aborting due to 3 previous errors
-
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
deleted file mode 100644
index ed8e7dddd..000000000
--- a/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-uncommon-codepoints.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-#![deny(uncommon_codepoints)]
-
-const µ: f64 = 0.000001; //~ ERROR identifier contains uncommon Unicode codepoints
-//~| WARNING should have an upper case name
-
-fn dijkstra() {} //~ ERROR identifier contains uncommon Unicode codepoints
-
-fn main() {
- let ㇻㇲㇳ = "rust"; //~ ERROR identifier contains uncommon Unicode codepoints
-
- // using the same identifier the second time won't trigger the lint.
- println!("{}", ㇻㇲㇳ);
-}
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
deleted file mode 100644
index 0533da030..000000000
--- a/src/test/ui/lint/rfc-2457-non-ascii-idents/lint-uncommon-codepoints.stderr
+++ /dev/null
@@ -1,34 +0,0 @@
-error: identifier contains uncommon Unicode codepoints
- --> $DIR/lint-uncommon-codepoints.rs:3:7
- |
-LL | const µ: f64 = 0.000001;
- | ^
- |
-note: the lint level is defined here
- --> $DIR/lint-uncommon-codepoints.rs:1:9
- |
-LL | #![deny(uncommon_codepoints)]
- | ^^^^^^^^^^^^^^^^^^^
-
-error: identifier contains uncommon Unicode codepoints
- --> $DIR/lint-uncommon-codepoints.rs:6:4
- |
-LL | fn dijkstra() {}
- | ^^^^^^^
-
-error: identifier contains uncommon Unicode codepoints
- --> $DIR/lint-uncommon-codepoints.rs:9:9
- |
-LL | let ㇻㇲㇳ = "rust";
- | ^^^^^^
-
-warning: constant `µ` should have an upper case name
- --> $DIR/lint-uncommon-codepoints.rs:3:7
- |
-LL | const µ: f64 = 0.000001;
- | ^ help: convert the identifier to upper case: `Μ`
- |
- = note: `#[warn(non_upper_case_globals)]` on by default
-
-error: aborting due to 3 previous errors; 1 warning emitted
-