]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agoImplement new orphan rule that requires that impls of remote traits meet the followin...
Niko Matsakis [Mon, 5 Jan 2015 01:35:06 +0000 (20:35 -0500)]
Implement new orphan rule that requires that impls of remote traits meet the following two criteria:

- the self type includes some local type; and,
- type parameters in the self type must be constrained by a local type.

A type parameter is called *constrained* if it appears in some type-parameter of a local type.

Here are some examples that are accepted. In all of these examples, I
assume that `Foo` is a trait defined in another crate. If `Foo` were
defined in the local crate, then all the examples would be legal.

- `impl Foo for LocalType`
- `impl<T> Foo<T> for LocalType` -- T does not appear in Self, so it is OK
- `impl<T> Foo<T> for LocalType<T>` -- T here is constrained by LocalType
- `impl<T> Foo<T> for (LocalType<T>, T)` -- T here is constrained by LocalType

Here are some illegal examples (again, these examples assume that
`Foo` is not local to the current crate):

- `impl Foo for int` -- the Self type is not local
- `impl<T> Foo for T` -- T appears in Self unconstrained by a local type
- `impl<T> Foo for (LocalType, T)` -- T appears in Self unconstrained by a local type

This is a [breaking-change]. For the time being, you can opt out of
the new rules by placing `#[old_orphan_check]` on the trait (and
enabling the feature gate where the trait is defined). Longer term,
you should restructure your traits to avoid the problem. Usually this
means changing the order of parameters so that the "central" type
parameter is in the `Self` position.

As an example of that refactoring, consider the `BorrowFrom` trait:

```rust
pub trait BorrowFrom<Sized? Owned> for Sized? {
    fn borrow_from(owned: &Owned) -> &Self;
}
```

As defined, this trait is commonly implemented for custom pointer
types, such as `Arc`. Those impls follow the pattern:

```rust
impl<T> BorrowFrom<Arc<T>> for T {...}
```

Unfortunately, this impl is illegal because the self type `T` is not
local to the current crate. Therefore, we are going to change the order of the parameters,
so that `BorrowFrom` becomes `Borrow`:

```rust
pub trait Borrow<Sized? Borrowed> for Sized? {
    fn borrow_from(owned: &Self) -> &Borrowed;
}
```

Now the `Arc` impl is written:

```rust
impl<T> Borrow<T> for Arc<T> { ... }
```

This impl is legal because the self type (`Arc<T>`) is local.

9 years agoauto merge of #20443 : nikomatsakis/rust/autoderef-overloaded-calls, r=pcwalton
bors [Sun, 4 Jan 2015 16:36:41 +0000 (16:36 +0000)]
auto merge of #20443 : nikomatsakis/rust/autoderef-overloaded-calls, r=pcwalton

Use autoderef for call notation. This is consistent in that we now autoderef all postfix operators (`.`, `[]`, and `()`). It also means you can call closures without writing `(*f)()`. Note that this is rebased atop the rollup, so only the final commit is relevant.

r? @pcwalton

9 years agoauto merge of #20437 : ranma42/rust/fix-make-install, r=alexcrichton
bors [Sun, 4 Jan 2015 14:21:08 +0000 (14:21 +0000)]
auto merge of #20437 : ranma42/rust/fix-make-install, r=alexcrichton

After 8b3c67690c4747b9fadfef407e6261524fb03f8a the `make install`
command fails if docs are not disabled through CFG_DISABLE_DOCS,
because now the `install` target uses
../../tmp/dist/$(DOC_PKG_NAME)-$(CFG_BUILD)/install.sh

Instead of explicitly depending on
dist/$(PKG_NAME)-$(CFG_BUILD).tar.gz, the `prepare_[un]install`
targets now depend on `dist-tar-bins`, which packages the appropriate
dist archives depending on the configuration.

9 years agoauto merge of #20393 : japaric/rust/impl-any, r=aturon
bors [Sun, 4 Jan 2015 11:01:04 +0000 (11:01 +0000)]
auto merge of #20393 : japaric/rust/impl-any, r=aturon

Needs a snapshot that contains PR #20385

r? @aturon

9 years agoauto merge of #20462 : alexcrichton/rust/remove-deprecated, r=aturon
bors [Sun, 4 Jan 2015 07:51:06 +0000 (07:51 +0000)]
auto merge of #20462 : alexcrichton/rust/remove-deprecated, r=aturon

This removes a large array of deprecated functionality, regardless of how
recently it was deprecated. The purpose of this commit is to clean out the
standard libraries and compiler for the upcoming alpha release.

