rust/src/librustc_trans/trans
bors 47b8479e73 auto merge of #20363 : japaric/rust/moar-uc, r=nmatsakis
The the last argument of the `ItemDecorator::expand` method has changed to `Box<FnMut>`. Syntax extensions will break.

[breaking-change]

---

This PR removes pretty much all the remaining uses of boxed closures from the libraries. There are still boxed closures under the `test` directory, but I think those should be removed or replaced with unboxed closures at the same time we remove boxed closures from the language.

In a few places I had to do some contortions (see the first commit for an example) to work around issue #19596. I have marked those workarounds with FIXMEs. In the future when `&mut F where F: FnMut` implements the `FnMut` trait, we should be able to remove those workarounds. I've take care to avoid placing the workaround functions in the public API.

Since `let f = || {}` always gets type checked as a boxed closure, I have explictly annotated those closures (with e.g. `|&:| {}`) to force the compiler to type check them as unboxed closures.

Instead of removing the type aliases (like `GetCrateDataCb`), I could have replaced them with newtypes. But this seemed like overcomplicating things for little to no gain.

I think we should be able to remove the boxed closures from the languge after this PR lands. (I'm being optimistic here)

r? @alexcrichton or @aturon 
cc @nikomatsakis
2015-01-01 04:01:02 +00:00
..
_match.rs rustc_trans: replace EnterPatterns alias with an unboxed closure 2014-12-31 22:50:27 -05:00
adt.rs
asm.rs
base.rs rustc_trans: unbox closures used in let bindings 2014-12-31 22:50:27 -05:00
basic_block.rs
build.rs
builder.rs
cabi_arm.rs
cabi_mips.rs
cabi_x86_64.rs Fallout from stabilization 2014-12-30 17:06:08 -08:00
cabi_x86_win64.rs
cabi_x86.rs
cabi.rs
callee.rs
cleanup.rs
closure.rs rollup merge of #20217: luqmana/pc 2014-12-30 16:25:58 -08:00
common.rs Teach trans to drain fulfillment context. japaric encountered problems 2014-12-31 14:42:06 -05:00
consts.rs rustc_trans: unbox closures used in let bindings 2014-12-31 22:50:27 -05:00
context.rs
controlflow.rs
datum.rs
debuginfo.rs rustc_trans: unbox closures used in let bindings 2014-12-31 22:50:27 -05:00
doc.rs
expr.rs rustc_trans: unbox closures used in function arguments 2014-12-31 22:50:26 -05:00
foreign.rs rustc_trans: unbox closures used in let bindings 2014-12-31 22:50:27 -05:00
glue.rs
inline.rs
intrinsic.rs rustc_trans: unbox closures used in let bindings 2014-12-31 22:50:27 -05:00
llrepr.rs
machine.rs
macros.rs
meth.rs Remove the AssocSpace 2014-12-30 09:36:23 -05:00
mod.rs
monomorphize.rs auto merge of #20363 : japaric/rust/moar-uc, r=nmatsakis 2015-01-01 04:01:02 +00:00
tvec.rs
type_.rs Fallout from stabilization 2014-12-30 17:06:08 -08:00
type_of.rs
value.rs