Commit Graph

36267 Commits

Author SHA1 Message Date
Jorge Aparicio
351409a622 sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rs 2015-01-03 22:54:18 -05:00
Jorge Aparicio
8c5bb80d9b sed -i -s 's/\bmod}/self}/g' **/*.rs 2015-01-03 22:42:37 -05:00
Jorge Aparicio
56dcbd17fd sed -i -s 's/\bmod,/self,/g' **/*.rs 2015-01-03 22:42:21 -05:00
bors
c6c786671d auto merge of #20490 : japaric/rust/assoc-types, r=aturon
closes #20486 
closes #20474 
closes #20441

[breaking-change]

The `Index[Mut]` traits now have one less input parameter, as the return type of the indexing operation is an associated type. This breaks all existing implementations.

---

binop traits (`Add`, `Sub`, etc) now have an associated type for their return type. Also, the RHS input parameter now defaults to `Self` (except for the `Shl` and `Shr` traits). For example, the `Add` trait now looks like this:

``` rust
trait Add<Rhs=Self> {
    type Output;

    fn add(self, Rhs) -> Self::Output;
}
```

The `Neg` and `Not` traits now also have an associated type for their return type.

This breaks all existing implementations of these traits.

---
Affected traits:

- `Iterator { type Item }`
- `IteratorExt` no input/output types, uses `<Self as Iterator>::Item` in its methods
- `DoubleEndedIterator` no input/output types, uses `<Self as Iterator>::Item` in its methods
- `DoubleEndedIteratorExt` no input/output types, uses `<Self as Iterator>::Item` in its methods
- `RandomAccessIterator` no input/output types
- `ExactSizeIterator` no input/output types, uses `<Self as Iterator>::Item` in its methods

This breaks all the implementations of these traits.
2015-01-04 00:50:59 +00:00
Brian Anderson
e8078c3fed Update guide for Cargo installation 2015-01-03 16:04:04 -08:00
Brian Anderson
ebdf331133 Download from the combined installer 2015-01-03 15:54:37 -08:00
Jorge Aparicio
ce8f748b4c add feature gate to some benchmarks 2015-01-03 17:29:27 -05:00
Tobias Bucher
5de78040a2 Make all integers in the guide i32, implicitely
The guide still needs to talk about integer suffixes.
2015-01-03 23:19:14 +01:00
Jorge Aparicio
9aadbadb93 fix rpass/cfail tests 2015-01-03 16:30:49 -05:00
Jorge Aparicio
6fc92578fe serialize: fix fallout 2015-01-03 16:30:49 -05:00
Jorge Aparicio
4bfaa93978 std: fix fallout 2015-01-03 16:30:49 -05:00
Jorge Aparicio
32dd592d36 collections: fix fallout 2015-01-03 16:30:49 -05:00
Jorge Aparicio
234dc4d4dd core: use assoc types in Index[Mut] 2015-01-03 16:30:48 -05:00
Jorge Aparicio
fc343304af typeck: Index[Mut] traits now have *one* input parameter (not two) 2015-01-03 16:30:48 -05:00
Jorge Aparicio
7d3c5f020e use assoc types in unop traits 2015-01-03 16:29:22 -05:00
Jorge Aparicio
99017f82b6 use assoc types in binop traits 2015-01-03 16:29:19 -05:00
Timon Rapp
15dedb22f6 Fix typo in documentation. 2015-01-03 22:10:53 +01:00
bors
496dc4eae7 auto merge of #19790 : akiss77/rust/aarch64-configure, r=alexcrichton
Preparing AArch64 support, starting work at the build system.
2015-01-03 20:20:48 +00:00
Ivan Petkov
eebe7360de Man page/--help dialog fix
* Running rustc with the --print option will accept "file-names" but
  not "output-file-names"