Some notable compiler changes were to enable warnings for all now-deprecated
command line arguments (previously the deprecated versions were silently
accepted) as well as removing deriving(Zero) entirely (the trait was removed).

The distribution no longer contains the libtime or libregex_macros crates. Both
of these have been deprecated for some time and are available externally.

9 years agoRemove deprecated functionality
Alex Crichton [Fri, 2 Jan 2015 07:53:35 +0000 (23:53 -0800)]
Remove deprecated functionality

This removes a large array of deprecated functionality, regardless of how
recently it was deprecated. The purpose of this commit is to clean out the
standard libraries and compiler for the upcoming alpha release.

Some notable compiler changes were to enable warnings for all now-deprecated
command line arguments (previously the deprecated versions were silently
accepted) as well as removing deriving(Zero) entirely (the trait was removed).

The distribution no longer contains the libtime or libregex_macros crates. Both
of these have been deprecated for some time and are available externally.

9 years agoauto merge of #20504 : japaric/rust/derive-self, r=alexcrichton
bors [Sun, 4 Jan 2015 04:50:56 +0000 (04:50 +0000)]
auto merge of #20504 : japaric/rust/derive-self, r=alexcrichton

I put the sed scripts in the commits, in case this needs a "rebase".

9 years agoremove `Any[Mut]RefExt` traits in favor of `impl Any`
Jorge Aparicio [Thu, 1 Jan 2015 06:13:08 +0000 (01:13 -0500)]
remove `Any[Mut]RefExt` traits in favor of `impl Any`

9 years agosed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rs
Jorge Aparicio [Sun, 4 Jan 2015 03:54:18 +0000 (22:54 -0500)]
sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rs

9 years agosed -i -s 's/\bmod}/self}/g' **/*.rs
Jorge Aparicio [Sun, 4 Jan 2015 03:42:37 +0000 (22:42 -0500)]
sed -i -s 's/\bmod}/self}/g' **/*.rs

9 years agosed -i -s 's/\bmod,/self,/g' **/*.rs
Jorge Aparicio [Sun, 4 Jan 2015 03:42:21 +0000 (22:42 -0500)]
sed -i -s 's/\bmod,/self,/g' **/*.rs

9 years agoauto merge of #20490 : japaric/rust/assoc-types, r=aturon
bors [Sun, 4 Jan 2015 00:50:59 +0000 (00:50 +0000)]
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.

9 years agoadd feature gate to some benchmarks
Jorge Aparicio [Sat, 3 Jan 2015 22:29:27 +0000 (17:29 -0500)]
add feature gate to some benchmarks

9 years agofix rpass/cfail tests
Jorge Aparicio [Sat, 3 Jan 2015 15:40:36 +0000 (10:40 -0500)]
fix rpass/cfail tests

9 years agoserialize: fix fallout
Jorge Aparicio [Sat, 3 Jan 2015 15:40:26 +0000 (10:40 -0500)]
serialize: fix fallout

9 years agostd: fix fallout
Jorge Aparicio [Sat, 3 Jan 2015 15:40:19 +0000 (10:40 -0500)]
std: fix fallout

9 years agocollections: fix fallout
Jorge Aparicio [Sat, 3 Jan 2015 15:40:10 +0000 (10:40 -0500)]
collections: fix fallout

9 years agocore: use assoc types in `Index[Mut]`
Jorge Aparicio [Sat, 3 Jan 2015 14:46:29 +0000 (09:46 -0500)]
core: use assoc types in `Index[Mut]`

9 years agotypeck: Index[Mut] traits now have *one* input parameter (not two)
Jorge Aparicio [Thu, 1 Jan 2015 02:36:03 +0000 (21:36 -0500)]
typeck: Index[Mut] traits now have *one* input parameter (not two)

9 years agouse assoc types in unop traits
Jorge Aparicio [Sat, 3 Jan 2015 03:56:24 +0000 (22:56 -0500)]
use assoc types in unop traits

9 years agouse assoc types in binop traits
Jorge Aparicio [Wed, 31 Dec 2014 20:45:13 +0000 (15:45 -0500)]
use assoc types in binop traits

9 years agoauto merge of #19790 : akiss77/rust/aarch64-configure, r=alexcrichton
bors [Sat, 3 Jan 2015 20:20:48 +0000 (20:20 +0000)]
auto merge of #19790 : akiss77/rust/aarch64-configure, r=alexcrichton

Preparing AArch64 support, starting work at the build system.

9 years agoInitial version of AArch64 support.
Akos Kiss [Fri, 12 Dec 2014 23:39:27 +0000 (23:39 +0000)]
Initial version of AArch64 support.

