rustc: Sanitize names better. Puts out burning tinderbox on OS X.
This commit is contained in:
parent
5cbf8889d0
commit
b9286a7179
1 changed files with 14 additions and 2 deletions
|
@ -404,8 +404,20 @@ fn sanitize(str s) -> str {
|
||||||
if (c == ('@' as u8)) {
|
if (c == ('@' as u8)) {
|
||||||
result += "boxed_";
|
result += "boxed_";
|
||||||
} else {
|
} else {
|
||||||
auto v = vec(c);
|
if (c == (',' as u8)) {
|
||||||
result += _str.from_bytes(v);
|
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;
|
ret result;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue