rust/src
bors 880fb89bde Auto merge of #22512 - nikomatsakis:issue-20300-where-clause-not-bounds, r=nikomatsakis
This is a fix for #20300 though as a side-sweep it fixes a number of stack overflows because it integrates cycle detection into the conversion process. I didn't go through and retest everything.

The tricky part here is that in some cases we have to go find the information we need from the AST -- we can't use the converted form of the where-clauses because we often have to handle something like `T::Item` *while converting the where-clauses themselves*. Since this is also not a fixed-point process we can't just try and keep trying to find the best order. So instead I modified the `AstConv` interface to allow you to request the bounds for a type parameter; we'll then do a secondary scan of the where-clauses to figure out what we need. This may create a cycle in some cases, but we have code to catch that.

Another approach that is NOT taken by this PR would be to "convert" `T::Item` into a form that does not specify what trait it's using. This then kind of defers the problem of picking the trait till later. That might be a good idea, but it would make normalization and everything else much harder, so I'm holding off on that (and hoping to find a better way for handling things like `i32::T`).

This PR also removes "most of" the `bounds` struct from `TypeParameterDef`. Still a little ways to go before `ParamBounds` can be removed entirely -- it's used for supertraits, for example (though those really ought to be converted, I think, to a call to `get_type_parameter_bounds` on `Self` from within the trait definition).

cc @jroesch 

Fixes #20300
2015-02-25 04:28:23 +00:00
..
compiler-rt@58ab642c30
compiletest
doc Rollup merge of #22473 - leejunseok:fix_pointer_example, r=steveklabnik 2015-02-24 12:08:35 +05:30
driver
etc
grammar
jemalloc@b001609960
liballoc import boxed for alloc/rc.rs (fixup #22696) 2015-02-23 11:43:59 -08:00
libarena
libbacktrace
libcollections Fix fallout from correct stability handling in UFCS. 2015-02-24 14:16:02 +02:00
libcore core: fix typo that wasn't caught by the hacky previous implementation. 2015-02-24 14:16:01 +02:00
libcoretest
libflate
libfmt_macros
libgetopts
libgraphviz
liblibc
liblog Rollup merge of #22696 - stepancheg:use-box, r=alexcrichton 2015-02-23 23:28:49 +05:30
librand
librbml
librustc Add handy switch -Z treat-err-as-bug -- it often happens that I am 2015-02-24 16:27:23 -05:00
librustc_back Implement <T>::method UFCS expression syntax. 2015-02-24 14:16:02 +02:00
librustc_bitflags
librustc_borrowck Rollup merge of #22580 - pnkfelix:guard-pat-cfg2, r=pnkfelix 2015-02-24 12:08:35 +05:30
librustc_driver rustc: combine partial_def_map and last_private_map into def_map. 2015-02-24 14:16:02 +02:00
librustc_llvm
librustc_privacy Fix fallout from correct stability handling in UFCS. 2015-02-24 14:16:02 +02:00
librustc_resolve Fix fallout from rebasing. 2015-02-24 14:16:02 +02:00
librustc_trans Auto merge of #22530 - rprichard:master, r=dotdash 2015-02-24 20:57:31 +00:00
librustc_typeck Merge conflicts due to eddyb's UFCS branch 2015-02-24 16:27:23 -05:00
librustdoc Remove bounds struct from TypeParameterDef. Bounds information is now 2015-02-24 16:27:22 -05:00
libserialize
libstd Auto merge of #22749 - kballard:process-stdio-constructors, r=alexcrichton 2015-02-24 15:01:28 +00:00
libsyntax syntax: update pretty-printer for the <T>::method shorthand. 2015-02-24 14:16:03 +02:00
libterm
libtest
libunicode
llvm@b89c3f039b
rt
rust-installer@60fd8abfca
rustbook
rustllvm
test Auto merge of #22512 - nikomatsakis:issue-20300-where-clause-not-bounds, r=nikomatsakis 2015-02-25 04:28:23 +00:00
snapshots.txt