Adds AArch64 knowledge to:
* configure,
* make files,
* sources,
* tests, and
* documentation.

9 years agocore: merge IteratorPairExt into IteratorExt
Jorge Aparicio [Sat, 3 Jan 2015 13:19:51 +0000 (08:19 -0500)]
core: merge IteratorPairExt into IteratorExt

9 years agoRegister new snapshots
Jorge Aparicio [Sat, 3 Jan 2015 12:16:22 +0000 (07:16 -0500)]
Register new snapshots

9 years agocore: merge DoubleEndedIteratorExt into IteratorExt
Jorge Aparicio [Sat, 3 Jan 2015 05:28:23 +0000 (00:28 -0500)]
core: merge DoubleEndedIteratorExt into IteratorExt

9 years agobench: fix fallout
Jorge Aparicio [Fri, 2 Jan 2015 19:54:01 +0000 (14:54 -0500)]
bench: fix fallout

9 years agocoretest: fix fallout
Jorge Aparicio [Fri, 2 Jan 2015 19:34:34 +0000 (14:34 -0500)]
coretest: fix fallout

9 years agofix rpass/cfail tests
Jorge Aparicio [Fri, 2 Jan 2015 15:25:54 +0000 (10:25 -0500)]
fix rpass/cfail tests

9 years agotest: fix fallout
Jorge Aparicio [Fri, 2 Jan 2015 13:17:12 +0000 (08:17 -0500)]
test: fix fallout

9 years agoregex_macros: fix fallout
Jorge Aparicio [Fri, 2 Jan 2015 13:16:40 +0000 (08:16 -0500)]
regex_macros: fix fallout

9 years agorustc_driver: fix fallout
Jorge Aparicio [Fri, 2 Jan 2015 13:15:20 +0000 (08:15 -0500)]
rustc_driver: fix fallout

9 years agorustc_trans: fix fallout
Jorge Aparicio [Fri, 2 Jan 2015 04:54:03 +0000 (23:54 -0500)]
rustc_trans: fix fallout

9 years agorustc_typeck: fix fallout
Jorge Aparicio [Fri, 2 Jan 2015 04:44:52 +0000 (23:44 -0500)]
rustc_typeck: fix fallout

9 years agorustc: fix fallout
Jorge Aparicio [Fri, 2 Jan 2015 04:26:38 +0000 (23:26 -0500)]
rustc: fix fallout

9 years agosyntax: fix fallout
Jorge Aparicio [Fri, 2 Jan 2015 03:55:09 +0000 (22:55 -0500)]
syntax: fix fallout

9 years agoserialize: fix fallout
Jorge Aparicio [Fri, 2 Jan 2015 03:45:11 +0000 (22:45 -0500)]
serialize: fix fallout

9 years agoregex: fix fallout
Jorge Aparicio [Fri, 2 Jan 2015 03:38:05 +0000 (22:38 -0500)]
regex: fix fallout

9 years agofmt_macros: fix fallout
Jorge Aparicio [Fri, 2 Jan 2015 03:36:34 +0000 (22:36 -0500)]
fmt_macros: fix fallout

9 years agographviz: fix fallout
Jorge Aparicio [Fri, 2 Jan 2015 03:36:08 +0000 (22:36 -0500)]
graphviz: fix fallout

9 years agostd: fix fallout
Jorge Aparicio [Fri, 2 Jan 2015 03:33:39 +0000 (22:33 -0500)]
std: fix fallout

9 years agocollections: fix fallout
Jorge Aparicio [Fri, 2 Jan 2015 04:15:35 +0000 (23:15 -0500)]
collections: fix fallout

9 years agounicode: fix fallout
Jorge Aparicio [Fri, 2 Jan 2015 04:19:06 +0000 (23:19 -0500)]
unicode: fix fallout

9 years agorand: fix fallout
Jorge Aparicio [Fri, 2 Jan 2015 04:16:49 +0000 (23:16 -0500)]
rand: fix fallout

9 years agocore: use assoc types in Iterator et al
Jorge Aparicio [Mon, 29 Dec 2014 21:18:41 +0000 (16:18 -0500)]
core: use assoc types in Iterator et al

9 years agoauto merge of #20432 : nikomatsakis/rust/fn-inference-2, r=eddyb
bors [Sat, 3 Jan 2015 14:20:47 +0000 (14:20 +0000)]
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

