]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agorollup merge of #21702: nikomatsakis/issue-21636
Alex Crichton [Fri, 30 Jan 2015 20:02:56 +0000 (12:02 -0800)]
rollup merge of #21702: nikomatsakis/issue-21636

Check and extract bindings from trait definitions.

Fixes #21636.

r? @nick29581

9 years agorollup merge of #21693: tomjakubowski/rustdoc-fix-21442
Alex Crichton [Fri, 30 Jan 2015 20:02:55 +0000 (12:02 -0800)]
rollup merge of #21693: tomjakubowski/rustdoc-fix-21442

Fix #21442

9 years agorollup merge of #21678: vojtechkral/threads-native-names
Alex Crichton [Fri, 30 Jan 2015 20:02:53 +0000 (12:02 -0800)]
rollup merge of #21678: vojtechkral/threads-native-names

Fixes #10302

I really am not sure I'm doing this right, so here goes nothing...

Also testing this isn't easy. I don't have any other *nix boxes besides a Linux one.

Test code:

```rust
use std::thread;
use std::io::timer::sleep;
use std::time::duration::Duration;

fn make_thread<'a>(i: i64) -> thread::JoinGuard<'a, ()>
{
thread::Builder::new().name(format!("MyThread{}", i).to_string()).scoped(move ||
{
println!("Start: {}", i);
sleep(Duration::seconds(i));
println!("End: {}", i);
})
}

fn main()
{
let mut guards = vec![make_thread(3)];

for i in 4i64..16
{
guards.push(make_thread(i));
}
}
```

GDB output on my machine:

