mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-10 14:57:14 +00:00
Fix symbol mangling in the presence of trailing version numbers.
This commit is contained in:
parent
79ed1f2df4
commit
1c1af99052
@ -466,6 +466,14 @@ fn sanitize(s: str) -> str {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Underscore-qualify anything that didn't start as an ident.
|
||||
if result.len() > 0u &&
|
||||
result[0] != '_' as u8 &&
|
||||
! char::is_XID_start(result[0] as char) {
|
||||
ret "_" + result;
|
||||
}
|
||||
|
||||
ret result;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user