Commit Graph

39411 Commits

Author SHA1 Message Date
Niko Matsakis
9bb3b3772d Add rustc_attrs feature to test. 2015-02-18 15:24:20 -05:00
Niko Matsakis
a994a99ec4 Always prefer where-clauses over impls in trait selection. Fixes #22110. 2015-02-18 15:23:34 -05:00
Niko Matsakis
2939e483fd Extend the implicator so it produces general obligations and also so
that it produces "outlives" relations for associated types. Add
several tests relating to #22246.
2015-02-18 15:23:34 -05:00
Niko Matsakis
5511add742 traits: break apart the "full normalization" code used for normalizing
parameter environments so that it can be used elsewhere.
2015-02-18 15:23:34 -05:00
Niko Matsakis
7134ad4d64 Move tcx from Typer into ClosureTyper 2015-02-18 15:23:34 -05:00
Niko Matsakis
e84a719e37 Misc. cleanup in regionck: Remove a one-variant enum for some reason. 2015-02-18 15:23:34 -05:00
Niko Matsakis
48c70d6863 Replace assert_no_late_bound_regions with
`no_late_bound_regions().unwrap()`, which allows us to write code that
doesn't necessarily *fail* when there are higher-ranked trait bounds.
2015-02-18 15:23:34 -05:00
Niko Matsakis
92d65ab2e9 Rename various things to "implications" 2015-02-18 15:23:33 -05:00
Niko Matsakis
df92fe3c96 Rename regionmanip to implicator. 2015-02-18 15:23:33 -05:00
Niko Matsakis
811c48fe22 For now, accept the i, u, is, and us suffixes, but warn when
they are used without a feature-gate. This is both kinder to existing
code and should make it easier to land this PR, since we don't
have to catch EVERY SINGLE SUFFIX.
2015-02-18 15:08:40 -05:00
Simonas Kazlauskas
a36fc2d66c Fix inconsistent spacing of collapse all button 2015-02-18 21:38:32 +02:00
Simonas Kazlauskas
204e2bd442 Style all docblock links properly
Fixes #22493
2015-02-18 21:37:48 +02:00
Alexis
66613e26b9 make FromIterator use IntoIterator
This breaks all implementors of FromIterator, as they must now accept IntoIterator instead of Iterator. The fix for this is generally trivial (change the bound, and maybe call into_iter() on the argument to get the old argument).

Users of FromIterator should be unaffected because Iterators are IntoIterator.

[breaking-change]
2015-02-18 14:01:47 -05:00
Alexis
4a9d190423 make Extend use IntoIterator
This breaks all implementors of Extend, as they must now accept IntoIterator instead of Iterator. The fix for this is generally trivial (change the bound, and maybe call into_iter() on the argument to get the old argument).

Users of Extend should be unaffected because Iterators are IntoIterator.

[breaking-change]
2015-02-18 14:01:47 -05:00
Aaron Turon
5fa9de16df Implement RFC 580
This commit implements RFC 580 by renaming:

* DList -> LinkedList
* Bitv -> BitVec
* BitvSet -> BitSet
* RingBuf -> VecDeque

