docs

你正在阅读 v0.1.0 的文档。Nabi 0.1.0 已不再提供支持。 最新版本:v0.1.3 →

本页尚未翻译,以下为英文原文。

#E0009: name cannot be a raw identifier

r#name keeps a keyword usable as a name, but a few names (self, Self, crate, super, _) cannot be written that way. Pick another name.

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;
   |     ^^^^^^

Pick another name:

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

Related: E0021 reserved word used as a name

Found a mistake? Edit this page on GitHub. Last updated