Skip to content

Missing tests for utf-8 identifiers #2338

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions gcc/testsuite/rust/compile/torture/raw_identifiers.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
pub fn square(num: i32) -> i32 {
r#num * num
}

pub fn kimchi() -> i32 {
// UTF-8 raw indentifiers
let r#김치 = 1;
let r#泡菜 = 1;
let r#кимчи = 1;
r#김치 + r#泡菜 + r#кимчи
}
18 changes: 18 additions & 0 deletions gcc/testsuite/rust/compile/torture/utf8_identifiers.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
pub fn f() {
let crab = ();

let Κάβουρας = 0.001;
// { dg-warning "unused name" "" { target *-*-* } .-1 }
let 게 = "";
// { dg-warning "unused name" "" { target *-*-* } .-1 }
let سلطعون = 0.;
// { dg-warning "unused name" "" { target *-*-* } .-1 }

let _: &'かに () = &crab;
}

pub fn g<'β, γ>() {}

struct _S {
δ: i32
}