Skip to content

Commit 67a8355

Browse files
committed
---
yaml --- r: 105962 b: refs/heads/auto c: a07149b h: refs/heads/master v: v3
1 parent de92771 commit 67a8355

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 62989008956e284e6d0c61032ea8b67fbe735338
16+
refs/heads/auto: a07149b138fc1ff19d8a8510cf703ecb811961fd
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/librustc/middle/trans/common.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,13 @@ pub fn return_type_is_void(ccx: &CrateContext, ty: ty::t) -> bool {
103103
ty::type_is_nil(ty) || ty::type_is_bot(ty) || ty::type_is_empty(ccx.tcx, ty)
104104
}
105105

106+
/// Generates a unique symbol based off the name given. This is used to create
107+
/// unique symbols for things like closures.
106108
pub fn gensym_name(name: &str) -> PathElem {
107-
PathName(token::gensym(name))
109+
let num = token::gensym(name);
110+
// use one colon which will get translated to a period by the mangler, and
111+
// we're guaranteed that `num` is globally unique for this crate.
112+
PathName(token::gensym(format!("{}:{}", name, num)))
108113
}
109114

110115
pub struct tydesc_info {

0 commit comments

Comments
 (0)