9 years ago"Fallout": Slightly different errors are generated in this edge case.
Niko Matsakis [Fri, 2 Jan 2015 09:15:00 +0000 (04:15 -0500)]
"Fallout": Slightly different errors are generated in this edge case.

9 years agoRunning EUV requires the Copy lang item, so adjust privacy tests.
Niko Matsakis [Fri, 2 Jan 2015 09:14:21 +0000 (04:14 -0500)]
Running EUV requires the Copy lang item, so adjust privacy tests.

9 years agoMove upvar checking into its own pre-pass that occurs before regionck
Niko Matsakis [Fri, 2 Jan 2015 09:12:25 +0000 (04:12 -0500)]
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.

9 years agoMake `ty::ParameterEnvironment`, not `ty::ctxt`, implement `Typer` and
Niko Matsakis [Fri, 2 Jan 2015 09:09:35 +0000 (04:09 -0500)]
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`.

9 years agoModify `type_known_to_meet_builtin_bound` so that it doesn't suppress overflow,
Niko Matsakis [Fri, 2 Jan 2015 09:01:30 +0000 (04:01 -0500)]
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`.

9 years agoBe more tolerant of errors in EUV so we can run it during typeck.
Niko Matsakis [Fri, 2 Jan 2015 08:57:50 +0000 (03:57 -0500)]
Be more tolerant of errors in EUV so we can run it during typeck.

9 years agoStop calling `bug()` in various weird cases and instead generate `Err()`.
Niko Matsakis [Fri, 2 Jan 2015 08:54:45 +0000 (03:54 -0500)]
Stop calling `bug()` in various weird cases and instead generate `Err()`.

