Commit Graph

10 Commits

Author SHA1 Message Date
Ulrik Sverdrup
836f32e769 Use vec![elt; n] where possible
The common pattern `iter::repeat(elt).take(n).collect::<Vec<_>>()` is
exactly equivalent to `vec![elt; n]`, do this replacement in the whole
tree.

(Actually, vec![] is smart enough to only call clone n - 1 times, while
the former solution would call clone n times, and this fact is
virtually irrelevant in practice.)
2015-07-09 11:05:32 +02:00
Niko Matsakis
29c86539b3 Expand the "givens" set to cover transitive relations. The givens array
stores relationships like `'c <= '0` (where `'c` is a free region and
`'0` is an inference variable) that are derived from closure
arguments. These are (rather hackily) ignored for purposes of inference,
preventing spurious errors. The current code did not handle transitive
cases like `'c <= '0` and `'0 <= '1`. Fixes #24085.
2015-06-19 12:22:03 -04:00
Johannes Oertel
07cc7d9960 Change name of unit test sub-module to "tests".
Changes the style guidelines regarding unit tests to recommend using a
sub-module named "tests" instead of "test" for unit tests as "test"
might clash with imports of libtest.
2015-04-24 23:06:41 +02:00
Brian Anderson
bb407b1e9d Make stability attributes an error. #22830 2015-04-20 17:33:31 -07:00
Niko Matsakis
e47fb489c1 Address nits 2015-04-17 10:12:55 -04:00
Niko Matsakis
65ccffd224 Add licenses. 2015-04-17 10:12:55 -04:00
Niko Matsakis
416f388c6f Port to use the new Unify code, which has no UnifyValue trait
but is otherwise mostly the same.
2015-04-17 10:12:55 -04:00
Niko Matsakis
7ab0d1ab67 Port to using the newer graph, which offers iterators instead of the
older `each` method, but is otherwise identical.
2015-04-17 10:12:55 -04:00
Niko Matsakis
52c3462586 Use the newer snapshot_vec, which has a simplified delegate
interface since in practice no delegates had any state.
2015-04-17 10:12:55 -04:00
Niko Matsakis
966e53d8b6 Add librustc_data_structures crate 2015-04-17 10:12:53 -04:00