2015-01-03 11:34:01 -08:00
Brian Anderson
a7a57ca92d rustup: Long lines 2015-01-03 08:29:33 -08:00
Akos Kiss
6e5fb8bd1b Initial version of AArch64 support.
Adds AArch64 knowledge to:
* configure,
* make files,
* sources,
* tests, and
* documentation.
2015-01-03 15:16:10 +00:00
Jorge Aparicio
7095dd0070 core: merge IteratorPairExt into IteratorExt 2015-01-03 09:34:05 -05:00
Jorge Aparicio
6002c13f9b Register new snapshots 2015-01-03 09:34:05 -05:00
Jorge Aparicio
de1446680c core: merge DoubleEndedIteratorExt into IteratorExt 2015-01-03 09:34:05 -05:00
Jorge Aparicio
6c0ad5b564 bench: fix fallout 2015-01-03 09:34:05 -05:00
Jorge Aparicio
91eeb641cd coretest: fix fallout 2015-01-03 09:34:05 -05:00
Jorge Aparicio
4f4ae538ae fix rpass/cfail tests 2015-01-03 09:34:05 -05:00
Jorge Aparicio
3bf24d6b63 test: fix fallout 2015-01-03 09:34:05 -05:00
Jorge Aparicio
ab6b651403 regex_macros: fix fallout 2015-01-03 09:34:05 -05:00
Jorge Aparicio
9dd65dd624 rustc_driver: fix fallout 2015-01-03 09:34:05 -05:00
Jorge Aparicio
964ff83cbc rustc_trans: fix fallout 2015-01-03 09:34:05 -05:00
Jorge Aparicio
274146d650 rustc_typeck: fix fallout 2015-01-03 09:34:05 -05:00
Jorge Aparicio
62ee3f1622 rustc: fix fallout 2015-01-03 09:34:05 -05:00
Jorge Aparicio
6b19a02080 syntax: fix fallout 2015-01-03 09:34:05 -05:00
Jorge Aparicio
6bff9de8ea serialize: fix fallout 2015-01-03 09:34:04 -05:00
Jorge Aparicio
f3333d5e10 regex: fix fallout 2015-01-03 09:34:04 -05:00
Jorge Aparicio
17cf5e8104 fmt_macros: fix fallout 2015-01-03 09:34:04 -05:00
Jorge Aparicio
9d36a2d593 graphviz: fix fallout 2015-01-03 09:34:04 -05:00
Jorge Aparicio
1971a24441 std: fix fallout 2015-01-03 09:34:04 -05:00
Jorge Aparicio
6b116bedaf collections: fix fallout 2015-01-03 09:34:04 -05:00
Jorge Aparicio
8c59ec0488 unicode: fix fallout 2015-01-03 09:34:04 -05:00
Jorge Aparicio
3fdd4b366a rand: fix fallout 2015-01-03 09:34:04 -05:00
Jorge Aparicio
41df05dd0e core: use assoc types in Iterator et al 2015-01-03 09:34:04 -05:00
bors
fe7e285d0c auto merge of #20432 : nikomatsakis/rust/fn-inference-2, r=eddyb
Previously, the borrow mode of each upvar was inferred as part of regionck. This PR moves it into its own separate step. It also employs the `ExprUseVisitor`, further simplifying the code. The eventual goal is to support better inference of `Fn` vs `FnMut` vs `FnOnce` that is not based on the expected type, as well as supporting individual by-move upvars.

r? @eddyb
2015-01-03 14:20:47 +00:00
Niko Matsakis
cbeff8b8b3 "Fallout": Slightly different errors are generated in this edge case. 2015-01-03 07:01:21 -05:00
Niko Matsakis
09a7bc55db Running EUV requires the Copy lang item, so adjust privacy tests. 2015-01-03 07:01:21 -05:00
Niko Matsakis
ecd9c10e1a Move upvar checking into its own pre-pass that occurs before regionck
and which uses EUV. For now, upvar inference is not any smarter than
it ever was, but regionck is simpler because it doesn't have to do as
many things at once.
2015-01-03 07:01:21 -05:00
Niko Matsakis
7474be0660 Make ty::ParameterEnvironment, not ty::ctxt, implement Typer and
`UnboxedClosureTyper`. This requires adding a `tcx` field to
`ParameterEnvironment` but generally simplifies everything since we
only need to pass along an `UnboxedClosureTyper` or `Typer`.
2015-01-03 07:01:21 -05:00
Niko Matsakis
83ef3042de Modify type_known_to_meet_builtin_bound so that it doesn't suppress overflow,
which should always result in an error.

NB. Some of the hunks in this commit rely on a later commit which adds
`tcx` into `param_env` and modifies `ParameterEnvironment` to
implement `Typer`.
2015-01-03 07:01:21 -05:00
Niko Matsakis
429d9cce1b Be more tolerant of errors in EUV so we can run it during typeck. 2015-01-03 07:00:51 -05:00