Commit Graph

65982 Commits

Author SHA1 Message Date
Mark Simulacrum
fd2331c269 Rollup merge of #43421 - alexcrichton:add-some-build-scripts, r=Mark-Simulacrum
rustc: Add some build scripts for librustc crates

This commit adds some "boilerplate" build scripts to librustc/libsyntax crates
to declare dependencies on various environment variables that are configured
throughout the build. Cargo recently gained the ability to depend on environment
variables in build scripts which can help trigger recompilation of a crate.

This should fix weird bugs where after you make a commit or a few days later
you'll get weird "not built with the same compiler" errors hopefully.
2017-07-24 09:16:37 -06:00
Mark Simulacrum
bf5d6617fd Rollup merge of #43401 - cuviper:homogeneous, r=Mark-Simulacrum
Correct the spelling of "homogeneous"

None
2017-07-24 09:16:36 -06:00
Mark Simulacrum
d1ba747edc Rollup merge of #43379 - s3rvac:fix-exit-status-success-description, r=GuillaumeGomez
Add a missing verb to the description of std::process::ExitStatus::success()

"Signal termination not considered" -> "Signal termination **is** not considered"

The first line of the description was rewrapped so it fits into 80 characters.
2017-07-24 09:16:35 -06:00
Mark Simulacrum
32e607d4a8 Rollup merge of #43374 - stjepang:fix-sort-randomization-comment, r=alexcrichton
Clarify that sort_unstable is deterministic

@frankmcsherry complained that the documentation said "it is randomized but deterministic", which is a contradictory statement.

This PR uses a different and clearer wording.
2017-07-24 09:16:34 -06:00
Mark Simulacrum
f1537da0e8 Rollup merge of #43366 - leshow:bufreader-docs, r=aturon
Fix docs: BufReader/File doesn't need to be mut

Neither `BufReader` nor `File` need to be declared `mut` for most of these examples. The cookbook example using `BufReader` doesn't declare them as `mut` either (https://brson.github.io/rust-cookbook/basics.html#ex-std-read-lines).
2017-07-24 09:16:33 -06:00
Mark Simulacrum
7e72b41d0c Rollup merge of #43361 - michaelwoerister:remove-retrace-path, r=nikomatsakis
Remove unused DefPathTable::retrace_path()

`DefPathTable::retrace_path()` is not used anymore for a while now and removing it also removes the need to build the costly `DefPathTable::key_to_index` map for every upstream crate.

cc #43300

r? @eddyb
2017-07-24 09:16:32 -06:00
Mark Simulacrum
295a789abf Rollup merge of #43342 - ranweiler:no-std-exe-docs, r=alexcrichton
Document use of `compiler_builtins` with `no_std` binaries

See discussion in #43264.

The docs for the `compiler_builtins_lib` feature were removed in
PR #42899. But, though the `compiler_builtins` library has been
migrated out-of-tree, the language feature remains, and is needed to
use the stand-alone crate. So, we reintroduce the docs for the
feature, and add a reference to them when describing how to create a
`no_std` executable.
2017-07-24 09:16:32 -06:00
Mark Simulacrum
da241182ee Rollup merge of #43322 - redox-os:redox_liblibc, r=alexcrichton
Update liblibc

This updates liblibc to the latest master and fixes #43305
2017-07-24 09:16:31 -06:00
Mark Simulacrum
953f381663 Rollup merge of #43297 - infinity0:master, r=alexcrichton
configure: allow distros to disable debuginfo-only-std