```
(gdb) info threads
  Id   Target Id         Frame
  15   Thread 0x7fdfbb35f700 (LWP 23575) "MyThread3" 0x00007fdfbbe35a8d in nanosleep () from /usr/lib/libpthread.so.0
  14   Thread 0x7fdfba7ff700 (LWP 23576) "MyThread4" 0x00007fdfbbe35a8d in nanosleep () from /usr/lib/libpthread.so.0
  13   Thread 0x7fdfba5fe700 (LWP 23577) "MyThread5" 0x00007fdfbbe35a8d in nanosleep () from /usr/lib/libpthread.so.0
  12   Thread 0x7fdfba3fd700 (LWP 23578) "MyThread6" 0x00007fdfbbe35a8d in nanosleep () from /usr/lib/libpthread.so.0
  11   Thread 0x7fdfb8dfe700 (LWP 23580) "MyThread4" 0x00007fdfbb746193 in select () from /usr/lib/libc.so.6
  10   Thread 0x7fdfb8fff700 (LWP 23579) "MyThread7" 0x00007fdfbbe35a8d in nanosleep () from /usr/lib/libpthread.so.0
  9    Thread 0x7fdfb8bfd700 (LWP 23581) "MyThread8" 0x00007fdfbbe35a8d in nanosleep () from /usr/lib/libpthread.so.0
  8    Thread 0x7fdfb3fff700 (LWP 23582) "MyThread9" 0x00007fdfbbe35a8d in nanosleep () from /usr/lib/libpthread.so.0
  7    Thread 0x7fdfb3dfe700 (LWP 23583) "MyThread10" 0x00007fdfbbe35a8d in nanosleep () from /usr/lib/libpthread.so.0
  6    Thread 0x7fdfb3bfd700 (LWP 23584) "MyThread11" 0x00007fdfbbe35a8d in nanosleep () from /usr/lib/libpthread.so.0
  5    Thread 0x7fdfb2bff700 (LWP 23585) "MyThread12" 0x00007fdfbbe35a8d in nanosleep () from /usr/lib/libpthread.so.0
  4    Thread 0x7fdfb29fe700 (LWP 23586) "MyThread13" 0x00007fdfbbe35a8d in nanosleep () from /usr/lib/libpthread.so.0
  3    Thread 0x7fdfb27fd700 (LWP 23587) "MyThread14" 0x00007fdfbbe35a8d in nanosleep () from /usr/lib/libpthread.so.0
  2    Thread 0x7fdfb1bff700 (LWP 23588) "MyThread15" 0x00007fdfbbe35a8d in nanosleep () from /usr/lib/libpthread.so.0
* 1    Thread 0x7fdfbc411800 (LWP 23574) "threads" 0x00007fdfbbe2e505 in pthread_join () from /usr/lib/libpthread.so.0
```
(I'm not sure why one of the threads is duplicated, but it does that without my patch too...)

9 years agorollup merge of #21495: richo/unexported-unmangled-lint
Alex Crichton [Fri, 30 Jan 2015 20:02:51 +0000 (12:02 -0800)]
rollup merge of #21495: richo/unexported-unmangled-lint

The usecase is that functions made visible to systems outside of the
rust ecosystem require the symbol to be visible.

This adds a lint for functions that are not exported, but also not mangled.

It has some gotchas:

[ ]: There is fallout in core that needs taking care of
[ ]: I'm not convinced the error message is correct
[ ]: It has no tests

~~However, there's an underlying issue which I'd like feedback on- which is that my belief that that non-pub functions would not have their symbols exported, however that seems not to be the case in the first case that this lint turned up in rustc (`rust_fail`), which intuition suggests has been working.~~

This seems to be a separate bug in rust, wherein the symbols are exported in binaries, but not in rlibs or dylibs. This lint would catch that case.

9 years agorollup merge of #21494: jatinn/jsnav
Alex Crichton [Fri, 30 Jan 2015 20:02:48 +0000 (12:02 -0800)]
rollup merge of #21494: jatinn/jsnav

Added javascript code to insert next/prev links in the rust book.
Related Issue - https://github.com/rust-lang/rust/issues/20835

9 years agorollup merge of #21385: nick29581/save-fix2
Alex Crichton [Fri, 30 Jan 2015 20:02:46 +0000 (12:02 -0800)]
rollup merge of #21385: nick29581/save-fix2

r? @huonw

9 years agorollup merge of #20790: japaric/for-loops
Alex Crichton [Fri, 30 Jan 2015 20:02:44 +0000 (12:02 -0800)]
rollup merge of #20790: japaric/for-loops

As per [RFC #235][rfc], you can now do:

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0235-collections-conventions.md#intoiterator-and-iterable

``` rust
let mut v = vec![1];

// iterate over immutable references
for x in &v {
    assert_eq!(x, &1);
}

// iterate over mutable references
for x in &mut v {
    assert_eq!(x, &mut 1);
}

// iterate over values, this consumes `v`
for x in v {
    assert_eq!(x, 1);
}
```

[breaking-change]s

For loops now "consume" (move) the iterator, this breaks iterating over mutable references to iterators, and also breaks multiple iterations over the same iterator:

``` rust
fn foo(mut it: &mut Iter) {  // `Iter` implements `Iterator`
    for x in it { .. }  //~ error: `&mut Iter` doesn't implement Iterator
}

fn bar() {
    for x in it { .. }  //~ note: `it` moved here
    for x in it { .. }  //~ error: `it` has been moved
}
```

Both cases can be fixed using the `by_ref()` adapter to create an iterator from the mutable reference:

``` rust
fn foo(mut it: &mut Iter) {
    for x in it.by_ref() { .. }
}

fn bar() {
    for x in it.by_ref() { .. }
    for x in it { .. }
}
```

This PR also makes iterator non-implicitly copyable, as this was source of subtle bugs in the libraries. You can still use `clone()` to explictly copy the iterator.

Finally, since the for loops are implemented in the frontend and use global paths to `IntoIterator`, `Iterator` and `Option` variants, users of the `core` crate will have to use add an `std` module to the root of their crate to be able to use for loops:

``` rust
#![no_std]

extern crate core;

fn main() {
    for x in 0..10 {}
}

#[doc(hidden)]
mod std {
    // these imports are needed to use for-loops
    pub use core::iter;
    pub use core::option;
}
```

---

r? @nikomatsakis @aturon
cc #18424
closes #18045

9 years agofix some cfail tests
Jorge Aparicio [Fri, 30 Jan 2015 15:51:34 +0000 (10:51 -0500)]
fix some cfail tests

9 years agofixes after rebase
Jorge Aparicio [Wed, 28 Jan 2015 20:47:06 +0000 (15:47 -0500)]
fixes after rebase

9 years agos/while let/for/g now that #21245 has been fixed
Jorge Aparicio [Wed, 28 Jan 2015 02:50:33 +0000 (21:50 -0500)]
s/while let/for/g now that #21245 has been fixed

9 years agoadd test for #21655
Jorge Aparicio [Mon, 26 Jan 2015 15:11:54 +0000 (10:11 -0500)]
add test for #21655

closes #21655

9 years agoadd test for #20605
Jorge Aparicio [Mon, 26 Jan 2015 15:10:33 +0000 (10:10 -0500)]
add test for #20605

closes #20605
closes #20989 (duplicate)
closes #21379 (duplicate)

9 years agofix recursive call
Jorge Aparicio [Mon, 26 Jan 2015 15:00:52 +0000 (10:00 -0500)]
fix recursive call

9 years agoremove the `Iterator` lang item
Jorge Aparicio [Fri, 23 Jan 2015 18:18:20 +0000 (13:18 -0500)]
remove the `Iterator` lang item

9 years agosmoke out remaining bugs
Jorge Aparicio [Fri, 23 Jan 2015 18:16:03 +0000 (13:16 -0500)]
smoke out remaining bugs

9 years agoremove Copy impls from iterators
Jorge Aparicio [Fri, 23 Jan 2015 15:54:32 +0000 (10:54 -0500)]
remove Copy impls from iterators

9 years agoadd tests
Jorge Aparicio [Fri, 23 Jan 2015 02:50:11 +0000 (21:50 -0500)]
add tests

9 years agoremove dead code
Jorge Aparicio [Thu, 22 Jan 2015 21:59:23 +0000 (16:59 -0500)]
remove dead code

9 years agoremove more `ExprForLoop`s
Jorge Aparicio [Thu, 22 Jan 2015 23:59:00 +0000 (18:59 -0500)]
remove more `ExprForLoop`s

9 years agocustom message for refutable patterns in for loops
Jorge Aparicio [Thu, 22 Jan 2015 22:46:40 +0000 (17:46 -0500)]
custom message for refutable patterns in for loops

9 years agofix tests
Jorge Aparicio [Fri, 23 Jan 2015 01:08:56 +0000 (20:08 -0500)]
fix tests

9 years agofix fallout
Jorge Aparicio [Sun, 11 Jan 2015 02:50:07 +0000 (21:50 -0500)]
fix fallout

9 years agoimplement for loop desugaring
Jorge Aparicio [Thu, 8 Jan 2015 23:04:26 +0000 (18:04 -0500)]
implement for loop desugaring

9 years agocore: add the `IntoIterator` trait
Jorge Aparicio [Thu, 8 Jan 2015 03:01:05 +0000 (22:01 -0500)]
core: add the `IntoIterator` trait

9 years agoAuto merge of #21717 - nick29581:prelude-fullrange, r=acrichto
bors [Fri, 30 Jan 2015 12:43:41 +0000 (12:43 +0000)]
Auto merge of #21717 - nick29581:prelude-fullrange, r=acrichto

r? @alexcrichton

9 years agolint: Add test for no_mangle
Richo Healey [Thu, 29 Jan 2015 07:21:56 +0000 (23:21 -0800)]
lint: Add test for no_mangle

9 years agoAuto merge of #21351 - eddyb:x-coerce--a-new-hope, r=nikomatsakis
bors [Fri, 30 Jan 2015 07:57:14 +0000 (07:57 +0000)]
Auto merge of #21351 - eddyb:x-coerce--a-new-hope, r=nikomatsakis

Coercions will now attempt to autoderef as needed before reborrowing.
This includes overloaded `Deref`, e.g. `&Rc<T>` coerces to `&T`, and
`DerefMut`, e.g. `&mut Vec<T>` coerces to `&mut [T]` (in addition to `&[T]`).
Closes #21432.

9 years agort: allow unexported functions
Richo Healey [Wed, 28 Jan 2015 06:24:17 +0000 (22:24 -0800)]
rt: allow unexported functions

rust_panic is unexported, however the metadata exported will usually
include it for attaching breakpoints.

9 years agolint: warn about #[no_mangle] fns that aren't exported
Richo Healey [Wed, 21 Jan 2015 20:07:03 +0000 (12:07 -0800)]
lint: warn about #[no_mangle] fns that aren't exported

The usecase is that functions made visible to systems outside of the
rust ecosystem require the symbol to be visible.

9 years agoChange from core::ops::RangeFull to std::ops
Nick Cameron [Wed, 28 Jan 2015 05:16:00 +0000 (18:16 +1300)]
Change from core::ops::RangeFull to std::ops

9 years agoRename FullRange to RangeFull
Nick Cameron [Wed, 28 Jan 2015 04:06:46 +0000 (17:06 +1300)]
Rename FullRange to RangeFull

9 years agoRemove FullRange from the prelude etc.
Nick Cameron [Wed, 28 Jan 2015 01:54:25 +0000 (14:54 +1300)]
Remove FullRange from the prelude etc.

9 years agoUse absolute path to FullRange, rather than assuming it is in the prelude
Nick Cameron [Wed, 28 Jan 2015 01:27:28 +0000 (14:27 +1300)]
Use absolute path to FullRange, rather than assuming it is in the prelude

Closes #21263

[breaking-change]

If you are using `core::ops::FullRange` you should change to using `core::ops::RangeFull`

9 years agoReview changes
Nick Cameron [Wed, 28 Jan 2015 20:52:19 +0000 (09:52 +1300)]
Review changes

9 years agoMake the save-analysis smoke test more thorough
Nick Cameron [Tue, 20 Jan 2015 20:28:04 +0000 (09:28 +1300)]
Make the save-analysis smoke test more thorough

9 years agosave-anlaysis: misc bug fixes
Nick Cameron [Tue, 20 Jan 2015 20:15:37 +0000 (09:15 +1300)]
save-anlaysis: misc bug fixes

In particular, handling of struct literals where the struct name is a type alias, and tuple indexing.

Plus some other stuff.

9 years agosave-analysis: handle absolute paths properly
Nick Cameron [Mon, 19 Jan 2015 04:36:13 +0000 (17:36 +1300)]
save-analysis: handle absolute paths properly

9 years agosave-analysis: Use the correct span for `extern crate`
Nick Cameron [Mon, 19 Jan 2015 01:04:46 +0000 (14:04 +1300)]
save-analysis: Use the correct span for `extern crate`

9 years agosave-analysis: don't include the crate name in fully qualified paths
Nick Cameron [Fri, 16 Jan 2015 09:57:53 +0000 (22:57 +1300)]
save-analysis: don't include the crate name in fully qualified paths

9 years agoAuto merge of #21692 - pnkfelix:fsk-fix-coerce-match-20055, r=eddyb
bors [Thu, 29 Jan 2015 22:54:19 +0000 (22:54 +0000)]
Auto merge of #21692 - pnkfelix:fsk-fix-coerce-match-20055, r=eddyb

trans: When coercing to `Box<Trait>` or `Box<[T]>`, leave datum in it's original L-/R-value state.

This fixes a subtle issue where temporaries were being allocated (but not necessarily initialized) to the (parent) terminating scope of a match expression; in particular, the code to zero out the temporary emitted by `datum.store_to` is only attached to the particular match-arm for that temporary, but when going down other arms of the match expression, the temporary may falsely appear to have been initialized, depending on what the stack held at that location, and thus may have its destructor erroneously run at the end of the terminating scope.

FIx #20055.

(There may be a latent bug still remaining in `fn into_fat_ptr`, but I am so annoyed by the test/run-pass/coerce_match.rs failures that I want to land this now.)

9 years agoImplement deref coercions (rust-lang/rfcs#241).
Eduard Burtescu [Thu, 29 Jan 2015 10:17:51 +0000 (12:17 +0200)]
Implement deref coercions (rust-lang/rfcs#241).

9 years agorustc_typeck: cleanup coercion logic that has been obsolete/unused for a while now.
Eduard Burtescu [Sun, 18 Jan 2015 09:20:29 +0000 (11:20 +0200)]
rustc_typeck: cleanup coercion logic that has been obsolete/unused for a while now.

9 years agorustc_typeck: use FnCtxt in coercion, instead of mimicking a combiner.
Eduard Burtescu [Sat, 17 Jan 2015 20:44:42 +0000 (22:44 +0200)]
rustc_typeck: use FnCtxt in coercion, instead of mimicking a combiner.

9 years agorustc: move infer::coercion to rustc_typeck.
Eduard Burtescu [Fri, 16 Jan 2015 03:48:15 +0000 (05:48 +0200)]
rustc: move infer::coercion to rustc_typeck.

9 years agoAuto merge of #21691 - edwardw:double-closure, r=nikomatsakis
bors [Thu, 29 Jan 2015 19:36:03 +0000 (19:36 +0000)]
Auto merge of #21691 - edwardw:double-closure, r=nikomatsakis

It was considered to be impossible but actually it can
happen for nested closures. Also, because there must
be nested closures when this happens, we can use more
targeted help message.

Closes #21390
Closes #21600

9 years agorustdoc: Render new `self` syntax in `use`
Tom Jakubowski [Tue, 27 Jan 2015 17:26:52 +0000 (09:26 -0800)]
rustdoc: Render new `self` syntax in `use`

Fix #21442

9 years agoAuto merge of #21677 - japaric:no-range, r=alexcrichton
bors [Thu, 29 Jan 2015 16:28:52 +0000 (16:28 +0000)]
Auto merge of #21677 - japaric:no-range, r=alexcrichton

Note: Do not merge until we get a newer snapshot that includes #21374

There was some type inference fallout (see 4th commit) because type inference with `a..b` is not as good as with `range(a, b)` (see #21672).

r? @alexcrichton

9 years agobring back `#[derive(Show)]` with a deprecation warning
Jorge Aparicio [Wed, 28 Jan 2015 17:43:16 +0000 (12:43 -0500)]
bring back `#[derive(Show)]` with a deprecation warning

9 years agofix import in cfail test
Jorge Aparicio [Wed, 28 Jan 2015 15:47:19 +0000 (10:47 -0500)]
fix import in cfail test

9 years agos/Show/Debug/g
Jorge Aparicio [Wed, 28 Jan 2015 13:34:18 +0000 (08:34 -0500)]
s/Show/Debug/g

9 years agoremove #[old_impl_check] now that #21363 has been fixed
Jorge Aparicio [Wed, 28 Jan 2015 13:18:40 +0000 (08:18 -0500)]
remove #[old_impl_check] now that #21363 has been fixed

9 years agoregister snaphots
Jorge Aparicio [Wed, 28 Jan 2015 13:13:31 +0000 (08:13 -0500)]
register snaphots

9 years agoundo some conversions
Jorge Aparicio [Tue, 27 Jan 2015 00:10:24 +0000 (19:10 -0500)]
undo some conversions

9 years agoremove unused imports
Jorge Aparicio [Tue, 27 Jan 2015 00:09:58 +0000 (19:09 -0500)]
remove unused imports

9 years agofix inference fallout
Jorge Aparicio [Tue, 27 Jan 2015 00:08:22 +0000 (19:08 -0500)]
fix inference fallout

9 years agoconvert remaining `range(a, b)` to `a..b`
Jorge Aparicio [Mon, 26 Jan 2015 21:05:07 +0000 (16:05 -0500)]
convert remaining `range(a, b)` to `a..b`

9 years ago`for x in range(a, b)` -> `for x in a..b`
Jorge Aparicio [Mon, 26 Jan 2015 20:46:12 +0000 (15:46 -0500)]
`for x in range(a, b)` -> `for x in a..b`

sed -i 's/in range(\([^,]*\), *\([^()]*\))/in \1\.\.\2/g' **/*.rs

9 years ago`range(a, b).foo()` -> `(a..b).foo()`
Jorge Aparicio [Mon, 26 Jan 2015 20:44:22 +0000 (15:44 -0500)]
`range(a, b).foo()` -> `(a..b).foo()`

sed -i 's/ range(\([^,]*\), *\([^()]*\))\./ (\1\.\.\2)\./g' **/*.rs

9 years agoAuto merge of #21730 - Manishearth:rollup, r=alexcrichton
bors [Thu, 29 Jan 2015 11:28:30 +0000 (11:28 +0000)]
Auto merge of #21730 - Manishearth:rollup, r=alexcrichton

Should clear our backlog of rollups from the queue

9 years agoAuto merge of #21680 - japaric:slice, r=alexcrichton
bors [Thu, 29 Jan 2015 05:47:21 +0000 (05:47 +0000)]
Auto merge of #21680 - japaric:slice, r=alexcrichton

Replaces `slice_*` method calls with slicing syntax, and removes `as_slice()` calls that are redundant due to `Deref`.

9 years agoAuto merge of #21522 - nikomatsakis:assoc-type-ice-hunt-take-3, r=nick29581
bors [Wed, 28 Jan 2015 21:49:38 +0000 (21:49 +0000)]
Auto merge of #21522 - nikomatsakis:assoc-type-ice-hunt-take-3, r=nick29581

Do not propagate the region requirements on the projected type to the input types it is being projected from.

Fixes #21520.

r? @aturon

9 years agoRollup merge of 21643 - semarie:break-local_stage0, r=brson
Manish Goregaokar [Wed, 28 Jan 2015 21:47:16 +0000 (03:17 +0530)]
Rollup merge of 21643 - semarie:break-local_stage0, r=brson

9 years agoRollup merge of 21651 - nelsonjchen:add--webkit-overflow-scrolling-touch-to-book...
Manish Goregaokar [Wed, 28 Jan 2015 21:46:52 +0000 (03:16 +0530)]
Rollup merge of 21651 - nelsonjchen:add--webkit-overflow-scrolling-touch-to-book-css, r=alexcrichton

9 years agoRollup merge of 21654 - FlaPer87:unify-impls, r=alexcrichton
Manish Goregaokar [Wed, 28 Jan 2015 21:46:25 +0000 (03:16 +0530)]
Rollup merge of 21654 - FlaPer87:unify-impls, r=alexcrichton

9 years agoRollup merge of 21662 - oli-obk:hashmap_enum_json, r=alexcrichton
Manish Goregaokar [Wed, 28 Jan 2015 21:45:51 +0000 (03:15 +0530)]
Rollup merge of 21662 - oli-obk:hashmap_enum_json, r=alexcrichton

9 years agoRollup merge of 21663 - tbu-:pr_doc_cell_static_safety, r=alexcrichton
Manish Goregaokar [Wed, 28 Jan 2015 21:45:25 +0000 (03:15 +0530)]
Rollup merge of 21663 - tbu-:pr_doc_cell_static_safety, r=alexcrichton

9 years agoRollup merge of 21671 - akiss77:pr-aarch64-fastisel0, r=alexcrichton
Manish Goregaokar [Wed, 28 Jan 2015 21:44:58 +0000 (03:14 +0530)]
Rollup merge of 21671 - akiss77:pr-aarch64-fastisel0, r=alexcrichton

9 years agoRollup merge of 21681 - japaric:no-warn, r=alexcrichton
Manish Goregaokar [Wed, 28 Jan 2015 21:44:35 +0000 (03:14 +0530)]
Rollup merge of 21681 - japaric:no-warn, r=alexcrichton

9 years agoRollup merge of 21708 - brson:internals, r=huonw
Manish Goregaokar [Wed, 28 Jan 2015 21:43:53 +0000 (03:13 +0530)]
Rollup merge of 21708 - brson:internals, r=huonw

9 years agoRollup merge of 21711 - thepowersgang:patch-1, r=alexcrichton
Manish Goregaokar [Wed, 28 Jan 2015 21:41:48 +0000 (03:11 +0530)]
Rollup merge of 21711 - thepowersgang:patch-1, r=alexcrichton

9 years agoRollup merge of 21722 - orpheuslummis:patch-1, r=Gankro
Manish Goregaokar [Wed, 28 Jan 2015 21:41:12 +0000 (03:11 +0530)]
Rollup merge of 21722 - orpheuslummis:patch-1, r=Gankro

9 years agoRollup merge of #21640 - retep998:rmdir, r=alexcrichton
Manish Goregaokar [Wed, 28 Jan 2015 21:34:10 +0000 (03:04 +0530)]
Rollup merge of #21640 - retep998:rmdir, r=alexcrichton

`_wrmdir` is literally just a wrapper around `RemoveDirectoryW`, so let's just use `RemoveDirectoryW`.
r? @alexcrichton

9 years agoRollup merge of #21626 - Ms2ger:various-cleanup, r=eddyb
Manish Goregaokar [Wed, 28 Jan 2015 21:34:09 +0000 (03:04 +0530)]
Rollup merge of #21626 - Ms2ger:various-cleanup, r=eddyb

9 years agoAuto merge of #21698 - Manishearth:rollup, r=alexcrichton
bors [Wed, 28 Jan 2015 18:55:24 +0000 (18:55 +0000)]
Auto merge of #21698 - Manishearth:rollup, r=alexcrichton

This should work now.

9 years agoMerge remote-tracking branch 'origin/master' into rollup
Manish Goregaokar [Wed, 28 Jan 2015 17:33:36 +0000 (23:03 +0530)]
Merge remote-tracking branch 'origin/master' into rollup

Conflicts:
src/libcollections/slice.rs
src/libcore/nonzero.rs
src/libcore/ops.rs

9 years agoThread native name setting, fix #10302
Vojtech Kral [Wed, 28 Jan 2015 15:52:53 +0000 (16:52 +0100)]
Thread native name setting, fix #10302

9 years agoCorrect Orpheus Lummis's email and name
Orpheus Lummis [Wed, 28 Jan 2015 15:04:56 +0000 (10:04 -0500)]
Correct Orpheus Lummis's email and name

New email address, stylization of name.

9 years agoThread native name setting, fix #10302
Vojtech Kral [Wed, 28 Jan 2015 13:01:14 +0000 (14:01 +0100)]
Thread native name setting, fix #10302

9 years agoThread native name setting, fix #10302
Vojtech Kral [Wed, 28 Jan 2015 12:48:27 +0000 (13:48 +0100)]
Thread native name setting, fix #10302

9 years agoAuto merge of #21019 - nikomatsakis:issue-20871-ret-as-assoc-type, r=nrc
bors [Wed, 28 Jan 2015 11:01:36 +0000 (11:01 +0000)]
Auto merge of #21019 - nikomatsakis:issue-20871-ret-as-assoc-type, r=nrc

Fixes https://github.com/rust-lang/rust/issues/20871

r? @aturon (at least until we decide definitively if this is a good idea)

9 years agoAdd regression test for #21212. Fixes #21212.
Niko Matsakis [Wed, 28 Jan 2015 10:59:50 +0000 (05:59 -0500)]
Add regression test for #21212. Fixes #21212.

9 years agoAdd new test for object method numbering mismatches.
Niko Matsakis [Wed, 28 Jan 2015 10:13:43 +0000 (05:13 -0500)]
Add new test for object method numbering mismatches.

9 years agoAdjust comment per nrc's suggestion.
Niko Matsakis [Wed, 28 Jan 2015 10:06:10 +0000 (05:06 -0500)]
Adjust comment per nrc's suggestion.

9 years agoAdd missing space to error message.
Niko Matsakis [Tue, 27 Jan 2015 10:57:12 +0000 (05:57 -0500)]
Add missing space to error message.

9 years agoUpdate test files; mostly the problem is that they were using the
Niko Matsakis [Mon, 12 Jan 2015 15:27:25 +0000 (10:27 -0500)]
Update test files; mostly the problem is that they were using the
explicit form `Fn<A,B>` and now should use `Fn(A) -> B` or
`Fn<A,Output=B>`, but in some cases we get duplicate error
reports. This is mildly annoying and arises because of the main error
and another error from the projection. Might be worth squashing those,
but seems like a separate problem.

9 years agoUpdate Rustdoc to deal with the Fn return type being an associated type.
Niko Matsakis [Mon, 12 Jan 2015 15:24:19 +0000 (10:24 -0500)]
Update Rustdoc to deal with the Fn return type being an associated type.

9 years agoPatch variance bug: appearing in a binding is an invariant position (at least right...
Niko Matsakis [Mon, 12 Jan 2015 15:20:14 +0000 (10:20 -0500)]
Patch variance bug: appearing in a binding is an invariant position (at least right now).

9 years agoExtract expectations from the projection obligation, which includes
Niko Matsakis [Mon, 12 Jan 2015 15:19:47 +0000 (10:19 -0500)]
Extract expectations from the projection obligation, which includes
all relevant information.

9 years agoAdd Clone to the list of bounds for a TypeFolder. (Kill?)
Niko Matsakis [Sun, 11 Jan 2015 20:21:45 +0000 (15:21 -0500)]
Add Clone to the list of bounds for a TypeFolder. (Kill?)

9 years agoWhen pretty-printing object types, include the output associated type
Niko Matsakis [Sun, 11 Jan 2015 20:21:01 +0000 (15:21 -0500)]
When pretty-printing object types, include the output associated type

9 years agoFix a latent bug in trait dispatch where we sometimes counted associated types
Niko Matsakis [Sun, 11 Jan 2015 20:18:06 +0000 (15:18 -0500)]
Fix a latent bug in trait dispatch where we sometimes counted associated types
when constructing the vtable-index. Not good.

9 years agoMove return type an associated type of the `Fn*` traits. Mostly this involves tweakin...
Niko Matsakis [Sat, 10 Jan 2015 16:54:15 +0000 (11:54 -0500)]
Move return type an associated type of the `Fn*` traits. Mostly this involves tweaking things in
the compiler that assumed two input types to assume two ouputs; we also have to teach `project.rs`
to project `Output` from the unboxed closure and fn traits.

9 years agoAdd the notion of normalizing a parameter environment and ensure that
Niko Matsakis [Mon, 26 Jan 2015 19:20:38 +0000 (14:20 -0500)]
Add the notion of normalizing a parameter environment and ensure that
all parameter environments are normalized. Correspondingly, stop
normalizing predicates we extract out of the environment. Fixes #21664.

9 years agoChange list of predicates in ParameterEnvironment to a `Vec`.
Niko Matsakis [Mon, 26 Jan 2015 21:37:45 +0000 (16:37 -0500)]
Change list of predicates in ParameterEnvironment to a `Vec`.

9 years agoIn unsize_unique_expr, do not convert scratch value to lvalue.
Felix S. Klock II [Wed, 28 Jan 2015 02:37:24 +0000 (03:37 +0100)]
In unsize_unique_expr, do not convert scratch value to lvalue.

Fix the issue-20055-box-trait.rs test to actually test `Box<Trait>`.

Fix #21695.

9 years agoRemove unnecessary to_string() call.
Ms2ger [Sat, 24 Jan 2015 18:25:25 +0000 (19:25 +0100)]
Remove unnecessary to_string() call.

9 years agoRemove a custom variant of iter::Cloned.
Ms2ger [Sat, 24 Jan 2015 18:22:09 +0000 (19:22 +0100)]
Remove a custom variant of iter::Cloned.

9 years agoSimplify the implementation of segments_name_eq.
Ms2ger [Sat, 24 Jan 2015 18:13:36 +0000 (19:13 +0100)]
Simplify the implementation of segments_name_eq.

9 years agoRename found_ast to FoundAst and qualify uses.
Ms2ger [Sat, 24 Jan 2015 17:58:07 +0000 (18:58 +0100)]
Rename found_ast to FoundAst and qualify uses.

This matches contemporary Rust style.

9 years agoAuto merge of #21158 - alkor:issue-21131, r=nick29581
bors [Wed, 28 Jan 2015 07:32:53 +0000 (07:32 +0000)]
Auto merge of #21158 - alkor:issue-21131, r=nick29581

Closes #21131