Skip to content

Using unicode literals as indentifier produces a weird warning about snake case #21735

Closed
@eiennohito

Description

@eiennohito

Sample code (uses Hiragana を as an identifier)

fn (i: i32) -> i32 {
  i + 5
}

A warning:

test.rs:8:1: 10:2 warning: function `を` should have a snake case name such as `を`, #[warn(non_snake_case)] on by default
test.rs:8 fn を(i: i32) -> i32 {
test.rs:9   i + 5
test.rs:10 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions