Skip to content

Commit 4998a7d

Browse files
committed
"iface" -> "trait" in CodeMirror mode.
1 parent a413d4e commit 4998a7d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

doc/lib/codemirror-rust.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ CodeMirror.defineMode("rust", function() {
44
"if": "if-style", "while": "if-style", "loop": "if-style", "else": "else-style",
55
"do": "else-style", "ret": "else-style", "fail": "else-style",
66
"break": "atom", "cont": "atom", "const": "let", "resource": "fn",
7-
"let": "let", "fn": "fn", "for": "for", "alt": "alt", "iface": "iface",
7+
"let": "let", "fn": "fn", "for": "for", "alt": "alt", "trait": "trait",
88
"impl": "impl", "type": "type", "enum": "enum", "class": "atom", "mod": "mod",
99
"as": "op", "true": "atom", "false": "atom", "assert": "op", "check": "op",
1010
"claim": "op", "extern": "ignore", "unsafe": "ignore", "import": "else-style",
@@ -179,7 +179,7 @@ CodeMirror.defineMode("rust", function() {
179179
if (type == "type") return cont(pushlex("stat"), tydef, endstatement, poplex, block);
180180
if (type == "enum") return stat_of(tagdef);
181181
if (type == "mod") return stat_of(mod);
182-
if (type == "iface") return stat_of(iface);
182+
if (type == "trait") return stat_of(trait);
183183
if (type == "impl") return stat_of(impl);
184184
if (type == "open-attr") return cont(pushlex("]"), commasep(expression, "]"), poplex);
185185
if (type == "ignore" || type.match(/[\]\);,]/)) return cont(block);
@@ -291,9 +291,9 @@ CodeMirror.defineMode("rust", function() {
291291
if (type == "{") return cont(pushlex("}"), block, poplex);
292292
return pass();
293293
}
294-
function iface(type) {
295-
if (type == "name") {cx.marked = "def"; return cont(iface);}
296-
if (content == "<") return cont(typarams, iface);
294+
function trait(type) {
295+
if (type == "name") {cx.marked = "def"; return cont(trait);}
296+
if (content == "<") return cont(typarams, trait);
297297
if (type == "{") return cont(pushlex("}"), block, poplex);
298298
return pass();
299299
}

0 commit comments

Comments
 (0)