9 years agoRe-introduce `McResult<>` as a way of aborting mem-categorization (and
Niko Matsakis [Fri, 2 Jan 2015 08:51:49 +0000 (03:51 -0500)]
Re-introduce `McResult<>` as a way of aborting mem-categorization (and
expr-use-visitor) early.  Turns out I was wrong to remove this; it
causes a lot of pain trying to run EUV etc during typeck without
ICEing on erroneous programs.

9 years agoFix `make install` dependencies
Andrea Canciani [Fri, 2 Jan 2015 19:33:04 +0000 (20:33 +0100)]
Fix `make install` dependencies

After 8b3c67690c4747b9fadfef407e6261524fb03f8a the `make install`
command fails if docs are not disabled through CFG_DISABLE_DOCS,
because now the `install` target uses
../../tmp/dist/$(DOC_PKG_NAME)-$(CFG_BUILD)/install.sh

In 714a2c678c5a5d1fdb9d6de3d515279120305441 the `prepare_install`
target wwas changed to conditionally depend also on the doc archive,
but did not modify `prepare_uninstall`.

Instead of explicitly depending on
dist/$(PKG_NAME)-$(CFG_BUILD).tar.gz, the `prepare_[un]install`
targets now depend on `dist-tar-bins`, which packages the appropriate
dist archives depending on the configuration.

9 years agoauto merge of #20456 : brson/rust/packaging2, r=alexcrichton
bors [Sat, 3 Jan 2015 05:35:17 +0000 (05:35 +0000)]
auto merge of #20456 : brson/rust/packaging2, r=alexcrichton

9 years agoRemove .pkg and .exe installers
Brian Anderson [Sat, 3 Jan 2015 04:44:07 +0000 (20:44 -0800)]
Remove .pkg and .exe installers

9 years agoauto merge of #20154 : P1start/rust/qualified-assoc-type-generics, r=nikomatsakis
bors [Sat, 3 Jan 2015 03:25:21 +0000 (03:25 +0000)]
auto merge of #20154 : P1start/rust/qualified-assoc-type-generics, r=nikomatsakis

This modifies `Parser::eat_lt` to always split up `<<`s, instead of doing so only when a lifetime name followed or the `force` parameter (now removed) was `true`. This is because `Foo<<TYPE` is now a valid start to a type, whereas previously only `Foo<<LIFETIME` was valid.

This is a [breaking-change]. Change code that looks like this:

```rust
let x = foo as bar << 13;
```

to use parentheses, like this:

```rust
let x = (foo as bar) << 13;
```

Closes #17362.

9 years agoMake call notation use autoderef. Fixes #18742.
Niko Matsakis [Fri, 2 Jan 2015 20:30:26 +0000 (15:30 -0500)]
Make call notation use autoderef. Fixes #18742.

9 years agoauto merge of #19835 : pythonesque/rust/add-unordered-intrinsic, r=thestinger
bors [Sat, 3 Jan 2015 01:10:40 +0000 (01:10 +0000)]
auto merge of #19835 : pythonesque/rust/add-unordered-intrinsic, r=thestinger

This corresponds to the JMM memory model's non-volatile reads and writes to shared variables.  It provides fairly weak guarantees, but prevents UB (specifically, you will never see a value that was not written _at some point_ to the provided location).  It is not part of the C++ memory model and is only legal to provide to LLVM for loads and stores (not fences, atomicrmw, etc.).

Valid uses of this ordering are things like racy counters where you don't care about the operation actually being atomic, just want to avoid UB.  It cannot be used for synchronization without additional memory barriers since unordered loads and stores may be reordered freely by the optimizer (this is the main way it differs from relaxed).

Because it is new to Rust and it provides so few guarantees, for now only the intrinsic is provided--this patch doesn't add it to any of the higher-level atomic wrappers.

9 years agoauto merge of #20436 : alexcrichton/rust/rollup, r=alexcrichton
bors [Fri, 2 Jan 2015 21:56:13 +0000 (21:56 +0000)]
auto merge of #20436 : alexcrichton/rust/rollup, r=alexcrichton

9 years agorollup merge of #20410: japaric/assoc-types
Alex Crichton [Fri, 2 Jan 2015 20:16:41 +0000 (12:16 -0800)]
rollup merge of #20410: japaric/assoc-types

Conflicts:
src/liballoc/lib.rs
src/libcollections/lib.rs
src/libcollections/slice.rs
src/libcore/ops.rs
src/libcore/prelude.rs
src/libcore/ptr.rs
src/librustc/middle/traits/project.rs
src/libstd/c_str.rs
src/libstd/io/mem.rs
src/libstd/io/mod.rs
src/libstd/lib.rs
src/libstd/path/posix.rs
src/libstd/path/windows.rs
src/libstd/prelude.rs
src/libstd/rt/exclusive.rs
src/libsyntax/lib.rs
src/test/compile-fail/issue-18566.rs
src/test/run-pass/deref-mut-on-ref.rs
src/test/run-pass/deref-on-ref.rs
src/test/run-pass/dst-deref-mut.rs
src/test/run-pass/dst-deref.rs
src/test/run-pass/fixup-deref-mut.rs
src/test/run-pass/issue-13264.rs
src/test/run-pass/overloaded-autoderef-indexing.rs

9 years agomk: Change package name from 'rust' to 'rustc'
Brian Anderson [Fri, 2 Jan 2015 21:36:51 +0000 (13:36 -0800)]
mk: Change package name from 'rust' to 'rustc'

9 years agoRebase test fixes v2
Alex Crichton [Fri, 2 Jan 2015 20:05:24 +0000 (12:05 -0800)]
Rebase test fixes v2

9 years agofix rpass test with s/Output/Target/g
Jorge Aparicio [Fri, 2 Jan 2015 19:23:46 +0000 (14:23 -0500)]
fix rpass test with s/Output/Target/g

9 years agoHandle recursive obligations without exiting the inference probe
Niko Matsakis [Fri, 2 Jan 2015 18:59:32 +0000 (13:59 -0500)]
Handle recursive obligations without exiting the inference probe

Conflicts:
src/librustc/middle/traits/select.rs

9 years agoTemporarily do not evaluate subobligations.
Niko Matsakis [Fri, 2 Jan 2015 18:22:45 +0000 (13:22 -0500)]
Temporarily do not evaluate subobligations.

9 years agoEvaluate projection predicates during trait selection. Fixes #20296.
Niko Matsakis [Fri, 2 Jan 2015 16:39:47 +0000 (11:39 -0500)]
Evaluate projection predicates during trait selection. Fixes #20296.

9 years agorollup merge of #20341: nikomatsakis/impl-trait-for-trait-2
Alex Crichton [Fri, 2 Jan 2015 18:58:10 +0000 (10:58 -0800)]
rollup merge of #20341: nikomatsakis/impl-trait-for-trait-2

Conflicts:
src/librustc/middle/traits/mod.rs
src/libstd/io/mod.rs
src/test/run-pass/builtin-superkinds-self-type.rs

9 years agoRollup test fixes and rebase conflicts
Alex Crichton [Fri, 2 Jan 2015 17:24:56 +0000 (09:24 -0800)]
Rollup test fixes and rebase conflicts

9 years agoMerge remote-tracking branch 'origin/master' into rollup
Alex Crichton [Fri, 2 Jan 2015 18:50:07 +0000 (10:50 -0800)]
Merge remote-tracking branch 'origin/master' into rollup

Conflicts:
src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs

9 years agorollup merge of #20425: sanxiyn/opt-local-ty
Alex Crichton [Fri, 2 Jan 2015 17:23:47 +0000 (09:23 -0800)]
rollup merge of #20425: sanxiyn/opt-local-ty

This avoids having ast::Ty nodes which have no counterpart in the source.

9 years agorollup merge of #20416: nikomatsakis/coherence
Alex Crichton [Fri, 2 Jan 2015 17:23:42 +0000 (09:23 -0800)]
rollup merge of #20416: nikomatsakis/coherence

Conflicts:
src/test/run-pass/issue-15734.rs
src/test/run-pass/issue-3743.rs

9 years agorollup merge of #20407: michaelwoerister/unreachable-locals
Alex Crichton [Fri, 2 Jan 2015 17:22:50 +0000 (09:22 -0800)]
rollup merge of #20407: michaelwoerister/unreachable-locals

Fixes #20312

9 years agorollup merge of #20404: japaric/at-tests
Alex Crichton [Fri, 2 Jan 2015 17:22:47 +0000 (09:22 -0800)]
rollup merge of #20404: japaric/at-tests

Closes #17732
Closes #18819
Closes #19479
Closes #19631
Closes #19632
Closes #19850
Closes #19883
Closes #20005
Closes #20009
Closes #20389

---

cc @nikomatsakis @sfackler

9 years agorollup merge of #20392: daramos/travis
Alex Crichton [Fri, 2 Jan 2015 17:22:44 +0000 (09:22 -0800)]
rollup merge of #20392: daramos/travis

Travis recently launched their new infrastructure on Amazon EC2 with improved resources. The only limitation is that they don't support sudo. http://blog.travis-ci.com/2014-12-17-faster-builds-with-container-based-infrastructure/
I couldn't find anywhere where the build system uses sudo so I don't think that limitation affects rust builds.
This change drops the current `make tidy` times [slightly](https://travis-ci.org/daramos/rust/builds)(travis-test branch).

9 years agorollup merge of #20391: daramos/utf8_lossy
Alex Crichton [Fri, 2 Jan 2015 17:22:42 +0000 (09:22 -0800)]
rollup merge of #20391: daramos/utf8_lossy

Prior to 9bae6ec828fdc7f87838ee008cccef90e31b9f84 from_utf8_lossy had a minor optimization in place that avoided having to loop from the beginning of the input slice.
Recently 4908017d59da8694b9ceaf743baf1163c1e19086 implemented Utf8Error::InvalidByte which makes this possible again.

9 years agorollup merge of #20388: brson/install-tweaks
Alex Crichton [Fri, 2 Jan 2015 17:22:40 +0000 (09:22 -0800)]
rollup merge of #20388: brson/install-tweaks

r? @alexcrichton

9 years agorollup merge of #20386: frewsxcv/rm-reexports
Alex Crichton [Fri, 2 Jan 2015 17:22:37 +0000 (09:22 -0800)]
rollup merge of #20386: frewsxcv/rm-reexports

Part of #19253

[breaking-change]

9 years agorollup merge of #20385: nick29581/x-object
Alex Crichton [Fri, 2 Jan 2015 17:22:35 +0000 (09:22 -0800)]
rollup merge of #20385: nick29581/x-object

Closes #19056

9 years agorollup merge of #20380: dcrewi/fix-make-install
Alex Crichton [Fri, 2 Jan 2015 17:22:22 +0000 (09:22 -0800)]
rollup merge of #20380: dcrewi/fix-make-install

There seems to be a problem introduced by
8b3c67690c4747b9fadfef407e6261524fb03f8a that causes "make install"
to fail when the build is not configured to skip doc building.

9 years agorollup merge of #20334: nagisa/ffi-llvm
Alex Crichton [Fri, 2 Jan 2015 17:22:18 +0000 (09:22 -0800)]
rollup merge of #20334: nagisa/ffi-llvm

Fixes #20313

r? @huonw

9 years agorollup merge of #20227: FlashYoshi/patch-1
Alex Crichton [Fri, 2 Jan 2015 17:22:15 +0000 (09:22 -0800)]
rollup merge of #20227: FlashYoshi/patch-1

9 years agorollup merge of #19625: mrhota/guide_traits
Alex Crichton [Fri, 2 Jan 2015 17:22:10 +0000 (09:22 -0800)]
rollup merge of #19625: mrhota/guide_traits

Nothing major. Clarification, copy-editing, typographical and grammatical consistency

9 years agoDo not ICE when projecting out of a value with type `ty::ty_err`
Niko Matsakis [Fri, 2 Jan 2015 09:20:34 +0000 (04:20 -0500)]
Do not ICE when projecting out of a value with type `ty::ty_err`

9 years agocore: use assoc types in `Deref[Mut]`
Jorge Aparicio [Thu, 1 Jan 2015 19:53:20 +0000 (14:53 -0500)]
core: use assoc types in `Deref[Mut]`

9 years agorollup merge of #20354: alexcrichton/second-pass-thread_local
Alex Crichton [Fri, 2 Jan 2015 17:19:45 +0000 (09:19 -0800)]
rollup merge of #20354: alexcrichton/second-pass-thread_local

Conflicts:
src/libstd/sys/common/thread_info.rs

9 years agorollup merge of #20315: alexcrichton/std-sync
Alex Crichton [Fri, 2 Jan 2015 17:19:00 +0000 (09:19 -0800)]
rollup merge of #20315: alexcrichton/std-sync

Conflicts:
src/libstd/rt/exclusive.rs
src/libstd/sync/barrier.rs
src/libstd/sys/unix/pipe.rs
src/test/bench/shootout-binarytrees.rs
src/test/bench/shootout-fannkuch-redux.rs

9 years agorollup merge of #20420: alexcrichton/second-pass-boxed
Alex Crichton [Fri, 2 Jan 2015 17:17:08 +0000 (09:17 -0800)]
rollup merge of #20420: alexcrichton/second-pass-boxed

9 years agorollup merge of #20382: alexcrichton/isuse-20376
Alex Crichton [Fri, 2 Jan 2015 17:16:47 +0000 (09:16 -0800)]
rollup merge of #20382: alexcrichton/isuse-20376

9 years agorollup merge of #20377: alexcrichton/issue-20352
Alex Crichton [Fri, 2 Jan 2015 17:16:26 +0000 (09:16 -0800)]
rollup merge of #20377: alexcrichton/issue-20352

9 years agorollup merge of #20273: alexcrichton/second-pass-comm
Alex Crichton [Fri, 2 Jan 2015 17:15:54 +0000 (09:15 -0800)]
rollup merge of #20273: alexcrichton/second-pass-comm

Conflicts:
src/doc/guide.md
src/libcollections/bit.rs
src/libcollections/btree/node.rs
src/libcollections/slice.rs
src/libcore/ops.rs
src/libcore/prelude.rs
src/librand/rand_impls.rs
src/librustc/middle/check_match.rs
src/librustc/middle/infer/region_inference/mod.rs
src/librustc_driver/lib.rs
src/librustdoc/test.rs
src/libstd/bitflags.rs
src/libstd/io/comm_adapters.rs
src/libstd/io/mem.rs
src/libstd/io/mod.rs
src/libstd/io/net/pipe.rs
src/libstd/io/net/tcp.rs
src/libstd/io/net/udp.rs
src/libstd/io/pipe.rs
src/libstd/io/process.rs
src/libstd/io/stdio.rs
src/libstd/io/timer.rs
src/libstd/io/util.rs
src/libstd/macros.rs
src/libstd/os.rs
src/libstd/path/posix.rs
src/libstd/path/windows.rs
src/libstd/prelude/v1.rs
src/libstd/rand/mod.rs
src/libstd/rand/os.rs
src/libstd/sync/barrier.rs
src/libstd/sync/condvar.rs
src/libstd/sync/future.rs
src/libstd/sync/mpsc/mod.rs
src/libstd/sync/mpsc/mpsc_queue.rs
src/libstd/sync/mpsc/select.rs
src/libstd/sync/mpsc/spsc_queue.rs
src/libstd/sync/mutex.rs
src/libstd/sync/once.rs
src/libstd/sync/rwlock.rs
src/libstd/sync/semaphore.rs
src/libstd/sync/task_pool.rs
src/libstd/sys/common/helper_thread.rs
src/libstd/sys/unix/process.rs
src/libstd/sys/unix/timer.rs
src/libstd/sys/windows/c.rs
src/libstd/sys/windows/timer.rs
src/libstd/sys/windows/tty.rs
src/libstd/thread.rs
src/libstd/thread_local/mod.rs
src/libstd/thread_local/scoped.rs
src/libtest/lib.rs
src/test/auxiliary/cci_capture_clause.rs
src/test/bench/shootout-reverse-complement.rs
src/test/bench/shootout-spectralnorm.rs
src/test/compile-fail/array-old-syntax-2.rs
src/test/compile-fail/bind-by-move-no-guards.rs
src/test/compile-fail/builtin-superkinds-self-type.rs
src/test/compile-fail/comm-not-freeze-receiver.rs
src/test/compile-fail/comm-not-freeze.rs
src/test/compile-fail/issue-12041.rs
src/test/compile-fail/unsendable-class.rs
src/test/run-pass/builtin-superkinds-capabilities-transitive.rs
src/test/run-pass/builtin-superkinds-capabilities-xc.rs
src/test/run-pass/builtin-superkinds-capabilities.rs
src/test/run-pass/builtin-superkinds-self-type.rs
src/test/run-pass/capturing-logging.rs
src/test/run-pass/closure-bounds-can-capture-chan.rs
src/test/run-pass/comm.rs
src/test/run-pass/core-run-destroy.rs
src/test/run-pass/drop-trait-enum.rs
src/test/run-pass/hashmap-memory.rs
src/test/run-pass/issue-13494.rs
src/test/run-pass/issue-3609.rs
src/test/run-pass/issue-4446.rs
src/test/run-pass/issue-4448.rs
src/test/run-pass/issue-8827.rs
src/test/run-pass/issue-9396.rs
src/test/run-pass/ivec-tag.rs
src/test/run-pass/rust-log-filter.rs
src/test/run-pass/send-resource.rs
src/test/run-pass/send-type-inference.rs
src/test/run-pass/sendable-class.rs
src/test/run-pass/spawn-types.rs
src/test/run-pass/task-comm-0.rs
src/test/run-pass/task-comm-10.rs
src/test/run-pass/task-comm-11.rs
src/test/run-pass/task-comm-13.rs
src/test/run-pass/task-comm-14.rs
src/test/run-pass/task-comm-15.rs
src/test/run-pass/task-comm-16.rs
src/test/run-pass/task-comm-3.rs
src/test/run-pass/task-comm-4.rs
src/test/run-pass/task-comm-5.rs
src/test/run-pass/task-comm-6.rs
src/test/run-pass/task-comm-7.rs
src/test/run-pass/task-comm-9.rs
src/test/run-pass/task-comm-chan-nil.rs
src/test/run-pass/task-spawn-move-and-copy.rs
src/test/run-pass/task-stderr.rs
src/test/run-pass/tcp-accept-stress.rs
src/test/run-pass/tcp-connect-timeouts.rs
src/test/run-pass/tempfile.rs
src/test/run-pass/trait-bounds-in-arc.rs
src/test/run-pass/trivial-message.rs
src/test/run-pass/unique-send-2.rs
src/test/run-pass/unique-send.rs
src/test/run-pass/unwind-resource.rs

9 years agoAddress nits.
Niko Matsakis [Fri, 2 Jan 2015 10:34:49 +0000 (05:34 -0500)]
Address nits.

9 years agoTest that we can call unboxed closures with the sugar now. Fixes #16929.
Niko Matsakis [Sun, 28 Dec 2014 21:45:56 +0000 (16:45 -0500)]
Test that we can call unboxed closures with the sugar now. Fixes #16929.

9 years agoEnsure that, for every trait `Foo`, the predicate `Foo : Foo` holds.
Niko Matsakis [Tue, 23 Dec 2014 10:26:34 +0000 (05:26 -0500)]
Ensure that, for every trait `Foo`, the predicate `Foo : Foo` holds.

9 years agoRefactor object-safety into its own (cached) module so that we can
Niko Matsakis [Tue, 16 Dec 2014 02:11:09 +0000 (21:11 -0500)]
Refactor object-safety into its own (cached) module so that we can
check it more easily; also extend object safety to cover sized types
as well as static methods.  This makes it sufficient so that we can
always ensure that `Foo : Foo` holds for any trait `Foo`.

9 years agoMove the `upcast` routine into traits and use it for method selection; also
Niko Matsakis [Sat, 20 Dec 2014 14:15:52 +0000 (09:15 -0500)]
Move the `upcast` routine into traits and use it for method selection; also
move get_method_index into traits and give it a better name (`get_vtable_index_of_object_method`).

9 years agoDo not automatically make `Self` `Sized` in traits.
Niko Matsakis [Thu, 18 Dec 2014 20:28:00 +0000 (15:28 -0500)]
Do not automatically make `Self` `Sized` in traits.

9 years agoFix fallout in tests.
Niko Matsakis [Fri, 19 Dec 2014 11:54:09 +0000 (06:54 -0500)]
Fix fallout in tests.

9 years agorustdoc: fix rendering of associated types
Corey Richardson [Fri, 2 Jan 2015 13:26:55 +0000 (08:26 -0500)]
rustdoc: fix rendering of associated types