More details are in [the
RFC](https://github.com/rust-lang/rfcs/pull/580)

[breaking-change]
2015-02-18 14:01:46 -05:00
Alex Crichton
f83e23ad7c std: Stabilize the hash module
This commit is an implementation of [RFC 823][rfc] which is another pass over
the `std::hash` module for stabilization. The contents of the module were not
entirely marked stable, but some portions which remained quite similar to the
previous incarnation are now marked `#[stable]`. Specifically:

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0823-hash-simplification.md

* `std::hash` is now stable (the name)
* `Hash` is now stable
* `Hash::hash` is now stable
* `Hasher` is now stable
* `SipHasher` is now stable
* `SipHasher::new` and `new_with_keys` are now stable
* `Hasher for SipHasher` is now stable
* Many `Hash` implementations are now stable

All other portions of the `hash` module remain `#[unstable]` as they are less
commonly used and were recently redesigned.

This commit is a breaking change due to the modifications to the `std::hash` API
and more details can be found on the [RFC][rfc].

Closes #22467
[breaking-change]
2015-02-18 08:26:20 -08:00
Niko Matsakis
e8cb11c7e3 Missing test. 2015-02-18 10:38:25 -05:00
Niko Matsakis
d179bb56b0 Add regression test for #20533. Fixes #20533. 2015-02-18 10:38:25 -05:00
Niko Matsakis
df76442c99 Fallout: Accepter trait needs phantomdata. This seems like it should
be migrated to an associated type anyway.
2015-02-18 10:38:25 -05:00
Niko Matsakis
6f2a1c9467 Fallout: add phantomdata to hash 2015-02-18 10:38:25 -05:00
Niko Matsakis
ae7c534d04 Fallout: port hashmap to use Unique 2015-02-18 10:38:25 -05:00
Niko Matsakis
9e0bb528a4 Fallout: add phantomdata for 'a in path 2015-02-18 10:38:25 -05:00
Niko Matsakis
1ed5842829 Fallout: extend thread with phantomdata for 'a lifetime 2015-02-18 10:26:49 -05:00
Niko Matsakis
62b517772a Fallout: add phantom data to the type inferencer 2015-02-18 10:25:29 -05:00
Niko Matsakis
199b992e63 Fallout: add phantom data to librand 2015-02-18 10:25:28 -05:00
Niko Matsakis
2953710d26 Fallout: port libflate to new Unique API 2015-02-18 10:25:28 -05:00
Niko Matsakis
aaf4176f0f Fallout: Port slice to use PhantomData instead of ContravariantLifetime 2015-02-18 10:25:28 -05:00
Niko Matsakis
60f507be45 Fallout: remove unused type and region parameters. 2015-02-18 10:25:28 -05:00
Niko Matsakis
872ce47955 Fallout: tests. As tests frequently elide things, lots of changes
here.  Some of this may have been poorly rebased, though I tried to be
careful and preserve the spirit of the test.
2015-02-18 10:25:28 -05:00
Niko Matsakis
ef42c2befd Fallout: docs, elided examples often elided too much. 2015-02-18 10:25:13 -05:00
Niko Matsakis
d801a4da7c Fallout: iter, add markers or other changes such that all type parameters are used. 2015-02-18 10:25:12 -05:00
Niko Matsakis
1735e41d1c Fallout: AtomicPtr needs phantom data to indicate that it contains an unsafe pointer. 2015-02-18 10:25:12 -05:00
Niko Matsakis
2bcf3a4cd1 Fallout: arena needs to use phantomdata since invariantlifetime is gone 2015-02-18 10:25:12 -05:00
Niko Matsakis
8dbdcdbfb3 Fallout: RingBuf, use Unique. 2015-02-18 10:25:12 -05:00
Niko Matsakis
c2891cc487 Fallout: EnumSet, add Marker. 2015-02-18 10:25:12 -05:00
Niko Matsakis
68ebe640b6 Fallout: port btree to use Unique, some markers. 2015-02-18 10:25:12 -05:00
Niko Matsakis
b3c00a69f2 Fallout: btree. Rephrase invariant lifetime in terms of PhantomData. 2015-02-18 10:25:12 -05:00
Niko Matsakis
c5579ca340 Fallout: Port Vec to use Unique 2015-02-18 10:25:12 -05:00
Niko Matsakis
f2529ac10d Constrain operands to outlive the operation. Fixes #21422. 2015-02-18 10:25:12 -05:00
Niko Matsakis
801bc48939 Rewrite Unique<T> so that it is covariant in T, implies NonZero and ownership,
and also follows the API of `NonZero` a bit more closely. More to do
here I think (including perhaps a new name).
2015-02-18 10:25:12 -05:00
Niko Matsakis
8c841f2a31 Extend coherence check to understand subtyping. 2015-02-18 10:24:55 -05:00
Niko Matsakis
91eedfe18b Report errors for type parameters that are not constrained, either by
variance or an associated type.
2015-02-18 10:24:55 -05:00
Niko Matsakis
2594d56e32 Introduce the new phantomdata/phantomfn markers and integrate them
into variance inference; fix various bugs in variance inference
so that it considers the correct set of constraints; modify infer to
consider the results of variance inference for type arguments.
2015-02-18 10:24:55 -05:00
Niko Matsakis
362d713026 Fix remaining bench/debuginfo tests (and a few stragglers) 2015-02-18 09:11:02 -05:00
Niko Matsakis
72eb214ee4 Update suffixes en masse in tests using perl -p -i -e 2015-02-18 09:10:10 -05:00
Niko Matsakis
8c34b26606 Update docs by dropping suffixes except where they served to instruct. 2015-02-18 09:09:14 -05:00
Niko Matsakis
1f4ee20dda Tweak pretty printing. 2015-02-18 09:09:13 -05:00
Niko Matsakis
01615b04c6 Convert required suffixes into a use of as. 2015-02-18 09:09:13 -05:00
Niko Matsakis
2b5720a15f Remove i, is, u, or us suffixes that are not necessary. 2015-02-18 09:09:12 -05:00
Niko Matsakis
700c518f2a Modify parser to require isize/usize suffixes. 2015-02-18 09:07:56 -05:00