about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-06-13 19:02:11 +0000
committerbors <bors@rust-lang.org>2014-06-13 19:02:11 +0000
commite7f11f20e5e72a3b22863a9913df94303321a5ce (patch)
treef0190703b6b6281e12629348f68ebf059b6be15a /src/rustllvm/RustWrapper.cpp
parent0422934e243ed57a7662ec878db9d4e01ca5b0f9 (diff)
parent9153d8ad6c8259b3b23187f36dc3d3257a28d91c (diff)
downloadrust-e7f11f20e5e72a3b22863a9913df94303321a5ce.tar.gz
rust-e7f11f20e5e72a3b22863a9913df94303321a5ce.zip
auto merge of #14604 : nikomatsakis/rust/issue-5527-namespace-substs, r=pcwalton
The current setup is to have a single vector of type parameters in
scope at any one time. We then have to concatenate the parameters from
the impl/trait with those of the method. This makes a lot of things
awkward, most notably associated fns ("static fns"). This branch
restructures the substitutions into three distinct namespaces (type,
self, fn). This makes most of the "type parameter management"
trivial. This also sets us up to support UFCS (though I haven't made
any particular changes in that direction in this patch).

Along the way, this patch fixes a few miscellaneous bits of code cleanup:

1. Patch resolve to detect references to out-of-scope type parameters,
   rather than checking for "out of bound" indices during substitution
   (fixes #14603).

2. Move def out of libsyntax into librustc where it belongs. I should have
   moved DefId too, but didn't.
   
3. Permit homogeneous tuples like `(T, T, T)` to be used as fixed-length
   vectors like `[T, ..3]`. This is awfully handy, though public facing.
   I suppose it requires an RFC.

4. Add some missing tests.

cc #5527

r? @pcwalton or @pnkfelix 
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions