error invalid-char-literal
Некорректный символьный литерал.
What it means#
A character literal holds exactly one Unicode scalar value, written 'a', with an escape such as '\n' or '\u{1F600}' (§1.5). It differs from a loop label 'name (§1.3) by the closing apostrophe. An empty literal, several characters between apostrophes, or an invalid scalar value is reported.
Example#
fn main() {
let c = 'ab' // <- invalid-char-literal
}error
invalid-char-literal
How to fix#
fn main() {
let c = 'a'
let s = "ab"
}Use a str literal for more than one character, or keep exactly one scalar value between the apostrophes.