Commit Graph

69103 Commits

Author SHA1 Message Date
kennytm
63ad1293cc Rollup merge of #45652 - malbarbo:x32-2, r=alexcrichton
More fixes for x86_64-unknown-linux-gnux32

This update libc (all libc testing are passing) and fixes NR_GETRANDOM.

Fix all but one run-pass test (lto-unwind.rs, see https://github.com/rust-lang/rust/issues/45416)
2017-11-01 13:32:18 +08:00
kennytm
2d53d94c3b Rollup merge of #45650 - michaelwoerister:per-crate-type-symbol-threshold, r=alexcrichton
Take crate-type into account when generating symbol export lists (linker version scripts)

r? @alexcrichton
cc https://github.com/rust-lang/rust/issues/45613
2017-11-01 13:32:17 +08:00
kennytm
57b4658a2b Rollup merge of #45649 - tbu-:pr_doc_bufread_eof, r=estebank
Add a hint what `BufRead` functions do on EOF
2017-11-01 13:32:16 +08:00
kennytm
e9b5c86c03 Rollup merge of #45648 - tbu-:pr_doc_unix_ext, r=estebank
Update doc comment for the Unix extension module

It was a bit outdated, claimed to be able to do less than it actually
could.
2017-11-01 13:32:15 +08:00
kennytm
cf0fe06bb9 Rollup merge of #45646 - sinkuu:dead-code-alias-in-pat, r=arielb1
Count type aliases used in patterns as usage by dead_code lint

Fixes #45614.
2017-11-01 13:32:14 +08:00
kennytm
26af3e1c4e Rollup merge of #45644 - zackmdavis:edit_disallowed_inner_attr_note, r=estebank
edit and fix bad spacing of inner-attribute-not-allowed note

This multiline string literal was missing a backslash, leaving an awkward
newline and 35 spaces in the middle of the message.

But while we're here, the existing message seems kind of long in comparison to
similar notes: to cut it down, we excise the mentions of doc comments, which
seems sensible because we know that this erroneous attribute is not a doc
comment (notice the `is_sugared_doc: false` at the end of the function; if it
had been a doc comment, that error would get set in the `token::DocComment`
match branch of `parse_outer_attributes`).
2017-11-01 13:32:13 +08:00
kennytm
28b18790f7 Rollup merge of #45624 - glaubitz:bootstrap-sparc64, r=kennytm
bootstrap: Add missing cputype matching for sparc64

Trying to configure rust natively on sparc64-unknown-linux-gnu currently fails with:

```
root@deb4g:/local_scratch/glaubitz/rust/rust# ./configure --host=sparc64-unknown-linux-gnu --enable-local-rust --local-rust-root=/usr/local
configure: processing command line
configure:
configure: build.host           := ['sparc64-unknown-linux-gnu']
configure: build.rustc          := /usr/local/bin/rustc
configure: build.cargo          := /usr/local/bin/cargo
configure: build.rustc          := /usr/local/bin/rustc
configure: build.cargo          := /usr/local/bin/cargo
configure: build.configure-args := ['--host=sparc64-unknown-linux-gnu', '--enable ...
unknown cpu type: sparc64
root@deb4g:/local_scratch/glaubitz/rust/rust#
```

This is trivially fixed by defining sparc64 as a valid cputype.
2017-11-01 13:32:12 +08:00
kennytm
18fa54f835 Rollup merge of #45619 - mneumann:fix-bootstrap-dragonfly, r=alexcrichton
Support Dragonfly when building Openssl
2017-11-01 13:32:11 +08:00
kennytm
e01dcf4b75 Rollup merge of #45602 - petrochenkov:ospan, r=michaelwoerister
Optimize some span operations

Do not decode span data twice/thrice/etc unnecessarily.
Applied to stable hashing and all methods in `impl Span`.

Follow up to https://github.com/rust-lang/rust/pull/44646
r? @michaelwoerister
2017-11-01 13:32:10 +08:00
kennytm
59c9d03af8 Rollup merge of #45579 - leodasvacas:document-that-call-can-be-adt-constructor, r=estebank
Document that call expressions also represent ADT constructors.

This is a rather obscure part of the language.
2017-11-01 13:32:09 +08:00
kennytm
07df45d363 Rollup merge of #45450 - GuillaumeGomez:overlap-link, r=QuietMisdreavus
Fix title heading overlap in rust doc

Fixes #45158.

To be noted that this margin only appears when a title is the first element.

<img width="1440" alt="screen shot 2017-10-22 at 16 08 44" src="https://user-images.githubusercontent.com/3050060/31862746-6411070e-b743-11e7-9a75-4159e1f7f1d6.png">

r? @rust-lang/docs
2017-11-01 13:32:08 +08:00
bors
fc3e12a03c Auto merge of #45187 - GuillaumeGomez:doc-ui-improvement, r=QuietMisdreavus
Improve sidebar rendering and add methods list

I suppose it can be reviewed as is, but this is just the first step of a more global plan.

cc @rust-lang/docs @nical

And a screenshot of course:

<img width="1440" alt="screen shot 2017-10-10 at 23 38 45" src="https://user-images.githubusercontent.com/3050060/31412170-657beaf6-ae14-11e7-9f01-1e562a034595.png">
2017-11-01 01:45:58 +00:00
bors
f3b900cc3b Auto merge of #44764 - nvzqz:master, r=alexcrichton
Implement TryFrom<&[T]> for &[T; N]

There are many cases where a buffer with a static compile-time size is preferred over a slice with a dynamic size. This allows for performing a checked conversion from `&[T]` to `&[T; N]`. This may also lead to compile-time optimizations involving `[T; N]` such as loop unrolling.

This is my first PR to Rust, so I'm not sure if discussion of this change should happen here or does it need its own RFC? I figured these changes would be a subset of #33417.
2017-10-31 23:06:37 +00:00
John Paul Adrian Glaubitz
d7dec7c8d7 bootstrap: Add missing cputype matching for sparc64 2017-10-31 19:26:41 +01:00
bors
8b22e70b2d Auto merge of #45655 - alexcrichton:mips-less-cgus, r=michaelwoerister
rustbuild: Don't build with ThinLTO on MIPS

Discovered in #45529 it looks like cross-module TLS imports aren't quite working
today, especially with `hidden` visibility which mostly comes up with multiple
codegen units. As a result this completely disables compiling with ThinLTO and
multiple codegen units on MIPS when bootstrapping.

cc #45654, the tracking issue for this
2017-10-31 14:56:06 +00:00
Alex Crichton
b1fd5a7618 rustbuild: Don't build with ThinLTO on MIPS
Discovered in #45529 it looks like cross-module TLS imports aren't quite working
today, especially with `hidden` visibility which mostly comes up with multiple
codegen units. As a result this completely disables compiling with ThinLTO and
multiple codegen units on MIPS when bootstrapping.

cc #45654, the tracking issue for this
2017-10-31 07:01:02 -07:00
Marco A L Barbosa
8e962433f9 Fix NR_GETRANDOM for linux x32 2017-10-31 11:28:44 -02:00
Marco A L Barbosa
40edeccad6 Bump libc to 0.2.33 2017-10-31 11:25:39 -02:00
Michael Woerister
d3951ff5e1 Add regression test for symbol visibility when compiling rlib+cdylib in one session. 2017-10-31 14:00:28 +01:00
Michael Woerister
c13e35eb2e Take crate-type into account when computing symbol export list. 2017-10-31 12:42:03 +01:00
Tobias Bucher
66268e8a8d Add a hint what BufRead functions do on EOF 2017-10-31 11:04:08 +01:00
Tobias Bucher
afc7106a29 Update doc comment for the Unix extension module
It was a bit outdated, claimed to be able to do less than it actually
could.
2017-10-31 10:41:10 +01:00
bors
6713736275 Auto merge of #45551 - michaelwoerister:fix-hir-depnodes-and-ich, r=nikomatsakis
incr.comp.: Fix two problems with HIR hashing.

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

This PR fixes two small problems:
* Overflow checks are always enabled in a constant context, so we need to hash spans of potentially overflowing operations. (Eventually I'd like to handle spans differently so we don't have to make HIR hashing know so much about things like this.)
* The HIR map collector had a bug where it would assign the `DepNode::Hir` instead of the corresponding `DepNode::HirBody` in some nested contexts.

r? @nikomatsakis
2017-10-31 05:03:25 +00:00
sinkuu
b67d72b434 Count type aliases in patterns 2017-10-31 11:57:40 +09:00
bors
f57c55d54d Auto merge of #45550 - kennytm:update-xsv, r=BurntSushi
cargotest: Update xsv.

This fixes a flaky test which caused spurious failures in #45348 and #45380.
2017-10-31 00:53:12 +00:00
Zack M. Davis
42ef3f1784 edit and fix bad spacing of inner-attribute-not-allowed note
This multiline string literal was missing a backslash, leaving an awkward
newline and 35 spaces in the middle of the message.

But while we're here, the existing message seems kind of long in comparison to
similar notes: to cut it down, we excise the mentions of doc comments, which
seems sensible because we know that this erroneous attribute is not a doc
comment (notice the `is_sugared_doc: false` at the end of the function; if it
had been a doc comment, that error would get set in the `token::DocComment`
match branch of `parse_outer_attributes`).
2017-10-30 17:11:33 -07:00
bors
2d3b96691e Auto merge of #45497 - mikhail-m1:dump-mir-graphviz, r=nikomatsakis
add graphvis DOT files to dump mir directory

r? @nikomatsakis
2017-10-30 21:22:40 +00:00
Niko Matsakis
b2c2ba4eb5
tweak the description
"in addition to" sounds better than "additionally to"
2017-10-30 10:22:35 -04:00
bors
f0fe716dbc Auto merge of #45626 - wesleywiser:doc_update_1, r=Mark-Simulacrum
Add link to stablized version of an intrinsic
2017-10-30 08:52:40 +00:00
bors
86d1178320 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`](0f0f5db465/src/librustc_borrowck/borrowck/check_loans.rs (L398-L403)) so the result can be checked in [`report_error_if_loans_conflict`](0f0f5db465/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
2017-10-30 06:17:39 +00:00
Wesley Wiser
9ca825e292 Add link to stablized version of an intrinsic 2017-10-29 22:53:07 -04:00
bors
875ec8d597 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
2017-10-30 02:33:52 +00:00
Josh Leeb-du Toit
cf10bcfe48 Move issue-42106 test from compile-fail to ui 2017-10-30 11:28:44 +11:00
bors
dae6868637 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
2017-10-29 23:59:07 +00:00
Josh Leeb-du Toit
37f2382435 Refactor if block to use idiomatic matches 2017-10-30 09:58:09 +11:00
bors
90ef3372e8 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.
2017-10-29 21:25:12 +00:00
Josh Leeb-du Toit
014e61094a Refactor matches to use Result::err 2017-10-30 08:21:56 +11:00
Dustin Speckhals
e3bf19d8d4 Update rustfmt again 2017-10-29 15:16:02 -04:00
Vadim Petrochenkov
bf0cdb52f2 Add several lints into unused lint group
Remove a couple of obsolete lints
2017-10-29 22:14:23 +03:00
bors
2d3afa6833 Auto merge of #45616 - fhartwig:ptr-docs, r=dtolnay
Fix references to zero_memory and copy_memory in ptr docs

Fixes #45606
2017-10-29 18:44:16 +00:00
Michael Neumann
aa4726cd37 Support Dragonfly when building Openssl 2017-10-29 18:42:04 +01:00
kennytm
30828c58e7
Update cargo.
Brings in rust-lang/cargo#4672, unbreaks nightly on macOS APFS.
2017-10-30 01:32:08 +08:00
Dustin Speckhals
d284815f72 Merge branch 'master' into rustfmt-update 2017-10-29 13:27:06 -04:00
bors
690ff04594 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
2017-10-29 15:22:38 +00:00
Florian Hartwig
9e966ad3dc Fix references to zero_memory and copy_memory in ptr docs 2017-10-29 15:40:09 +01:00
Manish Goregaokar
84f1fc951d
Update clippy 2017-10-29 05:27:36 -04:00
bors
7d475a28df 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
2017-10-29 06:24:20 +00:00
Bryan Tan
84ab6aec43 Add no_run to process examples involving unix commands 2017-10-28 20:27:05 -07:00
bors
1fdcf52df4 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
2017-10-29 02:16:24 +00:00
Josh Leeb-du Toit
975ff7b7a0 Add test for fix duplicate display of E0502 2017-10-29 12:14:14 +11:00