]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #30863 - jseyfried:no_rc, r=eddyb
authorManish Goregaokar <manishsmail@gmail.com>
Wed, 13 Jan 2016 22:52:20 +0000 (04:22 +0530)
committerManish Goregaokar <manishsmail@gmail.com>
Thu, 14 Jan 2016 05:34:43 +0000 (11:04 +0530)
Use arena allocation instead of reference counting for `Module`s to fix memory leaks from `Rc` cycles.

A module references its module children and its import resolutions, and an import resolution references the module defining the imported name, so there is a cycle whenever a module imports something from an ancestor module.

For example,
```rust
mod foo { // `foo` references `bar`.
    fn baz() {}
    mod bar { // `bar` references the import.
        use foo::baz; // The import references `foo`.
    }
}
```

1  2 
mk/crates.mk

diff --cc mk/crates.mk
Simple merge