]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agotweak the description
Niko Matsakis [Mon, 30 Oct 2017 14:22:35 +0000 (10:22 -0400)]
tweak the description

"in addition to" sounds better than "additionally to"

6 years agoAuto merge of #45626 - wesleywiser:doc_update_1, r=Mark-Simulacrum
bors [Mon, 30 Oct 2017 08:52:40 +0000 (08:52 +0000)]
Auto merge of #45626 - wesleywiser:doc_update_1, r=Mark-Simulacrum

Add link to stablized version of an intrinsic

6 years agoAuto merge of #45603 - joshleeb:iss42106, r=estebank
bors [Mon, 30 Oct 2017 06:17:39 +0000 (06:17 +0000)]
Auto merge of #45603 - joshleeb:iss42106, r=estebank

Fix duplicate display of error E0502

Ref. Repeated "mutable/immutable borrow" error messages #42106.

This PR modifies the return type of [`report_error_if_loan_conflicts_with_restriction`](https://github.com/rust-lang/rust/blob/0f0f5db465de96b6c12e71f0c7d3e475f618b104/src/librustc_borrowck/borrowck/check_loans.rs#L398-L403) so the result can be checked in [`report_error_if_loans_conflict`](https://github.com/rust-lang/rust/blob/0f0f5db465de96b6c12e71f0c7d3e475f618b104/src/librustc_borrowck/borrowck/check_loans.rs#L377-L396). This is done to prevent displaying a duplicate of the error message E0502 which is referenced in #42106.

The output of compiling:

```rust
fn do_something<T>(collection: &mut Vec<T>) {
    let _a = &collection;
    collection.swap(1, 2);
}

fn main() {}
```

is now

```bash
$ rustc src/test/compile-fail/issue-42106.rs
error[E0502]: cannot borrow `*collection` as mutable because `collection` is also borrowed as immutable
  --> src/test/compile-fail/issue-42106.rs:13:5
   |
12 |     let _a = &collection;
   |               ---------- immutable borrow occurs here
13 |     collection.swap(1, 2);
   |     ^^^^^^^^^^ mutable borrow occurs here
14 | }
   | - immutable borrow ends here

error: aborting due to 2 previous errors
```

r? @estebank

6 years agoAdd link to stablized version of an intrinsic
Wesley Wiser [Mon, 30 Oct 2017 02:53:07 +0000 (22:53 -0400)]
Add link to stablized version of an intrinsic

6 years agoAuto merge of #45618 - kennytm:update-cargo, r=alexcrichton
bors [Mon, 30 Oct 2017 02:33:52 +0000 (02:33 +0000)]
Auto merge of #45618 - kennytm:update-cargo, r=alexcrichton

Update cargo.

Brings in rust-lang/cargo#4672, unbreaks nightly on macOS APFS.

Fixes #45607.

r? @alexcrichton

6 years agoMove issue-42106 test from compile-fail to ui
Josh Leeb-du Toit [Sun, 29 Oct 2017 22:58:45 +0000 (09:58 +1100)]
Move issue-42106 test from compile-fail to ui

6 years agoAuto merge of #45424 - petrochenkov:grlint, r=oli-obk
bors [Sun, 29 Oct 2017 23:59:07 +0000 (23:59 +0000)]
Auto merge of #45424 - petrochenkov:grlint, r=oli-obk

Add several lints into `unused` lint group

Also a couple of obsolete (not reported) lints are removed.

r? @oli-obk

6 years agoRefactor if block to use idiomatic matches
Josh Leeb-du Toit [Sun, 29 Oct 2017 22:58:09 +0000 (09:58 +1100)]
Refactor if block to use idiomatic matches

6 years agoAuto merge of #45597 - DSpeckhals:rustfmt-update, r=nrc
bors [Sun, 29 Oct 2017 21:25:12 +0000 (21:25 +0000)]
Auto merge of #45597 - DSpeckhals:rustfmt-update, r=nrc

tools: Update rustfmt and re-enable testing

This allows rustfmt and the RLS to test and compile again.

6 years agoRefactor matches to use Result::err
Josh Leeb-du Toit [Sun, 29 Oct 2017 21:20:52 +0000 (08:20 +1100)]
Refactor matches to use Result::err

6 years agoUpdate rustfmt again
Dustin Speckhals [Sun, 29 Oct 2017 19:16:02 +0000 (15:16 -0400)]
Update rustfmt again

6 years agoAdd several lints into `unused` lint group
Vadim Petrochenkov [Fri, 20 Oct 2017 21:00:57 +0000 (00:00 +0300)]
Add several lints into `unused` lint group

Remove a couple of obsolete lints

6 years agoAuto merge of #45616 - fhartwig:ptr-docs, r=dtolnay
bors [Sun, 29 Oct 2017 18:44:16 +0000 (18:44 +0000)]
Auto merge of #45616 - fhartwig:ptr-docs, r=dtolnay

Fix references to zero_memory and copy_memory in ptr docs

Fixes #45606

6 years agoSupport Dragonfly when building Openssl
Michael Neumann [Sun, 29 Oct 2017 17:42:04 +0000 (18:42 +0100)]
Support Dragonfly when building Openssl

6 years agoUpdate cargo.
kennytm [Sun, 29 Oct 2017 17:32:08 +0000 (01:32 +0800)]
Update cargo.

Brings in rust-lang/cargo#4672, unbreaks nightly on macOS APFS.

6 years agoMerge branch 'master' into rustfmt-update
Dustin Speckhals [Sun, 29 Oct 2017 17:27:06 +0000 (13:27 -0400)]
Merge branch 'master' into rustfmt-update

6 years agoAuto merge of #45611 - Manishearth:lint-generics, r=petrochenkov
bors [Sun, 29 Oct 2017 15:22:38 +0000 (15:22 +0000)]
Auto merge of #45611 - Manishearth:lint-generics, r=petrochenkov

Add generics to LateContext

Fixes clippy breakage from https://github.com/rust-lang/rust/pull/44766 as discussed in https://github.com/rust-lang-nursery/rust-clippy/pull/2140#issuecomment-336973875

r? @nikomatsakis

6 years agoFix references to zero_memory and copy_memory in ptr docs
Florian Hartwig [Sun, 29 Oct 2017 14:40:09 +0000 (15:40 +0100)]
Fix references to zero_memory and copy_memory in ptr docs

6 years agoUpdate clippy
Manish Goregaokar [Sun, 29 Oct 2017 09:27:34 +0000 (05:27 -0400)]
Update clippy

6 years agoAuto merge of #45295 - Technius:docs/process, r=steveklabnik
bors [Sun, 29 Oct 2017 06:24:20 +0000 (06:24 +0000)]
Auto merge of #45295 - Technius:docs/process, r=steveklabnik

Improve std::process module docs

Addresses part of #29370

I've changed the first `cat` example to a "Hello World" example involving echo, and I've also added another example showing how to pipe output. I'm still working on the module-level description.

For now, I'd like feedback on the examples.

r? @steveklabnik

6 years agoAdd no_run to process examples involving unix commands
Bryan Tan [Sun, 29 Oct 2017 03:24:49 +0000 (20:24 -0700)]
Add no_run to process examples involving unix commands

6 years agoAuto merge of #45554 - integer32llc:update-book, r=steveklabnik
bors [Sun, 29 Oct 2017 02:16:24 +0000 (02:16 +0000)]
Auto merge of #45554 - integer32llc:update-book, r=steveklabnik

Update the book for a fix to the print button

Fixes #45552.

Brings in recent improvements in the text that we've made recently as well.

r? @steveklabnik

6 years agoAdd test for fix duplicate display of E0502
Josh Leeb-du Toit [Sun, 29 Oct 2017 01:10:59 +0000 (12:10 +1100)]
Add test for fix duplicate display of E0502

6 years agoFix duplicate display of error E0502
Josh Leeb-du Toit [Sat, 28 Oct 2017 23:37:59 +0000 (10:37 +1100)]
Fix duplicate display of error E0502

6 years agoUpdate the book for a fix to the print button
Carol (Nichols || Goulding) [Thu, 26 Oct 2017 18:49:12 +0000 (14:49 -0400)]
Update the book for a fix to the print button

Fixes #45552.

6 years agoAuto merge of #45580 - kennytm:sdkmanager, r=alexcrichton
bors [Sat, 28 Oct 2017 23:40:31 +0000 (23:40 +0000)]
Auto merge of #45580 - kennytm:sdkmanager, r=alexcrichton

ci: Upgrade Android SDK/NDK and refactor to use sdkmanager/avdmanager.

* SDK tools is upgraded to 27.0.0.

* Stopped using the deprecated `android` tool, instead use the recommended `sdkmanager` and `avdmanager`.

* NDK is upgrade to r15c.

    The r15 series [dropped support for android-9](https://github.com/android-ndk/ndk/wiki/Changelog-r15) (2.3 / Gingerbread), the minimal supported version is now android-14 (4.0 / Ice Cream Sandwich).

r? @alexcrichton

(WIP, haven't confirmed if the change really works yet)

6 years agoOptimize some span operations
Vadim Petrochenkov [Sat, 21 Oct 2017 14:21:02 +0000 (17:21 +0300)]
Optimize some span operations

Decode span data only once

6 years agoci: Upgrade Android SDK/NDK and refactor to use sdkmanager/avdmanager.
kennytm [Fri, 27 Oct 2017 19:14:25 +0000 (03:14 +0800)]
ci: Upgrade Android SDK/NDK and refactor to use sdkmanager/avdmanager.

* SDK tools is upgraded to 27.0.0.
   - Refactored to use `sdkmanager`/`avdmanager` instead of the deprecated
     `android` tool.

* The Java version used by Android SDK is downgraded to OpenJDK-8, in order
  to download the SDK through HTTPS.

* NDK is upgrade to r15c.
   - Dropped support for android-9 (2.3 / Gingerbread), the minimal
     supported version is now android-14 (4.0 / Ice Cream Sandwich).
   - Changed the default Android compiler from GCC to clang.
   - For details of change introduced by NDK r15, see
     https://github.com/android-ndk/ndk/wiki/Changelog-r15.

6 years agoAdd generics field to LateContext
Manish Goregaokar [Sat, 28 Oct 2017 21:19:07 +0000 (17:19 -0400)]
Add generics field to LateContext

6 years agoAuto merge of #45540 - virgil-palanciuc:master, r=estebank
bors [Sat, 28 Oct 2017 21:01:07 +0000 (21:01 +0000)]
Auto merge of #45540 - virgil-palanciuc:master, r=estebank

Avoid repetition on “use of unstable library feature 'rustc_private'”

This PR fixes the error by only emitting it when the span contains a real file (is not inside a macro) - and making sure it's emitted only once per span.
The first check was needed because spans-within-macros seem to differ a lot and "fixing" them to the real location is not trivial (and the method that does this is private to another module). It also feels like there always will be an error on import, with the real file name, so not sure there's a point to re-emit the same error at macro use.

Fix #44953.

6 years agofixed tidy error
Virgil Palanciuc [Sat, 28 Oct 2017 19:38:15 +0000 (22:38 +0300)]
fixed tidy error

6 years agoUpdate rustfmt
Dustin Speckhals [Sat, 28 Oct 2017 17:46:43 +0000 (13:46 -0400)]
Update rustfmt

This allows rustfmt and the RLS to test and compile again.

6 years agoimplemented code review
Virgil Palanciuc [Sat, 28 Oct 2017 17:39:00 +0000 (20:39 +0300)]
implemented code review

6 years agoAuto merge of #45489 - oli-obk:json_diagnostics, r=petrochenkov
bors [Sat, 28 Oct 2017 16:15:17 +0000 (16:15 +0000)]
Auto merge of #45489 - oli-obk:json_diagnostics, r=petrochenkov

Fix a quadradic duplication in json for multi-suggestions

r? @petrochenkov

6 years agoFix weird bugs
Guillaume Gomez [Fri, 27 Oct 2017 23:11:01 +0000 (01:11 +0200)]
Fix weird bugs

6 years agoAuto merge of #44295 - plietar:extern-types, r=arielb1
bors [Sat, 28 Oct 2017 13:34:12 +0000 (13:34 +0000)]
Auto merge of #44295 - plietar:extern-types, r=arielb1

Implement RFC 1861: Extern types

A few notes :

- Type parameters are not supported. This was an unresolved question from the RFC. It is not clear how useful this feature is, and how variance should be treated. This can be added in a future PR.

- `size_of_val` / `align_of_val` can be called with extern types, and respectively return 0 and 1. This differs from the RFC, which specified that they should panic, but after discussion with @eddyb on IRC this seems like a better solution.
If/when a `DynSized` trait is added, this will be disallowed statically.

- Auto traits are not implemented by default, since the contents of extern types is unknown. This means extern types are `!Sync`, `!Send` and `!Freeze`. This seems like the correct behaviour to me.
Manual `unsafe impl Sync for Foo` is still possible.

- This PR allows extern type to be used as the tail of a struct, as described by the RFC :
```rust
extern {
    type OpaqueTail;
}

#[repr(C)]
struct FfiStruct {
    data: u8,
    more_data: u32,
    tail: OpaqueTail,
}
```

However this is undesirable, as the alignment of `tail` is unknown (the current PR assumes an alignment of 1). Unfortunately we can't prevent it in the general case as the tail could be a type parameter :
```rust
#[repr(C)]
struct FfiStruct<T: ?Sized> {
    data: u8,
    more_data: u32,
    tail: T,
}
```

Adding a `DynSized` trait would solve this as well, by requiring tail fields to be bound by it.

- Despite being unsized, pointers to extern types are thin and can be casted from/to integers. However it is not possible to write a `null<T>() -> *const T` function which works with extern types, as I've explained here : https://github.com/rust-lang/rust/issues/43467#issuecomment-321678621

- Trait objects cannot be built from extern types. I intend to support it eventually, although how this interacts with `DynSized`/`size_of_val` is still unclear.

- The definition of `c_void` is unmodified

6 years agoAuto merge of #45589 - kennytm:rollup, r=kennytm
bors [Sat, 28 Oct 2017 09:42:38 +0000 (09:42 +0000)]
Auto merge of #45589 - kennytm:rollup, r=kennytm

Rollup of 7 pull requests

- Successful merges: #45421, #45449, #45505, #45535, #45549, #45574, #45585
- Failed merges:

6 years agoRollup merge of #45585 - frewsxcv:frewsxcv-diagnostic, r=kennytm
kennytm [Sat, 28 Oct 2017 07:56:25 +0000 (15:56 +0800)]
Rollup merge of #45585 - frewsxcv:frewsxcv-diagnostic, r=kennytm

Remove 'future Rust version' code block in diagnostic text.

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

6 years agoRollup merge of #45574 - nzig:on_unimplemented_example, r=steveklabnik
kennytm [Sat, 28 Oct 2017 07:56:24 +0000 (15:56 +0800)]
Rollup merge of #45574 - nzig:on_unimplemented_example, r=steveklabnik

Fixed rustc_on_unimplemented example in Unstable Book

I saw [this](https://doc.rust-lang.org/beta/unstable-book/language-features/on-unimplemented.html) example and it seemed wrong. This fixes the example to emit an error message that makes more sense.

6 years agoRollup merge of #45549 - steveklabnik:remove-just, r=QuietMisdreavus
kennytm [Sat, 28 Oct 2017 07:56:23 +0000 (15:56 +0800)]
Rollup merge of #45549 - steveklabnik:remove-just, r=QuietMisdreavus

Remove 'just' in diagnostics

This is better writing

6 years agoRollup merge of #45535 - topecongiro:bootstrap-exit-code, r=kennytm
kennytm [Sat, 28 Oct 2017 07:56:22 +0000 (15:56 +0800)]
Rollup merge of #45535 - topecongiro:bootstrap-exit-code, r=kennytm

Return 0 as an exit status when no subcommand is given to bootstrap

Running `./x.py` emits usage and error messages when no subcommand is given:
```
Usage: x.py <subcommand> [options] [<paths>...]

Subcommands:
    build       Compile either the compiler or libraries
    test        Build and run some test suites
    bench       Build and run some benchmarks
    doc         Build documentation
    clean       Clean out build directories
    dist        Build distribution artifacts
    install     Install distribution artifacts

To learn more about a subcommand, run `./x.py <subcommand> -h`

failed to run: /home/topecongiro/rust/build/bootstrap/debug/bootstrap
```
IMHO the last line is unnecessary. This PR removes it by changing the return code of `bootstrap` to 0 when no sub command is given.

6 years agoRollup merge of #45505 - spk:use-expect-instead-unwrap, r=kennytm
kennytm [Sat, 28 Oct 2017 07:56:21 +0000 (15:56 +0800)]
Rollup merge of #45505 - spk:use-expect-instead-unwrap, r=kennytm

Use expect for current_dir on librustc/session mod

Reference bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=871638

Like described on the reference bug report:

~~~
$ mkdir dir
$ cd dir
$ rm -rf ../dir
$ RUST_BACKTRACE=1 rustc -C target-cpu=help
error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: run with `RUST_BACKTRACE=1` for a backtrace

thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: Error { repr: Os { code: 2, message: "No such file or directory" } }', src/libcore/result.rs:837
stack backtrace:
   1:     0x7f7d23970dda - <unknown>
   2:     0x7f7d2398305f - <unknown>
   3:     0x7f7d2397f8a5 - <unknown>
   4:     0x7f7d2397ffc7 - std::panicking::rust_panic_with_hook::h109e116a3a861224
   5:     0x7f7d2397fe54 - <unknown>
   6:     0x7f7d2397fd79 - std::panicking::begin_panic_fmt::h26713cea9bce3ab0
   7:     0x7f7d2397fd07 - rust_begin_unwind
   8:     0x7f7d239cb41d - core::panicking::panic_fmt::hcfbb59eeb7f27f75
   9:     0x7f7d20be63d3 - <unknown>
  10:     0x7f7d20d6ebcc - rustc::session::build_session_::h7a3559f2373a5d05
  11:     0x7f7d20d6dd7e - rustc::session::build_session_with_codemap::h68bc7bcd2f34eee4
  12:     0x7f7d20d6d72c - rustc::session::build_session::h437fda3c327a8bde
  13:     0x7f7d23d26030 - <rustc_driver::RustcDefaultCalls as rustc_driver::CompilerCalls<'a>>::no_input::h8047df7741757d1c
  14:     0x7f7d23d21d27 - rustc_driver::run_compiler::hafe7bbfedf95a825
  15:     0x7f7d23c57378 - <unknown>
  16:     0x7f7d2398ae0a - __rust_maybe_catch_panic
  17:     0x7f7d23c76fa8 - <unknown>
  18:     0x7f7d2397eb74 - <unknown>
  19:     0x7f7d1ed4f493 - start_thread
  20:     0x7f7d23645afe - __clone
  21:                0x0 - <unknown>
~~~

With this patch this will give instead:

~~~
error: Current directory is invalid: No such file or directory (os error 2)
~~~

6 years agoRollup merge of #45449 - frewsxcv:frewsxcv-udp-nonblocking, r=sfackler
kennytm [Sat, 28 Oct 2017 07:56:20 +0000 (15:56 +0800)]
Rollup merge of #45449 - frewsxcv:frewsxcv-udp-nonblocking, r=sfackler

Improve docs for UdpSocket::set_nonblocking.

Closes https://github.com/rust-lang/rust/issues/44050.

6 years agoRollup merge of #45421 - QuietMisdreavus:update-pulldown, r=steveklabnik
kennytm [Sat, 28 Oct 2017 07:56:19 +0000 (15:56 +0800)]
Rollup merge of #45421 - QuietMisdreavus:update-pulldown, r=steveklabnik

rustdoc: update pulldown + fix spurious rendering difference around footnotes

fixes #45420

6 years agoAuto merge of #45566 - cuviper:option-checking, r=alexcrichton
bors [Sat, 28 Oct 2017 07:08:52 +0000 (07:08 +0000)]
Auto merge of #45566 - cuviper:option-checking, r=alexcrichton

configure.py: fix --disable-option-checking and extra config paths

- indexing 'option-checking' out of `known_args` had a type error
- when option checking is disabled, don't error on duplicate args, just take the last
- add config.toml stubs for datadir, infodir, and localstatedir (which were already accepted, but broken)

---

This fixes a regression from 1.21 to beta, when the configure script was rewritten in python.

6 years agoAuto merge of #45503 - thombles:tk/i44339-v5, r=petrochenkov
bors [Sat, 28 Oct 2017 03:02:17 +0000 (03:02 +0000)]
Auto merge of #45503 - thombles:tk/i44339-v5, r=petrochenkov

Improve diagnostics when list of tokens has incorrect separators

Make `parse_seq_to_before_tokens` more resilient to error conditions. Where possible it is better if it can consume up to the final bracket before returning. This change improves the diagnostics in a couple of situations:

```
struct S(pub () ()); // omitted separator
use std::{foo. bar}; // used a similar but wrong separator
```

Fixes #44339
r? @petrochenkov

6 years agoRemove 'future Rust version' code block in diagnostic text.
Corey Farwell [Sat, 28 Oct 2017 02:49:56 +0000 (22:49 -0400)]
Remove 'future Rust version' code block in diagnostic text.

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

6 years agoUse rls-data 0.12
Igor Matuszewski [Fri, 27 Oct 2017 21:53:57 +0000 (23:53 +0200)]
Use rls-data 0.12

6 years agoMove type_has_metadata to trans_utils
Paul Liétar [Fri, 27 Oct 2017 21:36:18 +0000 (23:36 +0200)]
Move type_has_metadata to trans_utils

6 years agoEncode urls
Guillaume Gomez [Fri, 27 Oct 2017 21:09:10 +0000 (23:09 +0200)]
Encode urls

6 years agoChange sidebar items order
Guillaume Gomez [Thu, 26 Oct 2017 22:16:44 +0000 (00:16 +0200)]
Change sidebar items order

6 years agoImprove sidebar rendering and add methods list
Guillaume Gomez [Tue, 10 Oct 2017 21:39:10 +0000 (23:39 +0200)]
Improve sidebar rendering and add methods list

6 years agofix rebase
Paul Liétar [Fri, 27 Oct 2017 20:58:17 +0000 (22:58 +0200)]
fix rebase

6 years agoUndo changes to core::ptr
Paul Liétar [Thu, 5 Oct 2017 00:12:59 +0000 (02:12 +0200)]
Undo changes to core::ptr

6 years agoImplement RFC 1861: Extern types
Paul Lietar [Sun, 3 Sep 2017 18:53:58 +0000 (19:53 +0100)]
Implement RFC 1861: Extern types

6 years agoDocument that call expressions also represent ADT constructors.
leonardo.yvens [Fri, 27 Oct 2017 18:27:59 +0000 (16:27 -0200)]
Document that call expressions also represent ADT constructors.

This is a rather obscure part of the language.

6 years agoAuto merge of #45285 - alexcrichton:update-bootstrap, r=Mark-Simulacrum
bors [Fri, 27 Oct 2017 18:00:32 +0000 (18:00 +0000)]
Auto merge of #45285 - alexcrichton:update-bootstrap, r=Mark-Simulacrum

Bump to 1.23 and update bootstrap

This commit updates the bootstrap compiler, bumps the version to 1.23, updates
Cargo, updates books, and updates crates.io dependencies

6 years agoFix tidy error line longer than 100 chars
Laurent Arnoud [Fri, 27 Oct 2017 17:31:33 +0000 (19:31 +0200)]
Fix tidy error line longer than 100 chars

6 years agoQuit immediately when current directory is invalid
Laurent Arnoud [Fri, 27 Oct 2017 17:14:03 +0000 (19:14 +0200)]
Quit immediately when current directory is invalid

Thanks-to: @kennytm
6 years agoEmit crate disambiguators in save-analysis data
Igor Matuszewski [Sun, 15 Oct 2017 21:27:17 +0000 (23:27 +0200)]
Emit crate disambiguators in save-analysis data

6 years agoUpdate license exceptions.
kennytm [Fri, 27 Oct 2017 14:12:51 +0000 (22:12 +0800)]
Update license exceptions.

The `zircon` crates have been renamed as `fuchsia-zircon`.

6 years agoAuto merge of #45570 - nrc:manifest-no-rls, r=alexcrichton
bors [Fri, 27 Oct 2017 15:03:47 +0000 (15:03 +0000)]
Auto merge of #45570 - nrc:manifest-no-rls, r=alexcrichton

Don't fail to build a manifest if a tarball is missing

This is guesswork because I can't test build_manifest nor do I know what is actually causing the error to begin with. My hypothesis is that when we try to find the version from the RLS tarball and the tarball is not there, then we panic. I attempt to fix this by making the version string optional, then not adding the RLS package, rename, and extension component if the version is missing.

In theory, this should fix the broken nightlies.

r? @alexcrichton

6 years agoAuto merge of #45531 - steveklabnik:fix-unstable-book-formatting, r=kennytm
bors [Fri, 27 Oct 2017 11:16:27 +0000 (11:16 +0000)]
Auto merge of #45531 - steveklabnik:fix-unstable-book-formatting, r=kennytm

Fix formatting in unstable book's attr-literals section

6 years agoFixed rustc_on_unimplemented example in Unstable Book
Nadav Zingerman [Fri, 27 Oct 2017 09:42:44 +0000 (12:42 +0300)]
Fixed rustc_on_unimplemented example in Unstable Book

6 years agoAuto merge of #45353 - wesleywiser:untracked_queries, r=michaelwoerister
bors [Fri, 27 Oct 2017 08:34:45 +0000 (08:34 +0000)]
Auto merge of #45353 - wesleywiser:untracked_queries, r=michaelwoerister

[incremental] Add support for eval always queries

Part of #45238

6 years agoDon't fail to build a manifest if a tarball is missing
Nick Cameron [Fri, 27 Oct 2017 05:46:16 +0000 (18:46 +1300)]
Don't fail to build a manifest if a tarball is missing

6 years agoAuto merge of #45524 - alexcrichton:improve-park-unpark, r=dtolnay
bors [Fri, 27 Oct 2017 02:19:16 +0000 (02:19 +0000)]
Auto merge of #45524 - alexcrichton:improve-park-unpark, r=dtolnay

std: Optimize thread park/unpark implementation

This is an adaptation of alexcrichton/futures-rs#597 for the standard library.
The goal here is to avoid locking a mutex on the "fast path" for thread
park/unpark where you're waking up a thread that isn't sleeping or otherwise
trying to park a thread that's already been notified. Mutex performance varies
quite a bit across platforms so this should provide a nice consistent speed
boost for the fast path of these functions.

6 years agoReturn 0 when ./x.py has no subcommand
topecongiro [Wed, 25 Oct 2017 21:03:07 +0000 (06:03 +0900)]
Return 0 when ./x.py has no subcommand

6 years agoconfig.toml: Add stubs for recognized-but-unused install paths
Josh Stone [Thu, 26 Oct 2017 23:30:17 +0000 (16:30 -0700)]
config.toml: Add stubs for recognized-but-unused install paths

... specifically `datadir`, `infodir`, and `localstatedir`.  These were
already accepted by `configure.py`, but it didn't have any place to put
the values.

6 years agoconfigure.py: fix --disable-option-checking
Josh Stone [Thu, 26 Oct 2017 22:56:59 +0000 (15:56 -0700)]
configure.py: fix --disable-option-checking

Getting the value of this argument needs another level of indexing,
as `known_args` are stored in `{dict}[list](opt, value)` form.

Also, when option-checking is disabled, let this bypass the check that
options are only passed once, and just apply the last value.

6 years agoAuto merge of #45523 - alexcrichton:improve-libbacktrace, r=sfackler
bors [Thu, 26 Oct 2017 23:48:16 +0000 (23:48 +0000)]
Auto merge of #45523 - alexcrichton:improve-libbacktrace, r=sfackler

std: Disable usage of mmap allocator in libbacktrace

This is sort of a long overdue change from the investigation in #29293
and #37477. The released binaries of rustc don't have debug information and so
don't actively suffer this problem but this can hit local development of rustc
and also larger programs compiled against libstd generating backtraces.

The main purpose of the mmap allocator in libacktrace is to be usable from a
signal handler, but we don't do that, so the normal allocator using malloc/free
should work well for us.

6 years agoSwitch several crate-wide queries to use eval_always
Wesley Wiser [Mon, 23 Oct 2017 23:08:08 +0000 (19:08 -0400)]
Switch several crate-wide queries to use eval_always

Closes #45238

6 years agoHandle eval_always queries in force()
Wesley Wiser [Mon, 23 Oct 2017 22:10:29 +0000 (18:10 -0400)]
Handle eval_always queries in force()

Part of #45238

6 years agoAllow declaring a DepNode as eval_always
Wesley Wiser [Mon, 23 Oct 2017 22:07:21 +0000 (18:07 -0400)]
Allow declaring a DepNode as eval_always

Part of #45238

6 years ago[incremental] Add support for eval always queries
Wesley Wiser [Wed, 18 Oct 2017 02:50:33 +0000 (22:50 -0400)]
[incremental] Add support for eval always queries

Part of #45238

6 years agoBump to 1.23 and update bootstrap
Alex Crichton [Sat, 14 Oct 2017 15:20:03 +0000 (08:20 -0700)]
Bump to 1.23 and update bootstrap

This commit updates the bootstrap compiler, bumps the version to 1.23, updates
Cargo, updates books, and updates crates.io dependencies

6 years agoAuto merge of #45522 - michaelwoerister:fix-stable-hasher-cross, r=arielb1
bors [Thu, 26 Oct 2017 20:58:08 +0000 (20:58 +0000)]
Auto merge of #45522 - michaelwoerister:fix-stable-hasher-cross, r=arielb1

Fix 32- vs 64-bit platform instability in StableHasher.

This might already be enough to fix issue https://github.com/rust-lang/rust/issues/45500.

r? @alexcrichton

6 years agoAuto merge of #45519 - michaelwoerister:dedup-errors, r=arielb1
bors [Thu, 26 Oct 2017 18:16:15 +0000 (18:16 +0000)]
Auto merge of #45519 - michaelwoerister:dedup-errors, r=arielb1

Don't emit the same compiler diagnostic twice.

This PR makes the compiler filter out diagnostic messages that have already been emitted during the same compilation session.

6 years agorelax restriction - allow errors to be emmitted within macro spans, as long as the...
Virgil Palanciuc [Thu, 26 Oct 2017 16:34:39 +0000 (09:34 -0700)]
relax restriction - allow errors to be emmitted within macro spans, as long as the same error message has not been used before (i.e. use the None as the span key, for errors that occur within macros)

6 years agoUse expect for current_dir on librustc/session mod
Laurent Arnoud [Tue, 24 Oct 2017 20:07:50 +0000 (22:07 +0200)]
Use expect for current_dir on librustc/session mod

6 years agoincr.comp.: Update overflow-check logic in HIR hashing.
Michael Woerister [Thu, 26 Oct 2017 14:21:37 +0000 (16:21 +0200)]
incr.comp.: Update overflow-check logic in HIR hashing.

6 years agoincr.comp.: Fix invalid DepNode assignment in HIR map.
Michael Woerister [Thu, 26 Oct 2017 13:50:29 +0000 (15:50 +0200)]
incr.comp.: Fix invalid DepNode assignment in HIR map.

6 years agoAuto merge of #45380 - dotdash:arg_copies, r=arielb1
bors [Thu, 26 Oct 2017 14:14:15 +0000 (14:14 +0000)]
Auto merge of #45380 - dotdash:arg_copies, r=arielb1

Avoid unnecessary copies of arguments that are simple bindings

Initially MIR differentiated between arguments and locals, which
introduced a need to add extra copies assigning the argument to a
local, even for simple bindings. This differentiation no longer exists,
but we're still creating those copies, bloating the MIR and LLVM IR we
emit.

Additionally, the current approach means that we create debug info for
both the incoming argument (marking it as an argument), and then
immediately shadow it a local that goes by the same name. This can be
confusing when using e.g. "info args" in gdb, or when e.g. a debugger
with a GUI displays the function arguments separately from the local
variables, especially when the binding is mutable, because the argument
doesn't change, while the local variable does.

6 years agoImprove docs for UdpSocket::set_nonblocking.
Corey Farwell [Sun, 22 Oct 2017 13:27:26 +0000 (09:27 -0400)]
Improve docs for UdpSocket::set_nonblocking.

Closes https://github.com/rust-lang/rust/issues/44050.

6 years agocargotest: Update xsv.
kennytm [Thu, 26 Oct 2017 13:50:45 +0000 (21:50 +0800)]
cargotest: Update xsv.

This fixes a flaky test which caused spurious failures in #45348 and #45380

6 years agoRemove 'just' in diagnostics
steveklabnik [Thu, 26 Oct 2017 13:27:20 +0000 (09:27 -0400)]
Remove 'just' in diagnostics

This is better writing

6 years agoAdd comments to clarify function argument ownership
Björn Steinbrink [Wed, 25 Oct 2017 11:04:59 +0000 (13:04 +0200)]
Add comments to clarify function argument ownership

6 years agoAvoid unnecessary copies of arguments that are simple bindings
Björn Steinbrink [Wed, 11 Oct 2017 18:49:36 +0000 (20:49 +0200)]
Avoid unnecessary copies of arguments that are simple bindings

Initially MIR differentiated between arguments and locals, which
introduced a need to add extra copies assigning the argument to a
local, even for simple bindings. This differentiation no longer exists,
but we're still creating those copies, bloating the MIR and LLVM IR we
emit.

Additionally, the current approach means that we create debug info for
both the incoming argument (marking it as an argument), and then
immediately shadow it a local that goes by the same name. This can be
confusing when using e.g. "info args" in gdb, or when e.g. a debugger
with a GUI displays the function arguments separately from the local
variables, especially when the binding is mutable, because the argument
doesn't change, while the local variable does.

6 years agoUpdate some comments about StableHasher.
Michael Woerister [Thu, 26 Oct 2017 09:10:07 +0000 (11:10 +0200)]
Update some comments about StableHasher.

6 years agoadd graphvis DOT files to dump mir directory
Mikhail Modin [Tue, 24 Oct 2017 11:48:39 +0000 (14:48 +0300)]
add graphvis DOT files to dump mir directory

6 years agoAuto merge of #45488 - oli-obk:ctfe_resolve, r=eddyb
bors [Thu, 26 Oct 2017 07:04:33 +0000 (07:04 +0000)]
Auto merge of #45488 - oli-obk:ctfe_resolve, r=eddyb

Resolve types properly in const eval

r? @eddyb

cc @arielb1

6 years agoAuto merge of #45464 - sinkuu:ice_44851, r=jseyfried
bors [Thu, 26 Oct 2017 04:32:16 +0000 (04:32 +0000)]
Auto merge of #45464 - sinkuu:ice_44851, r=jseyfried

Visit attribute tokens in `DefCollector` and `BuildReducedGraphVisitor`

Fixes #44851.

6 years agoAuto merge of #45096 - DSpeckhals:update-rls-data-for-save-analysis, r=alexcrichton
bors [Thu, 26 Oct 2017 00:58:52 +0000 (00:58 +0000)]
Auto merge of #45096 - DSpeckhals:update-rls-data-for-save-analysis, r=alexcrichton

Update rls-data for save analysis

rls-data: 0.10 -> 0.11

This will allow for more fine-grained save analysis for enum variants (tuple and struct).

The first commit updates rls-data, and makes the changes to dump_visitor. The second commit updates the rls submodule, and removes "members" that were deleted from that update in src/Cargo.toml.

Note, that when building the project, rustfmt-nightly was updated in Cargo.lock. If these changes should be excluded, I can revert it.

cc/ @nrc

6 years agoAdd FIXME
sinkuu [Thu, 26 Oct 2017 00:28:25 +0000 (09:28 +0900)]
Add FIXME

6 years agofix #44953 - The “use of unstable library feature 'rustc_private'” error is very...
Virgil Palanciuc [Wed, 25 Oct 2017 23:56:13 +0000 (16:56 -0700)]
fix #44953 - The “use of unstable library feature 'rustc_private'” error is very repetitive

6 years agoAuto merge of #45532 - kennytm:rollup, r=kennytm
bors [Wed, 25 Oct 2017 22:21:44 +0000 (22:21 +0000)]
Auto merge of #45532 - kennytm:rollup, r=kennytm

Rollup of 7 pull requests

- Successful merges: #45059, #45212, #45398, #45483, #45496, #45508, #45526
- Failed merges:

6 years agoRollup merge of #45526 - alexcrichton:test-more-asm, r=aturon
kennytm [Wed, 25 Oct 2017 19:02:54 +0000 (03:02 +0800)]
Rollup merge of #45526 - alexcrichton:test-more-asm, r=aturon

ci: Test more asmjs again

This was accidentally added in #45352, forgot to back it out!

6 years agoRollup merge of #45508 - bgermann:master, r=alexcrichton
kennytm [Wed, 25 Oct 2017 19:02:53 +0000 (03:02 +0800)]
Rollup merge of #45508 - bgermann:master, r=alexcrichton

Disable jemalloc for sparcv9-sun-solaris

Similar to #36994, rust programs segfault on SPARC64 Solaris machines.

6 years agoRollup merge of #45496 - kennytm:bootstrap-fix-extension-check, r=alexcrichton
kennytm [Wed, 25 Oct 2017 19:02:52 +0000 (03:02 +0800)]
Rollup merge of #45496 - kennytm:bootstrap-fix-extension-check, r=alexcrichton

rustbuild: Fix `no output generated` error for next bootstrap cargo.

Due to rust-lang/cargo#4570, a `*.dll.lib` file is uplifted when building dynamic libraries on Windows. The current bootstrap code does not understand files with multiple extensions, and will instead assume `xxxx.dll` is the file name. This caused a `no output generated` error because it tries to search for `xxxx.dll-hash.lib` inside the `deps/` folder, while it should check for `xxxx-hash.dll.lib` instead.

This PR is blocking #45285, see https://github.com/rust-lang/rust/pull/45285#issuecomment-338454149 and the rest of the comments for detail.

6 years agoRollup merge of #45483 - mbrubeck:hash, r=alexcrichton
kennytm [Wed, 25 Oct 2017 19:02:51 +0000 (03:02 +0800)]
Rollup merge of #45483 - mbrubeck:hash, r=alexcrichton

Implement Hash for raw pointers to unsized types

This is useful for some niche cases, like a hash table of slices or trait objects where the key is the raw pointer.  Example use case: https://docs.rs/by_address