File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
branches/auto/src/librustc/middle/trans Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
13
13
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
14
14
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
15
15
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16
- refs/heads/auto: 62989008956e284e6d0c61032ea8b67fbe735338
16
+ refs/heads/auto: a07149b138fc1ff19d8a8510cf703ecb811961fd
17
17
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
18
18
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
19
19
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
Original file line number Diff line number Diff line change @@ -103,8 +103,13 @@ pub fn return_type_is_void(ccx: &CrateContext, ty: ty::t) -> bool {
103
103
ty:: type_is_nil ( ty) || ty:: type_is_bot ( ty) || ty:: type_is_empty ( ccx. tcx , ty)
104
104
}
105
105
106
+ /// Generates a unique symbol based off the name given. This is used to create
107
+ /// unique symbols for things like closures.
106
108
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) ) )
108
113
}
109
114
110
115
pub struct tydesc_info {
You can’t perform that action at this time.
0 commit comments