about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2017-07-25Auto merge of #43046 - milmazz:bootstrap-unittest, r=aidanhsbors-201/+427
bootstrap: Add doctests and unitests This commit includes the following changes: * Include more docstrings in classes, methods, and functions * Add doctests, which are great for self-documenting our source code * Add some unit tests with the `unittest` module * Remove `WindowsError` reference on non-windows systems * Rename some variables to be more explicit about their meaning * Move all the attributes defined outside of `__init__` * Add initial support for Python 3 r? @alexcrichton
2017-07-25Auto merge of #43320 - alexcrichton:new-bootstrap, r=Mark-Simulacrumbors-761/+315
Bump master to 1.21.0 This commit bumps the master branch's version to 1.21.0 and also updates the bootstrap compiler from the freshly minted beta release.
2017-07-25Bump master to 1.21.0Alex Crichton-761/+315
This commit bumps the master branch's version to 1.21.0 and also updates the bootstrap compiler from the freshly minted beta release.
2017-07-25Auto merge of #43419 - lu-zero:master, r=alexcrichtonbors-0/+59
Add support for the VSX and Altivec features on PowerPC
2017-07-25bootstrap: Major refactoringMilton Mazzarri-201/+427
This commit includes the following: * Fix syntax errors in Python 3 * Include more docstrings in classes, methods, and functions * Include unit tests using `unittest` * Merge implementation of `{rustc,cargo}_out_of_date` * Merge implementation of `RustBuild.{cargo,rustc}` * Remove unnecessary source code * Move all the attributes defined outside of `__init__` * Remove remaining `%s` from print function * Remove `WindowsError` reference on non-windows systems * Rename some variables to be more explicit avoid their meaning * Run bootstrap tests in the CI process * Remove non-pythonic getters * Remove duplicate code in `download_stage0` method * Reduce the number of branches in `build_bootstrap` method * Re-raise exception when we cannot execute uname in non-windows systems * Avoid long lines
2017-07-25Auto merge of #43384 - segevfiner:bootstrap-build-argument-fix, r=aidanhsbors-1/+2
rustbuild: Fix the --build argument to bootstrap.py This makes the --build argument also apply for the downloading of the stage0 toolchain and building rustbuild. Fixes #42116
2017-07-25Auto merge of #43325 - ollie27:overflowing_literals, r=arielb1bors-23/+13
Fix overflowing_literals lint for large f32s Float literals need to be parsed as the correct type so they can be rounded correctly.
2017-07-25Auto merge of #43248 - llogiq:num-try-from, r=nagisabors-38/+391
improve the TryFrom implementations This removes the need for a 128 bit storage by making use of the fact that there can be either no over/underflow, either one or both, and each time the target type suffices to hold the limit for comparison. This also means that the implementation will work in targets without 128bit support (unless it's for 128bit types, of course). The downside is that the code looks a bit more complex.
2017-07-24improve the TryFrom implementationsAndre Bogus-38/+391
This removes the need for a 128 bit storage by making use of the fact that there can be either no over/underflow, either one or both, and each time the target type suffices to hold the limit for comparison. The downside is that the code looks a bit more complex. This test code included in this commit is from @oyvindln 's PR. They also greatly helped fixing a number of errors I made along the way. Thanks a lot!
2017-07-24Auto merge of #43454 - Mark-Simulacrum:rollup, r=Mark-Simulacrumbors-191/+270
Rollup of 11 pull requests - Successful merges: #43297, #43322, #43342, #43361, #43366, #43374, #43379, #43401, #43421, #43428, #43446 - Failed merges:
2017-07-24Auto merge of #43430 - Mark-Simulacrum:rustbuild-fixes, r=alexcrichtonbors-88/+85
Rustbuild regression fixes I believe this will fix https://github.com/rust-lang/rust/issues/43427. This PR also avoids running pretty tests by-default. r? @alexcrichton
2017-07-24Rollup merge of #43446 - zackmdavis:rustdoc_sidebar_unions, r=GuillaumeGomezMark Simulacrum-0/+1
rustdoc: add unions to whitelist of sidebar types This resolves #43405.
2017-07-24Rollup merge of #43428 - waywardmonkeys:doc-fixes, r=estebankMark Simulacrum-28/+28
Fix some doc/comment typos.
2017-07-24Rollup merge of #43421 - alexcrichton:add-some-build-scripts, r=Mark-SimulacrumMark Simulacrum-0/+106
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-24Rollup merge of #43401 - cuviper:homogeneous, r=Mark-SimulacrumMark Simulacrum-23/+23
Correct the spelling of "homogeneous" None
2017-07-24Rollup merge of #43379 - s3rvac:fix-exit-status-success-description, ↵Mark Simulacrum-2/+2
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-24Rollup merge of #43374 - stjepang:fix-sort-randomization-comment, r=alexcrichtonMark Simulacrum-15/+18
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-24Rollup merge of #43366 - leshow:bufreader-docs, r=aturonMark Simulacrum-10/+10
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-24Rollup merge of #43361 - michaelwoerister:remove-retrace-path, r=nikomatsakisMark Simulacrum-113/+27
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-24Rollup merge of #43342 - ranweiler:no-std-exe-docs, r=alexcrichtonMark Simulacrum-0/+55
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-24Rollup merge of #43322 - redox-os:redox_liblibc, r=alexcrichtonMark Simulacrum-0/+0
Update liblibc This updates liblibc to the latest master and fixes #43305
2017-07-24Make dist equivalent to old build system.Mark Simulacrum-88/+82
2017-07-24Auto merge of #43436 - zackmdavis:union_doc_fields_section_layout, ↵bors-1/+1
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-24Add support for PowerPC Altivec/VSX intrinsicsLuca Barbato-0/+56
2017-07-24Auto merge of #43327 - nrc:rls-config, r=eddybbors-319/+369
Use a config struct for save-analysis Replaces some existing customisation options, including removing the -Zsave-analysis-api flag r? @eddyb
2017-07-24Make keep_ast configurable by driver clientsNick Cameron-4/+6
2017-07-24Catch a panic in save-analysisNick Cameron-2/+2
2017-07-24Remove save-analysis-api references from tests and rustbuildNick Cameron-2/+4
2017-07-24Point RLS submodule at a branch with required changesNick Cameron-93/+192
And cargo update
2017-07-24Auto merge of #43280 - lfairy:token-tree-iter-clone, r=nrcbors-0/+1
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-24Auto merge of #43413 - mandeep:ops-generics, r=alexcrichtonbors-0/+36
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-23rustdoc: add unions to whitelist of sidebar typesZack M. Davis-0/+1
This resolves #43405.
2017-07-23Auto merge of #43096 - estebank:ascription-help, r=nikomatsakisbors-18/+174
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-23rustdoc: fix layout of Fields section in documentation for unionsZack M. Davis-1/+1
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-23Auto merge of #43386 - oli-obk:suggestions, r=nikomatsakisbors-64/+40
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-23Do not run pretty tests by default.Mark Simulacrum-0/+3
2017-07-23Fix some doc/comment typos.Bruce Mitchener-28/+28
2017-07-23Auto merge of #43416 - tshepang:extra-layer, r=alexcrichtonbors-6/+5
doc: provide an actual equivalent to filter_map
2017-07-23Auto merge of #43256 - Others:patch-1, r=steveklabnikbors-4/+1
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-22rustc: Add some build scripts for librustc cratesAlex Crichton-0/+106
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-23Auto merge of #43406 - canndrew:never-impl-clone, r=alexcrichtonbors-0/+1
Add missing `!: Clone` impl Fixes #43296 (untested because I'm having computer troubles, but a one-liner can't break anything right?)
2017-07-23Auto merge of #43387 - TimNN:rustllvm50, r=alexcrichtonbors-105/+194
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-23Add support for the VSX and Altivec features on PowerPCLuca Barbato-0/+3
2017-07-22Auto merge of #43382 - mmatyas:aarch64_ignore-stack-probes, r=alexcrichtonbors-0/+3
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-22doc: provide an actual equivalent to filter_mapTshepang Lekhonkhobe-6/+5
2017-07-22Auto merge of #43059 - Mark-Simulacrum:rustbuild-2.0, r=alexcrichtonbors-4677/+5460
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-22Add generic example of std::ops::Sub in doc commentsmandeep-0/+36
2017-07-22Make distcheck work again.Mark Simulacrum-1/+6
2017-07-22Auto merge of #43367 - alexcrichton:remove-inline-always, r=sfacklerbors-50/+50
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-22Add make_run to distcheck.Mark Simulacrum-0/+4