This allows builders to generate debugging information for everything, even in a stable release build. This is useful for distros like Fedora (already carrying a [similar patch](https://src.fedoraproject.org/cgit/rpms/rust.git/tree/rust-1.16.0-configure-no-override.patch)) and Debian that automatically put all debuginfo in separate "debug symbol" packages.

This commit preserves the default behaviour of switching these on when a non-dev channel is selected, but allows the user to override this via the `./configure` command line.

In theory, one could also do this via `bootstrap/config.toml` but it doesn't work currently due to #43295.
2017-07-24 09:16:30 -06:00
Mark Simulacrum
fef9b48252 Make dist equivalent to old build system. 2017-07-24 09:05:27 -06:00
bors
5669c9988f Auto merge of #43436 - zackmdavis:union_doc_fields_section_layout, r=GuillaumeGomez
rustdoc: fix layout of Fields section in documentation for unions

Previously, the union fields would all render on the same line with
hideous spacing; comparison to the analogous section for structs makes
it undoubtable that `display: block` is the true intent.

Concisely and definitively resolves #43404 and its perfidious
malignancy.
2017-07-24 11:44:11 +00:00
Luca Barbato
9ed8cf87a6 Add support for PowerPC Altivec/VSX intrinsics 2017-07-24 09:08:20 +00:00
bors
513906c43d Auto merge of #43327 - nrc:rls-config, r=eddyb
Use a config struct for save-analysis

Replaces some existing customisation options, including removing the -Zsave-analysis-api flag

r? @eddyb
2017-07-24 07:29:25 +00:00
Nick Cameron
587a35da68 Make keep_ast configurable by driver clients 2017-07-24 17:25:16 +12:00
Nick Cameron
81fd86e068 Catch a panic in save-analysis 2017-07-24 17:25:16 +12:00
Nick Cameron
5134a5f02c Remove save-analysis-api references from tests and rustbuild 2017-07-24 17:25:16 +12:00
Nick Cameron
ad8ecc20a2 Point RLS submodule at a branch with required changes
And cargo update
2017-07-24 17:25:15 +12:00
bors
9a70c3a372 Auto merge of #43280 - lfairy:token-tree-iter-clone, r=nrc
Add #[derive(Clone)] to TokenTreeIter

I've found this useful for writing backtracking parsers.

The underlying `Cursor` implements `Clone` already, so it's just a matter of adding `#[derive(Clone)]` to the type.

r? @jseyfried
2017-07-24 04:59:46 +00:00
bors
6e0dc54872 Auto merge of #43413 - mandeep:ops-generics, r=alexcrichton
Add generic example of std::ops::Sub in doc comments

This PR adds an example of using generics with std::ops::Sub and is a follow up of PR #41612 and is related to issue #29365. I also wanted to add examples to Mul and Div, but I think these two traits are already loaded with examples.
2017-07-24 00:24:16 +00:00
Zack M. Davis
749dcbaa88 rustdoc: add unions to whitelist of sidebar types
This resolves #43405.
2017-07-23 17:18:58 -07:00
bors
afe145d227 Auto merge of #43096 - estebank:ascription-help, r=nikomatsakis
Point at `:` when using it instead of `;`

When triggering type ascription in such a way that we can infer a
statement end was intended, add a suggestion for the change. Always
point out the reason for the expectation of a type is due to type
ascription.

Fix #42057, #41928.
2017-07-23 20:56:20 +00:00
Zack M. Davis
0fdb502710 rustdoc: fix layout of Fields section in documentation for unions
Previously, the union fields would all render on the same line with
hideous spacing; comparison to the analogous section for structs makes
it undoubtable that `display: block` is the true intent.

Concisely and definitively resolves #43404 and its perfidious
malignancy.
2017-07-23 11:37:53 -07:00
bors
f3e26a02eb Auto merge of #43386 - oli-obk:suggestions, r=nikomatsakis
Adjust new suggestions to the suggestion guidelines

Addresses https://github.com/rust-lang/rust/pull/42033#discussion_r127694915

guidelines are https://github.com/rust-lang/rust/blob/master//src/librustc_errors/diagnostic.rs#L212-L224
2017-07-23 18:13:20 +00:00
Mark Simulacrum
a88a09c716 Do not run pretty tests by default. 2017-07-23 09:54:42 -06:00
Bruce Mitchener
539df8121b Fix some doc/comment typos. 2017-07-23 22:48:01 +07:00
bors
6270257f4e Auto merge of #43416 - tshepang:extra-layer, r=alexcrichton
doc: provide an actual equivalent to filter_map
2017-07-23 13:04:12 +00:00
bors
3cf2c04c79 Auto merge of #43256 - Others:patch-1, r=steveklabnik
Improve panic docs for Instant::duration_since

The docs for Instant::duration_since has a confusing section on panicking. It's
much more clear without the second two sentences of description.
2017-07-23 09:26:50 +00:00
Alex Crichton
02219642bc rustc: Add some build scripts for librustc crates
This commit adds some "boilerplate" build scripts to librustc/libsyntax crates
to declare dependencies on various environment variables that are configured
throughout the build. Cargo recently gained the ability to depend on environment
variables in build scripts which can help trigger recompilation of a crate.

This should fix weird bugs where after you make a commit or a few days later
you'll get weird "not built with the same compiler" errors hopefully.
2017-07-22 22:04:13 -07:00
bors
764b57ef56 Auto merge of #43406 - canndrew:never-impl-clone, r=alexcrichton
Add missing `!: Clone` impl

Fixes #43296

(untested because I'm having computer troubles, but a one-liner can't break anything right?)
2017-07-23 04:25:39 +00:00
bors
ef19bd1a33 Auto merge of #43387 - TimNN:rustllvm50, r=alexcrichton
Update Rust LLVM bindings for LLVM 5.0

This is the initial set of changes to update the rust llvm bindings for 5.0. The llvm commits necessitating these changes are linked from the tracking issue, #43370.
2017-07-23 01:57:37 +00:00
Luca Barbato
bae663b236 Add support for the VSX and Altivec features on PowerPC 2017-07-23 00:16:43 +00:00
bors
c35a0c1d05 Auto merge of #43382 - mmatyas:aarch64_ignore-stack-probes, r=alexcrichton
Ignore stack probe tests on AArch64

Stack probes are only implemented for x86, and as such currently fail on AArch64. This patch ignores those tests on this architecture.

Fixes #43356.

r? @alexcrichton
2017-07-22 23:24:09 +00:00
Tshepang Lekhonkhobe
fc90064546 doc: provide an actual equivalent to filter_map 2017-07-22 23:22:01 +02:00
Simon Sapin
0d1864b8cf Remove unnecessary unsafe in test/ui/print_type_sizes/nullable.rs 2017-07-22 20:38:40 +02:00
Simon Sapin
ff7f220a43 Don’t create NonZero(0) in test/ui/print_type_sizes/nullable.rs 2017-07-22 20:38:40 +02:00
Simon Sapin
f732911cf5 Fix unstable feature name for some impls for Unique<T> 2017-07-22 20:38:40 +02:00
Simon Sapin
1ba8b15321 Use safe conversion instead of unsafe constructor in issue-23433 test 2017-07-22 20:38:40 +02:00
Simon Sapin
06e130fb24 Use checked NonZero constructor in MIR move path indices
… to protect against UB in the unlikely case that `idx + 1` overflows.
2017-07-22 20:38:40 +02:00
Simon Sapin
13d17adf60 Use checked NonZero constructor in obligation forest NodeIndex
… to remove an `unsafe` block.
2017-07-22 20:38:40 +02:00
Simon Sapin
938552a228 Use checked NonZero constructor instead of explicit null check in btree 2017-07-22 20:38:40 +02:00
Simon Sapin
a4edae95ad Add conversions from references to NonZero pointers, Unique, and Shared 2017-07-22 20:38:40 +02:00
Simon Sapin
cbd2b6b484 Add Box::into_unique 2017-07-22 20:38:40 +02:00
Simon Sapin
1ef24bb3e2 Implement From<Unique<T>> for Shared<T> 2017-07-22 20:38:40 +02:00
Simon Sapin
ddaf9b24f0 Rename {NonZero,Shared,Unique}::new_checked to new 2017-07-22 20:38:39 +02:00
Simon Sapin
0a08ad0443 Rename {NonZero,Shared,Unique}::new to new_unchecked 2017-07-22 20:38:16 +02:00
Simon Sapin
e9af03a222 Add new_checked(…) -> Option<Self> to NonZero, Unique, and Shared. 2017-07-22 20:37:52 +02:00
bors
8d22af87d8 Auto merge of #43059 - Mark-Simulacrum:rustbuild-2.0, r=alexcrichton
Rework Rustbuild to an eagerly compiling approach

This introduces a new dependency on `serde`; I don't believe that's a problem since bootstrap is compiled with nightly/beta always so proc macros are available. Compile times are slightly longer -- about 2-3x (30 seconds vs. 10 seconds). I don't think this is too big a problem, especially since recompiling bootstrap is somewhat rare. I think we can remove the dependency on Serde if necessary, though, so let me know.

r? @alexcrichton
2017-07-22 18:27:29 +00:00
mandeep
ae7b1f9f2c Add generic example of std::ops::Sub in doc comments 2017-07-22 12:48:32 -05:00
Mark Simulacrum
1c118231ad Make distcheck work again. 2017-07-22 10:48:29 -06:00
bors
f8d485f53d Auto merge of #43367 - alexcrichton:remove-inline-always, r=sfackler
std: Cut down #[inline] annotations where not necessary

This PR cuts down on a large number of `#[inline(always)]` and `#[inline]`
annotations in libcore for various core functions. The `#[inline(always)]`
annotation is almost never needed and is detrimental to debug build times as it
forces LLVM to perform inlining when it otherwise wouldn't need to in debug
builds. Additionally `#[inline]` is an unnecessary annoation on almost all
generic functions because the function will already be monomorphized into other
codegen units and otherwise rarely needs the extra "help" from us to tell LLVM
to inline something.

Overall this PR cut the compile time of a [microbenchmark][1] by 30% from 1s to
0.7s.

[1]: https://gist.github.com/alexcrichton/a7d70319a45aa60cf36a6a7bf540dd3a
2017-07-22 16:06:12 +00:00