docs

#E0009: 不能作為原始識別字的名稱

r#name 讓關鍵字也能當作名稱使用,但有幾個名稱(self、Self、crate、super、_)不能這樣寫。請換一個名稱。

nabi
let r#self = 1;
error[E0009]: `r#self` is not allowed: `self` can't be a raw identifier; write `self` or pick another name
  --> main.nabi:1:5
   |
 1 | let r#self = 1;
   |     ^^^^^^

換一個名稱:

nabi
let me = 1;
println(f"{me}");
1

相關錯誤碼:E0021 把保留字當作名稱

發現錯誤? 在 GitHub 上編輯此頁 最後更新: