When handling
fn foo() {
fn zed(bar z) {
}
tag bar {
nil;
}
fn baz() {
zed(nil);
}
}
we currently do two passes in trans.rs. The first pass collects the tags
so that they can be used when collecting zed.
One way to avoid this is to have ty_tag point to the tag item. The
problem if we do that is that we get a cycle:
item_tag -> vec[variant]
variant -> ann
ann -> middle.ty.t (ty_tag)
middle.ty.t -> item_tag
so we would have to make one of the links mutable :-(
Do you guys think it is worth it? Which link do you prefer? Maybe you
have another idea to avoid the multiple passes without introducing the
cycle?
Thanks,
Rafael
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev