]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agoRollup merge of #38699 - japaric:lsan, r=alexcrichton
Corey Farwell [Thu, 9 Feb 2017 04:55:43 +0000 (23:55 -0500)]
Rollup merge of #38699 - japaric:lsan, r=alexcrichton

LeakSanitizer, ThreadSanitizer, AddressSanitizer and MemorySanitizer support

```
$ cargo new --bin leak && cd $_

$ edit Cargo.toml && tail -n3 $_
```

``` toml
[profile.dev]
opt-level = 1
```

```
$ edit src/main.rs && cat $_
```

``` rust
use std::mem;

fn main() {
    let xs = vec![0, 1, 2, 3];
    mem::forget(xs);
}
```

```
$ RUSTFLAGS="-Z sanitizer=leak" cargo run --target x86_64-unknown-linux-gnu; echo $?
    Finished dev [optimized + debuginfo] target(s) in 0.0 secs
     Running `target/debug/leak`

=================================================================
==10848==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x557c3488db1f in __interceptor_malloc /shared/rust/checkouts/lsan/src/compiler-rt/lib/lsan/lsan_interceptors.cc:55
    #1 0x557c34888aaa in alloc::heap::exchange_malloc::h68f3f8b376a0da42 /shared/rust/checkouts/lsan/src/liballoc/heap.rs:138
    #2 0x557c34888afc in leak::main::hc56ab767de6d653a $PWD/src/main.rs:4
    #3 0x557c348c0806 in __rust_maybe_catch_panic ($PWD/target/debug/leak+0x3d806)

SUMMARY: LeakSanitizer: 16 byte(s) leaked in 1 allocation(s).
23
```

```
$ cargo new --bin racy && cd $_

$ edit src/main.rs && cat $_
```

``` rust
use std::thread;

static mut ANSWER: i32 = 0;

fn main() {
    let t1 = thread::spawn(|| unsafe { ANSWER = 42 });
    unsafe {
        ANSWER = 24;
    }
    t1.join().ok();
}
```

```
$ RUSTFLAGS="-Z sanitizer=thread" cargo run --target x86_64-unknown-linux-gnu; echo $?
==================
WARNING: ThreadSanitizer: data race (pid=12019)
  Write of size 4 at 0x562105989bb4 by thread T1:
    #0 racy::main::_$u7b$$u7b$closure$u7d$$u7d$::hbe13ea9e8ac73f7e $PWD/src/main.rs:6 (racy+0x000000010e3f)
    #1 _$LT$std..panic..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::h2e466a92accacc78 /shared/rust/checkouts/lsan/src/libstd/panic.rs:296 (racy+0x000000010cc5)
    #2 std::panicking::try::do_call::h7f4d2b38069e4042 /shared/rust/checkouts/lsan/src/libstd/panicking.rs:460 (racy+0x00000000c8f2)
    #3 __rust_maybe_catch_panic <null> (racy+0x0000000b4e56)
    #4 std::panic::catch_unwind::h31ca45621ad66d5a /shared/rust/checkouts/lsan/src/libstd/panic.rs:361 (racy+0x00000000b517)
    #5 std::thread::Builder::spawn::_$u7b$$u7b$closure$u7d$$u7d$::hccfc37175dea0b01 /shared/rust/checkouts/lsan/src/libstd/thread/mod.rs:357 (racy+0x00000000c226)
    #6 _$LT$F$u20$as$u20$alloc..boxed..FnBox$LT$A$GT$$GT$::call_box::hd880bbf91561e033 /shared/rust/checkouts/lsan/src/liballoc/boxed.rs:605 (racy+0x00000000f27e)
    #7 std::sys::imp::thread::Thread::new::thread_start::hebdfc4b3d17afc85 <null> (racy+0x0000000abd40)

  Previous write of size 4 at 0x562105989bb4 by main thread:
    #0 racy::main::h23e6e5ca46d085c3 $PWD/src/main.rs:8 (racy+0x000000010d7c)
    #1 __rust_maybe_catch_panic <null> (racy+0x0000000b4e56)
    #2 __libc_start_main <null> (libc.so.6+0x000000020290)

  Location is global 'racy::ANSWER::h543d2b139f819b19' of size 4 at 0x562105989bb4 (racy+0x0000002f8bb4)

  Thread T1 (tid=12028, running) created by main thread at:
    #0 pthread_create /shared/rust/checkouts/lsan/src/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:902 (racy+0x00000001aedb)
    #1 std::sys::imp::thread::Thread::new::hce44187bf4a36222 <null> (racy+0x0000000ab9ae)
    #2 std::thread::spawn::he382608373eb667e /shared/rust/checkouts/lsan/src/libstd/thread/mod.rs:412 (racy+0x00000000b5aa)
    #3 racy::main::h23e6e5ca46d085c3 $PWD/src/main.rs:6 (racy+0x000000010d5c)
    #4 __rust_maybe_catch_panic <null> (racy+0x0000000b4e56)
    #5 __libc_start_main <null> (libc.so.6+0x000000020290)

SUMMARY: ThreadSanitizer: data race $PWD/src/main.rs:6 in racy::main::_$u7b$$u7b$closure$u7d$$u7d$::hbe13ea9e8ac73f7e
==================
ThreadSanitizer: reported 1 warnings
66
```

```
$ cargo new --bin oob && cd $_

$ edit src/main.rs && cat $_
```

``` rust
fn main() {
    let xs = [0, 1, 2, 3];
    let y = unsafe { *xs.as_ptr().offset(4) };
}
```

```
$ RUSTFLAGS="-Z sanitizer=address" cargo run --target x86_64-unknown-linux-gnu; echo $?
=================================================================
==13328==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fff29f3ecd0 at pc 0x55802dc6bf7e bp 0x7fff29f3ec90 sp 0x7fff29f3ec88
READ of size 4 at 0x7fff29f3ecd0 thread T0
    #0 0x55802dc6bf7d in oob::main::h0adc7b67e5feb2e7 $PWD/src/main.rs:3
    #1 0x55802dd60426 in __rust_maybe_catch_panic ($PWD/target/debug/oob+0xfe426)
    #2 0x55802dd58dd9 in std::rt::lang_start::hb2951fc8a59d62a7 ($PWD/target/debug/oob+0xf6dd9)
    #3 0x55802dc6c002 in main ($PWD/target/debug/oob+0xa002)
    #4 0x7fad8c3b3290 in __libc_start_main (/usr/lib/libc.so.6+0x20290)
    #5 0x55802dc6b719 in _start ($PWD/target/debug/oob+0x9719)

Address 0x7fff29f3ecd0 is located in stack of thread T0 at offset 48 in frame
    #0 0x55802dc6bd5f in oob::main::h0adc7b67e5feb2e7 $PWD/src/main.rs:1

  This frame has 1 object(s):
    [32, 48) 'xs' <== Memory access at offset 48 overflows this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext
      (longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-overflow $PWD/src/main.rs:3 in oob::main::h0adc7b67e5feb2e7
Shadow bytes around the buggy address:
  0x1000653dfd40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1000653dfd50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1000653dfd60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1000653dfd70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1000653dfd80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x1000653dfd90: 00 00 00 00 f1 f1 f1 f1 00 00[f3]f3 00 00 00 00
  0x1000653dfda0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1000653dfdb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1000653dfdc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1000653dfdd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1000653dfde0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Heap right redzone:      fb
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack partial redzone:   f4
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==13328==ABORTING
1
```

```
$ cargo new --bin uninit && cd $_

$ edit src/main.rs && cat $_
```

``` rust
use std::mem;

fn main() {
    let xs: [u8; 4] = unsafe { mem::uninitialized() };
    let y = xs[0] + xs[1];
}
```

```
$ RUSTFLAGS="-Z sanitizer=memory" cargo run; echo $?
==30198==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x563f4b6867da in uninit::main::hc2731cd4f2ed48f8 $PWD/src/main.rs:5
    #1 0x563f4b7033b6 in __rust_maybe_catch_panic ($PWD/target/debug/uninit+0x873b6)
    #2 0x563f4b6fbd69 in std::rt::lang_start::hb2951fc8a59d62a7 ($PWD/target/debug/uninit+0x7fd69)
    #3 0x563f4b6868a9 in main ($PWD/target/debug/uninit+0xa8a9)
    #4 0x7fe844354290 in __libc_start_main (/usr/lib/libc.so.6+0x20290)
    #5 0x563f4b6864f9 in _start ($PWD/target/debug/uninit+0xa4f9)

SUMMARY: MemorySanitizer: use-of-uninitialized-value $PWD/src/main.rs:5 in uninit::main::hc2731cd4f2ed48f8
Exiting
77
```

7 years agoRollup merge of #37928 - chriskrycho:document-rfc-1623, r=steveklabnik
Corey Farwell [Thu, 9 Feb 2017 04:55:42 +0000 (23:55 -0500)]
Rollup merge of #37928 - chriskrycho:document-rfc-1623, r=steveklabnik

Document RFC 1623: static lifetime elision.

This should be the last item required for stabilizing RFC 1623 (#35897).

7 years agosanitizer-dylib: only run where std for x86_64-linux is available
Jorge Aparicio [Thu, 9 Feb 2017 03:58:53 +0000 (22:58 -0500)]
sanitizer-dylib: only run where std for x86_64-linux is available

7 years agofix the sanitizer-dylib test on non x86_64 linux hosts
Jorge Aparicio [Wed, 8 Feb 2017 03:47:03 +0000 (22:47 -0500)]
fix the sanitizer-dylib test on non x86_64 linux hosts

7 years agodist-x86-linux: install newer kernel headers
Jorge Aparicio [Mon, 6 Feb 2017 19:12:56 +0000 (14:12 -0500)]
dist-x86-linux: install newer kernel headers

7 years agoenable sanitizers on build job that tests x86_64 linux
Jorge Aparicio [Mon, 6 Feb 2017 00:09:32 +0000 (19:09 -0500)]
enable sanitizers on build job that tests x86_64 linux

7 years agoenable sanitizers on x86_64-linux releases
Jorge Aparicio [Sun, 5 Feb 2017 01:15:20 +0000 (20:15 -0500)]
enable sanitizers on x86_64-linux releases

7 years agouse helper function in the rebuild logic of the rustc_*san crates
Jorge Aparicio [Sun, 5 Feb 2017 01:10:29 +0000 (20:10 -0500)]
use helper function in the rebuild logic of the rustc_*san crates

7 years agobuild/test the sanitizers only when --enable-sanitizers is used
Jorge Aparicio [Fri, 3 Feb 2017 23:58:47 +0000 (18:58 -0500)]
build/test the sanitizers only when --enable-sanitizers is used

7 years agosanitizer support
Jorge Aparicio [Fri, 30 Dec 2016 04:28:11 +0000 (23:28 -0500)]
sanitizer support

7 years agoAuto merge of #39523 - alexcrichton:fpic, r=aturon
bors [Wed, 8 Feb 2017 20:49:24 +0000 (20:49 +0000)]
Auto merge of #39523 - alexcrichton:fpic, r=aturon

Pass -fPIC to native compiles on 32-bit

This is apparently a regression from 1.14.0 to 1.15.0. Previously we
passed `-fPIC` to C compilers on i686 targets, but the `gcc` crate
apparently [explicitly] didn't do this. I don't recall why that was
avoided but it was [previously passed by the makefiles][mk] and this
seems to have [caused a regression][regression] in Firefox, so this
commit reverts back to passing `-fPIC`.

[explicitly]: https://github.com/alexcrichton/gcc-rs/commit/362bdf20
[mk]: https://github.com/rust-lang/rust/blob/c781fc4a/mk/cfg/i686-unknown-linux-gnu.mk#L11
[regression]: https://bugzilla.mozilla.org/show_bug.cgi?id=1336155

7 years agoAdd more examples, get everything passing at last.
Chris Krycho [Wed, 8 Feb 2017 19:30:31 +0000 (14:30 -0500)]
Add more examples, get everything passing at last.

7 years agoAuto merge of #39645 - frewsxcv:rollup, r=frewsxcv
bors [Wed, 8 Feb 2017 18:11:06 +0000 (18:11 +0000)]
Auto merge of #39645 - frewsxcv:rollup, r=frewsxcv

Rollup of 11 pull requests

- Successful merges: #39462, #39512, #39529, #39557, #39561, #39582, #39583, #39597, #39622, #39624, #39630
- Failed merges:

7 years agoRollup merge of #39630 - alexcrichton:update-manifest, r=brson
Corey Farwell [Wed, 8 Feb 2017 15:19:59 +0000 (10:19 -0500)]
Rollup merge of #39630 - alexcrichton:update-manifest, r=brson

Rename manifest_version to manifest-version

The current manifests encode this with a dash in the name, so we should preserve
that!

7 years agoRollup merge of #39624 - brson:relnotes-master, r=alexcrichton
Corey Farwell [Wed, 8 Feb 2017 15:19:58 +0000 (10:19 -0500)]
Rollup merge of #39624 - brson:relnotes-master, r=alexcrichton

Bump stable release date

cc https://github.com/rust-lang/rust/pull/39623

7 years agoRollup merge of #39622 - alexcrichton:clean-dist, r=brson
Corey Farwell [Wed, 8 Feb 2017 15:19:57 +0000 (10:19 -0500)]
Rollup merge of #39622 - alexcrichton:clean-dist, r=brson

rustbuild: Clean build/dist on `make clean`

Prevents stale artifacts from sticking around by accident!

7 years agoRollup merge of #39597 - GuillaumeGomez:correct_rustdoc_test_file, r=alexcrichton
Corey Farwell [Wed, 8 Feb 2017 15:19:55 +0000 (10:19 -0500)]
Rollup merge of #39597 - GuillaumeGomez:correct_rustdoc_test_file, r=alexcrichton

Display correct filename with --test option

Fixes #39592.

With the current files:

```rust
pub mod foo;

/// This is a Foo;
///
/// ```
/// println!("baaaaaar");
/// ```
pub struct Foo;

/// This is a Bar;
///
/// ```
/// println!("fooooo");
/// ```
pub struct Bar;
```

```rust
// note the whitespaces
/// ```
/// println!("foo");
/// ```
pub fn foo() {}
```

It displays:

```
./build/x86_64-apple-darwin/stage1/bin/rustdoc --test test.rs

running 3 tests
test test.rs - line 13 ... ok
test test.rs - line 5 ... ok
test foo.rs - line 2 ... ok

test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured
```

```

` ``
println!("lol");
` ``

asdjnfasd

asd
```

It displays:

```
./build/x86_64-apple-darwin/stage1/bin/rustdoc --test foo.md

running 1 test
test <input> - line 3 ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
```

r? @alexcrichton

7 years agoRollup merge of #39583 - michaelwoerister:limit-llvm-threads, r=nikomatsakis
Corey Farwell [Wed, 8 Feb 2017 15:19:54 +0000 (10:19 -0500)]
Rollup merge of #39583 - michaelwoerister:limit-llvm-threads, r=nikomatsakis

back: Limit the number of LLVM worker threads.

This should fix issue https://github.com/rust-lang/rust/issues/39568.
Also see https://github.com/rust-lang/rust/issues/39280.

r? @nikomatsakis

7 years agoRollup merge of #39582 - nikomatsakis:incr-comp-issue-39569, r=michaelwoerister
Corey Farwell [Wed, 8 Feb 2017 15:19:52 +0000 (10:19 -0500)]
Rollup merge of #39582 - nikomatsakis:incr-comp-issue-39569, r=michaelwoerister

Handle the case where an intermediate node can't be recreated

This solution grows the graph, but this is quite the corner case.

r? @michaelwoerister

7 years agoRollup merge of #39561 - phungleson:libcollectionsbench, r=alexcrichton
Corey Farwell [Wed, 8 Feb 2017 15:19:51 +0000 (10:19 -0500)]
Rollup merge of #39561 - phungleson:libcollectionsbench, r=alexcrichton

Extract collections benchmarks to libcollections/bench

Good suggestion from @stjepang https://github.com/rust-lang/rust/issues/39484#issuecomment-277467765

r? @alexcrichton

7 years agoRollup merge of #39557 - bjorn3:pp-docs, r=jseyfried
Corey Farwell [Wed, 8 Feb 2017 15:19:50 +0000 (10:19 -0500)]
Rollup merge of #39557 - bjorn3:pp-docs, r=jseyfried

A few documentation improvements for `syntax::print::pp`

* Moved algorithm explanation to module docs
* Added ``` before and after the examples
* Explanation of the `rbox`, `ibox` and `cbox` names
* Added docs about the breaking types to `Breaks`

7 years agoRollup merge of #39529 - dylanmckay:llvm-4.0-align32, r=alexcrichton
Corey Farwell [Wed, 8 Feb 2017 15:19:49 +0000 (10:19 -0500)]
Rollup merge of #39529 - dylanmckay:llvm-4.0-align32, r=alexcrichton

[LLVM 4.0] Use 32-bits for alignment

LLVM 4.0 changes this. This change is fine to make for LLVM 3.9 as we
won't have alignments greater than 2^32-1.

7 years agoRollup merge of #39512 - oconnor663:try_wait, r=alexcrichton
Corey Farwell [Wed, 8 Feb 2017 15:19:48 +0000 (10:19 -0500)]
Rollup merge of #39512 - oconnor663:try_wait, r=alexcrichton

make Child::try_wait return io::Result<Option<ExitStatus>>

This is much nicer for callers who want to short-circuit real I/O errors
with `?`, because they can write this

    if let Some(status) = foo.try_wait()? {
        ...
    } else {
        ...
    }

instead of this

    match foo.try_wait() {
        Ok(status) => {
            ...
        }
        Err(err) if err.kind() == io::ErrorKind::WouldBlock => {
            ...
        }
        Err(err) => return Err(err),
    }

The original design of `try_wait` was patterned after the `Read` and
`Write` traits, which support both blocking and non-blocking
implementations in a single API. But since `try_wait` is never blocking,
it makes sense to optimize for the non-blocking case.

Tracking issue: https://github.com/rust-lang/rust/issues/38903

7 years agoRollup merge of #39462 - emilio:improper-ctypes, r=nikomatsakis
Corey Farwell [Wed, 8 Feb 2017 15:19:47 +0000 (10:19 -0500)]
Rollup merge of #39462 - emilio:improper-ctypes, r=nikomatsakis

lint/ctypes: Don't warn on sized structs with PhantomData.

Fixes #34798

7 years agoAdd more test for rustdoc --test
Guillaume Gomez [Mon, 6 Feb 2017 22:28:31 +0000 (23:28 +0100)]
Add more test for rustdoc --test

7 years agoAuto merge of #39638 - frewsxcv:rollup, r=frewsxcv
bors [Wed, 8 Feb 2017 03:55:13 +0000 (03:55 +0000)]
Auto merge of #39638 - frewsxcv:rollup, r=frewsxcv

Rollup of 13 pull requests

- Successful merges: #38764, #39361, #39372, #39374, #39400, #39426, #39431, #39459, #39482, #39545, #39593, #39620, #39621
- Failed merges:

7 years agoRollup merge of #39621 - GuillaumeGomez:current_dir_docs, r=steveklabnik
Corey Farwell [Wed, 8 Feb 2017 03:54:32 +0000 (22:54 -0500)]
Rollup merge of #39621 - GuillaumeGomez:current_dir_docs, r=steveklabnik

Add missing urls for current_dir

r? @steveklabnik

7 years agoRollup merge of #39620 - Gheoan:patch-1, r=steveklabnik
Corey Farwell [Wed, 8 Feb 2017 03:54:30 +0000 (22:54 -0500)]
Rollup merge of #39620 - Gheoan:patch-1, r=steveklabnik

add missing comma

7 years agoRollup merge of #39593 - steveklabnik:bookshelf-landing-page, r=frewsxcv
Corey Farwell [Wed, 8 Feb 2017 03:54:29 +0000 (22:54 -0500)]
Rollup merge of #39593 - steveklabnik:bookshelf-landing-page, r=frewsxcv

Re-write the doc index page

Clarify and reorganize.

Add the section for the bookshelf. More to come here in the near future!

Part of #39588

7 years agoRollup merge of #39545 - JordiPolo:fix/1_15_released, r=jseyfried
Corey Farwell [Wed, 8 Feb 2017 03:54:28 +0000 (22:54 -0500)]
Rollup merge of #39545 - JordiPolo:fix/1_15_released, r=jseyfried

Change deprecation warning to indicate custom derive support was removed

I'm very new to Rust and the message was confusing to me (using nightly and not really sure if I was > 1.15 or not).

7 years agoRollup merge of #39482 - king6cong:master, r=frewsxcv
Corey Farwell [Wed, 8 Feb 2017 03:54:27 +0000 (22:54 -0500)]
Rollup merge of #39482 - king6cong:master, r=frewsxcv

doc comment rewording

7 years agoRollup merge of #39459 - phungleson:fix-short-hand-struct-doc, r=steveklabnik
Corey Farwell [Wed, 8 Feb 2017 03:54:26 +0000 (22:54 -0500)]
Rollup merge of #39459 - phungleson:fix-short-hand-struct-doc, r=steveklabnik

Fix short hand struct doc

Don't want to discredit @hngiang effort on this issue.

I just want to lend a hand to fix this issue #38830, it is a very nice feature and is seemingly completed.

Fixes #39096

r? @steveklabnik

7 years agoRollup merge of #39431 - alexcrichton:no-more-makefiles, r=brson
Corey Farwell [Wed, 8 Feb 2017 03:54:25 +0000 (22:54 -0500)]
Rollup merge of #39431 - alexcrichton:no-more-makefiles, r=brson

Delete the makefile build system

This PR deletes the makefile build system in favor of the rustbuild build system. The beta has now been branched so 1.16 will continue to be buildable from the makefiles, but going forward 1.17 will only be buildable with rustbuild.

Rustbuild has been the default build system [since 1.15.0](https://github.com/rust-lang/rust/pull/37817) and the makefiles were [proposed for deletion](https://internals.rust-lang.org/t/proposal-for-promoting-rustbuild-to-official-status/4368) at this time back in November of last year.

And now with the deletion of these makefiles we can start getting those sweet sweet improvements of using crates.io crates in the compiler!

7 years agoRollup merge of #39426 - jakllsch:netbsd-c, r=alexcrichton
Corey Farwell [Wed, 8 Feb 2017 03:54:24 +0000 (22:54 -0500)]
Rollup merge of #39426 - jakllsch:netbsd-c, r=alexcrichton

Add i686-unknown-netbsdelf target

7 years agoRollup merge of #39400 - alexcrichton:arm-cross-test, r=brson
Corey Farwell [Wed, 8 Feb 2017 03:54:23 +0000 (22:54 -0500)]
Rollup merge of #39400 - alexcrichton:arm-cross-test, r=brson

Add support for test suites emulated in QEMU

This commit adds support to the build system to execute test suites that cannot
run natively but can instead run inside of a QEMU emulator. A proof-of-concept
builder was added for the `arm-unknown-linux-gnueabihf` target to show off how
this might work.

In general the architecture is to have a server running inside of the emulator
which a local client connects to. The protocol between the server/client
supports compiling tests on the host and running them on the target inside the
emulator.

Closes #33114

7 years agoRollup merge of #39374 - durka:patch-34, r=steveklabnik
Corey Farwell [Wed, 8 Feb 2017 03:54:22 +0000 (22:54 -0500)]
Rollup merge of #39374 - durka:patch-34, r=steveklabnik

reference: clarify #[cfg] section

Closes #39370, but maybe we (or clippy) should add a warning too.

7 years agoRollup merge of #39372 - seanmonstar:more-addr-froms, r=alexcrichton
Corey Farwell [Wed, 8 Feb 2017 03:54:21 +0000 (22:54 -0500)]
Rollup merge of #39372 - seanmonstar:more-addr-froms, r=alexcrichton

A few ergonomic From impls for SocketAddr/IpAddr

My main motivation is removing things like this: `"127.0.0.1:3000".parse().unwrap()`. Instead, this now works: `SocketAddr::from(([127, 0, 0, 1], 3000))` or even `([127, 0, 0, 1], 3000).into())` when passing to a function.

7 years agoRollup merge of #39361 - cengizIO:master, r=arielb1
Corey Farwell [Wed, 8 Feb 2017 03:54:20 +0000 (22:54 -0500)]
Rollup merge of #39361 - cengizIO:master, r=arielb1

Improve error message for uninferrable types #38812

Hello,

I tried to improve the error message for uninferrable types. The error code is `E0282`.

```rust

error[E0282]: type annotations needed
 --> /home/cengizIO/issue38812.rs:2:11
  |
2 |   let x = vec![];
  |       -   ^^^^^^ cannot infer type for `T`
  |       |
  |       consider giving `x` a type
  |
  = note: this error originates in a macro outside of the current crate
```

and

```rust

error[E0282]: type annotations needed
 --> /home/cengizIO/issue38812.rs:2:15
  |
2 |   let (x,) = (vec![],);
  |       ----    ^^^^^^ cannot infer type for `T`
  |       |
  |       consider giving a type to pattern
  |
  = note: this error originates in a macro outside of the current crate
```

Rust compiler now tries to find uninferred `local`s with type `_` and adds them into the error message.

I'm probably wrong on wording that I used. Please feel free to suggest better alternatives.

Thanks @nikomatsakis for mentoring 🍺

Any comments/feedback is more than welcome!

Thank you

7 years agoRollup merge of #38764 - Aaronepower:master, r=aturon
Corey Farwell [Wed, 8 Feb 2017 03:54:19 +0000 (22:54 -0500)]
Rollup merge of #38764 - Aaronepower:master, r=aturon

Added Default impl to PathBuf

7 years agoRename manifest_version to manifest-version
Alex Crichton [Tue, 7 Feb 2017 23:47:03 +0000 (15:47 -0800)]
Rename manifest_version to manifest-version

The current manifests encode this with a dash in the name, so we should preserve
that!

7 years agoAuto merge of #39324 - clarcharr:ipv6_u128, r=alexcrichton
bors [Wed, 8 Feb 2017 00:03:42 +0000 (00:03 +0000)]
Auto merge of #39324 - clarcharr:ipv6_u128, r=alexcrichton

Ipv6Addr <-> u128

Because we have `u128` now, it makes sense to add a conversion between `Ipv6Addr` and `u128` in addition to the existing one between `Ipv4Addr` and `u32`.

This shouldn't violate the existing feature gate on `u128` because you can't use the type without the feature gate, but if i have to add something, I can.

7 years agoreference: clarify #[cfg] section
Alex Burka [Sat, 28 Jan 2017 21:53:06 +0000 (16:53 -0500)]
reference: clarify #[cfg] section

7 years agoBump stable release date
Brian Anderson [Tue, 7 Feb 2017 19:48:16 +0000 (19:48 +0000)]
Bump stable release date

7 years agorustbuild: Clean build/dist on `make clean`
Alex Crichton [Tue, 7 Feb 2017 19:39:42 +0000 (11:39 -0800)]
rustbuild: Clean build/dist on `make clean`

Prevents stale artifacts from sticking around by accident!

7 years agoAdd missing urls for current_dir
Guillaume Gomez [Tue, 7 Feb 2017 18:43:22 +0000 (19:43 +0100)]
Add missing urls for current_dir

7 years agoreview nits
Steve Klabnik [Tue, 7 Feb 2017 18:04:57 +0000 (13:04 -0500)]
review nits

7 years agoadd missing comma
Gheorghe Anghelescu [Tue, 7 Feb 2017 17:47:48 +0000 (19:47 +0200)]
add missing comma

7 years agoAuto merge of #39002 - GuillaumeGomez:debug_libcollections, r=aturon
bors [Tue, 7 Feb 2017 17:28:51 +0000 (17:28 +0000)]
Auto merge of #39002 - GuillaumeGomez:debug_libcollections, r=aturon

Add Debug implementations for libcollection structs

Part of #31869.

7 years agoChange deprecation warning to indicate custom derive support was removed from the...
Jordi Polo [Sat, 4 Feb 2017 23:54:41 +0000 (08:54 +0900)]
Change deprecation warning to indicate custom derive support was removed from the current compiler version

7 years agomake Child::try_wait return io::Result<Option<ExitStatus>>
Jack O'Connor [Fri, 3 Feb 2017 22:39:41 +0000 (17:39 -0500)]
make Child::try_wait return io::Result<Option<ExitStatus>>

This is much nicer for callers who want to short-circuit real I/O errors
with `?`, because they can write this

    if let Some(status) = foo.try_wait()? {
        ...
    } else {
        ...
    }

instead of this

    match foo.try_wait() {
        Ok(status) => {
            ...
        }
        Err(err) if err.kind() == io::ErrorKind::WouldBlock => {
            ...
        }
        Err(err) => return Err(err),
    }

The original design of `try_wait` was patterned after the `Read` and
`Write` traits, which support both blocking and non-blocking
implementations in a single API. But since `try_wait` is never blocking,
it makes sense to optimize for the non-blocking case.

Tracking issue: https://github.com/rust-lang/rust/issues/38903

7 years agoAuto merge of #39591 - alexcrichton:revert-128, r=brson
bors [Tue, 7 Feb 2017 00:22:19 +0000 (00:22 +0000)]
Auto merge of #39591 - alexcrichton:revert-128, r=brson

Revert "Add 128-bit atomics"

This reverts commit 9903975003276cc42a1ed5f21eee292b7c62c331.

Unfortunately 128-bit atomics have broken our nightly builds (#39590) and while we investigate I'm posting a temporary revert of the PR that added them. If we can figure out a solution though before this lands I'd be happy to close!

7 years agoDisplay correct filename with --test option
Guillaume Gomez [Mon, 6 Feb 2017 21:11:03 +0000 (22:11 +0100)]
Display correct filename with --test option

7 years agoRe-write the doc index page
Steve Klabnik [Mon, 6 Feb 2017 20:05:37 +0000 (15:05 -0500)]
Re-write the doc index page

Clarify and reorganize.

Add the section for the bookshelf. More to come here in the near future!

Part of #39588

7 years agoRevert "Add 128-bit atomics"
Alex Crichton [Mon, 6 Feb 2017 18:39:14 +0000 (10:39 -0800)]
Revert "Add 128-bit atomics"

This reverts commit 9903975003276cc42a1ed5f21eee292b7c62c331.

7 years agoA few documentation improvements for `syntax::print::pp`
bjorn3 [Sun, 5 Feb 2017 08:44:49 +0000 (09:44 +0100)]
A few documentation improvements for `syntax::print::pp`

* Moved algorithm explanation to module docs
* Added ``` before and after the examples
* Explanation of the `rbox`, `ibox` and `cbox` names
* Added docs about the breaking types to `Breaks`

7 years agocompiletest: Add caching of test results
Alex Crichton [Wed, 1 Feb 2017 03:16:45 +0000 (19:16 -0800)]
compiletest: Add caching of test results

Don't re-run tests in compiletest if all the inputs haven't changed, manage
stamp files in the output directory.

7 years agorustbuild: Fix a few locations with makefiles gone
Alex Crichton [Fri, 27 Jan 2017 22:48:48 +0000 (14:48 -0800)]
rustbuild: Fix a few locations with makefiles gone

* Add version info to channel.rs as main.mk is no longer available
* Update `Makefile.in` used with bootstrap to not try to require `mk/util.mk`
* Update the `dist` target to avoid the makefile pieces

7 years agoClean our src/etc of old files
Alex Crichton [Mon, 23 Jan 2017 23:59:41 +0000 (15:59 -0800)]
Clean our src/etc of old files

Some of these have long since expired, some are no longer in use now that we've
jettisoned the makefiles, but none of them should be needed any more.

7 years agostd: Remove cfg(cargobuild) annotations
Alex Crichton [Mon, 23 Jan 2017 23:55:35 +0000 (15:55 -0800)]
std: Remove cfg(cargobuild) annotations

These are all now no longer needed that we've only got rustbuild in tree.

7 years agoDelete Travis/AppVeyor makefile builders
Alex Crichton [Mon, 23 Jan 2017 23:48:25 +0000 (15:48 -0800)]
Delete Travis/AppVeyor makefile builders

We no longer need these builders as we're no longer testing the old build
system.

7 years agoDelete swaths of the configure script
Alex Crichton [Mon, 23 Jan 2017 23:47:43 +0000 (15:47 -0800)]
Delete swaths of the configure script

This commit deletes swaths of the configure script related to the old build
system which are now no longer needed when using rustbuild.

7 years agoDelete the `mk` folder
Alex Crichton [Mon, 23 Jan 2017 23:47:07 +0000 (15:47 -0800)]
Delete the `mk` folder

This commit deletes the old build system located in the `mk` folder as it's now
been obsoleted for two cycles and is replaced by rustbuild.

7 years agofix case where some edges can't be recreated by expanding the graph
Niko Matsakis [Mon, 6 Feb 2017 15:20:23 +0000 (10:20 -0500)]
fix case where some edges can't be recreated by expanding the graph

cc #39569 -- almost certainly a fix for that

7 years agoback: Limit the number of LLVM worker threads.
Michael Woerister [Mon, 6 Feb 2017 15:15:20 +0000 (10:15 -0500)]
back: Limit the number of LLVM worker threads.

7 years agoRename i686-unknown-netbsdelf target to i686-unknown-netbsd
Jonathan A. Kollasch [Mon, 6 Feb 2017 14:49:16 +0000 (08:49 -0600)]
Rename i686-unknown-netbsdelf target to i686-unknown-netbsd

7 years agoregr test
Niko Matsakis [Mon, 6 Feb 2017 14:37:32 +0000 (09:37 -0500)]
regr test

7 years agoAuto merge of #39500 - michaelwoerister:fix-ich-testing, r=nikomatsakis
bors [Mon, 6 Feb 2017 14:10:13 +0000 (14:10 +0000)]
Auto merge of #39500 - michaelwoerister:fix-ich-testing, r=nikomatsakis

Let the dep-tracking test framework check that all #[rustc_dirty] attrs have been actually checked

r? @nikomatsakis

7 years agoExtract collections benchmarks to libcollections/benches
Son [Mon, 6 Feb 2017 10:38:47 +0000 (21:38 +1100)]
Extract collections benchmarks to libcollections/benches
And libcore/benches

7 years agoAdd comment about why the regular unused-attributes infrastructure
Michael Woerister [Mon, 6 Feb 2017 08:56:58 +0000 (03:56 -0500)]
Add comment about why the regular unused-attributes infrastructure
is not used for #[rustc_dirty]/#[rustc_clean].

7 years agoAuto merge of #38436 - bluecereal:patch-1, r=frewsxcv
bors [Mon, 6 Feb 2017 06:55:10 +0000 (06:55 +0000)]
Auto merge of #38436 - bluecereal:patch-1, r=frewsxcv

Update if-let.md

Calling if-let a combination of if and let is confusing, as some may be led to believe that it's a literal combination, instead of syntactic sugar added to the language as a convenience.  What's there to stop someone from thinking if-let is just if and let together?

I do think this article does a good job of implying what's really going on; however, I was only able to notice this after I had begun to understand if/while-let statements, courtesy of the Rust IRC chat.

Basically, this article lacks the clarity and explicitness an inexperienced programmer like me needs in order to understand the contents fully.  This is shown by my inability to understand the if-let concept from this page of the Book alone.

I think convenience, sugar, and (if-let != if + let) should all be made mention of in a clear, explicit manner. I lack confidence in my understanding of this issue, so I wrote just enough to hopefully get my thoughts across.

7 years agogo back to use //
king6cong [Mon, 6 Feb 2017 02:12:30 +0000 (10:12 +0800)]
go back to use //

7 years agoUpdate if-let.md
bluecereal [Mon, 6 Feb 2017 01:20:43 +0000 (20:20 -0500)]
Update if-let.md

7 years agoIpv6Addr <-> u128
Clar Charr [Thu, 26 Jan 2017 21:10:48 +0000 (16:10 -0500)]
Ipv6Addr <-> u128

7 years agoAuto merge of #38897 - nikomatsakis:issue-32330-followup, r=arielb1
bors [Sun, 5 Feb 2017 22:53:10 +0000 (22:53 +0000)]
Auto merge of #38897 - nikomatsakis:issue-32330-followup, r=arielb1

make lifetimes that only appear in return type early-bound

This is the full and proper fix for #32330. This also makes some effort to give a nice error message (as evidenced by the `ui` test), sending users over to the tracking issue for a fuller explanation and offering a `--explain` message in some cases.

This needs a crater run before we land.

r? @arielb1

7 years agomake lifetimes that only appear in return type early-bound
Niko Matsakis [Fri, 6 Jan 2017 19:35:23 +0000 (14:35 -0500)]
make lifetimes that only appear in return type early-bound

This is the full and proper fix for #32330. This also makes some effort
to give a nice error message (as evidenced by the `ui` test), sending
users over to the tracking issue for a full explanation.

7 years agoAuto merge of #39567 - frewsxcv:rollup, r=frewsxcv
bors [Sun, 5 Feb 2017 19:33:55 +0000 (19:33 +0000)]
Auto merge of #39567 - frewsxcv:rollup, r=frewsxcv

Rollup of 12 pull requests

- Successful merges: #39439, #39472, #39481, #39491, #39501, #39509, #39514, #39519, #39526, #39528, #39530, #39538
- Failed merges:

7 years agoRollup merge of #39538 - stjepang:slightly-optimize-sort, r=alexcrichton
Corey Farwell [Sun, 5 Feb 2017 17:45:15 +0000 (12:45 -0500)]
Rollup merge of #39538 - stjepang:slightly-optimize-sort, r=alexcrichton

Slightly optimize slice::sort

First, get rid of some bound checks.

Second, instead of comparing by ternary `compare` function, use a binary function testing whether an element is less than some other element. This apparently makes it easier for the compiler to reason about the code. I've noticed the same effect with [pdqsort](https://github.com/stjepang/pdqsort) crate.

Benchmark:

```
name                                        before ns/iter        after ns/iter         diff ns/iter   diff %
slice::bench::sort_large_ascending          8,969 (8919 MB/s)     7,410 (10796 MB/s)          -1,559  -17.38%
slice::bench::sort_large_big_ascending      355,640 (3599 MB/s)   359,137 (3564 MB/s)          3,497    0.98%
slice::bench::sort_large_big_descending     427,112 (2996 MB/s)   424,721 (3013 MB/s)         -2,391   -0.56%
slice::bench::sort_large_big_random         2,207,799 (579 MB/s)  2,138,804 (598 MB/s)       -68,995   -3.13%
slice::bench::sort_large_descending         13,694 (5841 MB/s)    13,514 (5919 MB/s)            -180   -1.31%
slice::bench::sort_large_mostly_ascending   239,697 (333 MB/s)    203,542 (393 MB/s)         -36,155  -15.08%
slice::bench::sort_large_mostly_descending  270,102 (296 MB/s)    234,263 (341 MB/s)         -35,839  -13.27%
slice::bench::sort_large_random             513,406 (155 MB/s)    470,084 (170 MB/s)         -43,322   -8.44%
slice::bench::sort_large_random_expensive   23,650,321 (3 MB/s)   23,675,098 (3 MB/s)         24,777    0.10%
slice::bench::sort_medium_ascending         143 (5594 MB/s)       132 (6060 MB/s)                -11   -7.69%
slice::bench::sort_medium_descending        197 (4060 MB/s)       188 (4255 MB/s)                 -9   -4.57%
slice::bench::sort_medium_random            3,358 (238 MB/s)      3,271 (244 MB/s)               -87   -2.59%
slice::bench::sort_small_ascending          32 (2500 MB/s)        32 (2500 MB/s)                   0    0.00%
slice::bench::sort_small_big_ascending      97 (13195 MB/s)       97 (13195 MB/s)                  0    0.00%
slice::bench::sort_small_big_descending     247 (5182 MB/s)       249 (5140 MB/s)                  2    0.81%
slice::bench::sort_small_big_random         502 (2549 MB/s)       498 (2570 MB/s)                 -4   -0.80%
slice::bench::sort_small_descending         55 (1454 MB/s)        61 (1311 MB/s)                   6   10.91%
slice::bench::sort_small_random             358 (223 MB/s)        356 (224 MB/s)                  -2   -0.56%
```

7 years agoRollup merge of #39530 - TimNN:more-gdb, r=alexcrichton
Corey Farwell [Sun, 5 Feb 2017 17:45:14 +0000 (12:45 -0500)]
Rollup merge of #39530 - TimNN:more-gdb, r=alexcrichton

ignore more gdb versions with buggy rust support

This extends the versions of gdb which were ignored in #39039. While just ignoring gdb versions up to 7.12.1 would have been sufficient for now, I believe (after consulting https://sourceware.org/gdb/wiki/Internals%20Versions)  that ignoring versions up to 7.12.9 will prevent the tests failing again for 7.12.2, etc. while still running all tests for the development versions of gdb (which will be >= 7.12.10 as far as I can tell).

This should fix #39522.

cc @Manishearth, @michaelwoerister, #38948

7 years agoRollup merge of #39528 - dylanmckay:llvm-4.0-diglobalvar, r=alexcrichton
Corey Farwell [Sun, 5 Feb 2017 17:45:13 +0000 (12:45 -0500)]
Rollup merge of #39528 - dylanmckay:llvm-4.0-diglobalvar, r=alexcrichton

[LLVM 4.0] Support a debug info API change for LLVM 4.0

Instead of directly creating a `DIGlobalVariable`, we now have to create
a `DIGlobalVariableExpression` which itself contains a reference to a
'DIGlobalVariable'.

This is a straightforward change.

In the future, we should rename `DIGlobalVariable` in the FFI
bindings, assuming we will only refer to `DIGlobalVariableExpression`
and not `DIGlobalVariable`.

7 years agoRollup merge of #39526 - canndrew:uninhabited-while-let-fix, r=arielb1
Corey Farwell [Sun, 5 Feb 2017 17:45:12 +0000 (12:45 -0500)]
Rollup merge of #39526 - canndrew:uninhabited-while-let-fix, r=arielb1

Uninhabited while-let pattern fix

This fix makes it so while-let with an unsatisfiable pattern raises a correct warning rather than an incorrect error.

7 years agoRollup merge of #39519 - nagisa:more-snap, r=alexcrichton
Corey Farwell [Sun, 5 Feb 2017 17:45:11 +0000 (12:45 -0500)]
Rollup merge of #39519 - nagisa:more-snap, r=alexcrichton

More snap cleanup

r? @alexcrichton

7 years agoRollup merge of #39514 - tbu-:pr_less_syscalls_fd, r=alexcrichton
Corey Farwell [Sun, 5 Feb 2017 17:45:10 +0000 (12:45 -0500)]
Rollup merge of #39514 - tbu-:pr_less_syscalls_fd, r=alexcrichton

Use less syscalls in `FileDesc::set_{nonblocking,cloexec}`

Only set the flags if they differ from what the OS reported, use
`FIONBIO` to atomically set the non-blocking IO flag on Linux.

7 years agoRollup merge of #39509 - petrochenkov:rb2, r=alexcrichton
Corey Farwell [Sun, 5 Feb 2017 17:45:08 +0000 (12:45 -0500)]
Rollup merge of #39509 - petrochenkov:rb2, r=alexcrichton

libbacktrace: Fix uninitialized variable

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

7 years agoRollup merge of #39501 - phungleson:libcorebench, r=alexcrichton
Corey Farwell [Sun, 5 Feb 2017 17:45:07 +0000 (12:45 -0500)]
Rollup merge of #39501 - phungleson:libcorebench, r=alexcrichton

Extract libcore benchmarks to a separate folder

Fix #39484

r? @alexcrichton since you seem to know about this :)

Thanks!

7 years agoRollup merge of #39491 - dumbbell:support-aarch64-unknown-freebsd, r=alexcrichton
Corey Farwell [Sun, 5 Feb 2017 17:45:06 +0000 (12:45 -0500)]
Rollup merge of #39491 - dumbbell:support-aarch64-unknown-freebsd, r=alexcrichton

Support aarch64-unknown-freebsd

7 years agoRollup merge of #39481 - ishitatsuyuki:master, r=alexcrichton
Corey Farwell [Sun, 5 Feb 2017 17:45:05 +0000 (12:45 -0500)]
Rollup merge of #39481 - ishitatsuyuki:master, r=alexcrichton

liballoc_jemalloc: fix linking with system library

Fix #39215

7 years agoRollup merge of #39472 - est31:unadjusted_only_for_win, r=nagisa
Corey Farwell [Sun, 5 Feb 2017 17:45:04 +0000 (12:45 -0500)]
Rollup merge of #39472 - est31:unadjusted_only_for_win, r=nagisa

Don't use "unadjusted" ABI on non windows platforms

We introduced the unadjusted ABI to work around wrong
(buggy) ABI expectations by LLVM on Windows [1].
Therefore, it should be solely used on Windows and not
on other platforms, like right now is the case.

[1]: see this comment for details https://github.com/rust-lang/rust/pull/38482#issuecomment-269074031

7 years agoRollup merge of #39439 - king6cong:move, r=alexcrichton
Corey Farwell [Sun, 5 Feb 2017 17:45:02 +0000 (12:45 -0500)]
Rollup merge of #39439 - king6cong:move, r=alexcrichton

rename other than copy/remove

7 years agoAuto merge of #39408 - ollie27:i128_try_from, r=alexcrichton
bors [Sun, 5 Feb 2017 16:57:29 +0000 (16:57 +0000)]
Auto merge of #39408 - ollie27:i128_try_from, r=alexcrichton

Fix TryFrom for i128/u128

Another case of `as` cast silent truncation being error prone.

This also adds a few missing TryFrom tests to libcoretest.

cc #33417
cc #35118

7 years agoFix make tidy
Andrew Cann [Sun, 5 Feb 2017 14:29:06 +0000 (22:29 +0800)]
Fix make tidy

7 years agoAuto merge of #39563 - frewsxcv:rollup, r=frewsxcv
bors [Sun, 5 Feb 2017 14:15:18 +0000 (14:15 +0000)]
Auto merge of #39563 - frewsxcv:rollup, r=frewsxcv

Rollup of 19 pull requests

- Successful merges: #38518, #38921, #38959, #38983, #39009, #39107, #39193, #39289, #39312, #39393, #39442, #39443, #39453, #39454, #39471, #39477, #39478, #39527, #39552
- Failed merges:

7 years agoRollup merge of #39552 - zackmdavis:more_struct_aliases_stabilization_version, r...
Corey Farwell [Sun, 5 Feb 2017 14:14:57 +0000 (09:14 -0500)]
Rollup merge of #39552 - zackmdavis:more_struct_aliases_stabilization_version, r=petrochenkov

correct version in which more_struct_aliases was/will be stable

The stabilizing commit is 5056a437, which is not in 1.14, but is (at
time of writing) on the 1.16 beta branch. [See discussion](https://github.com/rust-lang/rust/pull/39282#discussion_r99481687).

7 years agoRollup merge of #39527 - king6cong:bootstrap-doc, r=alexcrichton
Corey Farwell [Sun, 5 Feb 2017 14:14:56 +0000 (09:14 -0500)]
Rollup merge of #39527 - king6cong:bootstrap-doc, r=alexcrichton

README path correction

7 years agoRollup merge of #39478 - alexcrichton:add-xpy, r=japaric
Corey Farwell [Sun, 5 Feb 2017 14:14:54 +0000 (09:14 -0500)]
Rollup merge of #39478 - alexcrichton:add-xpy, r=japaric

rustbuild: Add x.py to source tarballs

We should be sure to add our build system entry point!

Closes #39476

7 years agoRollup merge of #39477 - jimmycuadra:try-from-parameter-name, r=alexcrichton
Corey Farwell [Sun, 5 Feb 2017 14:14:53 +0000 (09:14 -0500)]
Rollup merge of #39477 - jimmycuadra:try-from-parameter-name, r=alexcrichton

Add a name for the parameter to `TryFrom::try_from`.

Although signatures with anonymous parameters may not be deprecated or removed at this point, the team seems to agree that the ability to have an anonymous parameter is unfortunate historical baggage, and that we shouldn't create new code that uses it.

Context: https://github.com/rust-lang/rust/issues/33417#issuecomment-276933861

7 years agoRollup merge of #39471 - djc:bootstrap-user, r=alexcrichton
Corey Farwell [Sun, 5 Feb 2017 14:14:51 +0000 (09:14 -0500)]
Rollup merge of #39471 - djc:bootstrap-user, r=alexcrichton

Fix bootstrap.py issues with new rustbuild build system (fixes #39469)

7 years agoRollup merge of #39454 - abonander:proc_macro_tracking_issue, r=jseyfried
Corey Farwell [Sun, 5 Feb 2017 14:14:50 +0000 (09:14 -0500)]
Rollup merge of #39454 - abonander:proc_macro_tracking_issue, r=jseyfried

Change tracking issue for `proc_macro` feature to #38356

r? @jseyfried

7 years agoRollup merge of #39453 - nrc:save-path, r=nikomatsakis
Corey Farwell [Sun, 5 Feb 2017 14:14:49 +0000 (09:14 -0500)]
Rollup merge of #39453 - nrc:save-path, r=nikomatsakis

save-analysis: be more paranoid about generated paths

fixes https://github.com/rust-lang-nursery/rls/issues/160

7 years agoRollup merge of #39443 - phungleson:remove-unresolved-things, r=nikomatsakis
Corey Farwell [Sun, 5 Feb 2017 14:14:48 +0000 (09:14 -0500)]
Rollup merge of #39443 - phungleson:remove-unresolved-things, r=nikomatsakis

Don't suggest to use things which weren't found either

Fixes #38054

The best code I can come up with, suggestions are welcome.

Basically, removing ```. Did you mean to use `DoesntExist1`?``` in the code below, because it is useless.

```rust
error[E0432]: unresolved import `DoesntExist1`
 --> src/lib.rs:1:5
  |
1 | use DoesntExist1;
  |     ^^^^^^^^^^^^ no `DoesntExist1` in the root

error[E0432]: unresolved import `DoesntExist2`
 --> src/lib.rs:2:5
  |
2 | use DoesntExist2;
  |     ^^^^^^^^^^^^ no `DoesntExist2` in the root. Did you mean to use `DoesntExist1`?
```

7 years agoRollup merge of #39442 - keeperofdakeys:expand-derives, r=jseyfried
Corey Farwell [Sun, 5 Feb 2017 14:14:46 +0000 (09:14 -0500)]
Rollup merge of #39442 - keeperofdakeys:expand-derives, r=jseyfried

Expand derive macros in the MacroExpander

This removes the expand_derives function, and sprinkles the functionality throughout the Invocation Collector, Expander and Resolver.

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

r? @jseyfried