提交 b9286a71 编写于 作者: P Patrick Walton

rustc: Sanitize names better. Puts out burning tinderbox on OS X.

上级 5cbf8889
......@@ -404,8 +404,20 @@ fn sanitize(str s) -> str {
if (c == ('@' as u8)) {
result += "boxed_";
} else {
auto v = vec(c);
result += _str.from_bytes(v);
if (c == (',' as u8)) {
result += "_";
} else {
if (c == ('{' as u8) || c == ('(' as u8)) {
result += "_of_";
} else {
if (c != 10u8 && c != ('}' as u8) && c != (')' as u8) &&
c != (' ' as u8) && c != ('\t' as u8) &&
c != (';' as u8)) {
auto v = vec(c);
result += _str.from_bytes(v);
}
}
}
}
}
ret result;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册