about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2016-07-19Auto merge of #34898 - sanxiyn:rollup, r=sanxiynbors-3/+62
Rollup of 5 pull requests - Successful merges: #34807, #34853, #34875, #34884, #34889 - Failed merges:
2016-07-19Auto merge of #33974 - habnabit:eintr-retry-for-read-iterators, r=alexcrichtonbors-11/+18
Retry on EINTR in Bytes and Chars. >Since Bytes and Chars called directly into Read::read, they didn't use any of the retrying wrappers. This allows both iterator types to retry.
2016-07-18Auto merge of #34879 - petrochenkov:fnptr, r=alexcrichtonbors-2/+25
Implement traits for variadic function pointers Closes https://github.com/rust-lang/rust/issues/34874 cc https://github.com/rust-lang/rust/pull/28268 r? @alexcrichton
2016-07-18Auto merge of #34357 - tbu-:pr_exact_size_is_empty, r=brsonbors-5/+32
Add `is_empty` function to `ExactSizeIterator` All other types implementing a `len` functions have `is_empty` already.
2016-07-18Auto merge of #34899 - michaelwoerister:always_internalize_symbols, r=eddybbors-21/+15
Run base::internalize_symbols() even for single-codegen-unit crates. The initial linkage-assignment (especially for closures) is a conservative one that makes some symbols more visible than they need to be. While this is not a correctness problem, it does force the LLVM inliner to be more conservative too, which results in poor performance. Once translation is based solely on MIR, it will be easier to also make the initial linkage assignment a better fitting one. Until then `internalize_symbols()` does a good job of preventing most performance regressions. This should solve the regressions reported in https://github.com/rust-lang/rust/issues/34891 and maybe also those in https://github.com/rust-lang/rust/issues/34831. As a side-effect, this will also solve most of the problematic cases described in https://github.com/rust-lang/rust/issues/34793. Not reliably so, however. For that, we still need a solution like the one implement in https://github.com/rust-lang/rust/pull/34830. cc @rust-lang/compiler
2016-07-18Fix doctest of `ExactSizeIterator::is_empty`Tobias Bucher-1/+3
2016-07-18Run base::internalize_symbols() even for single-codegen-unit crates.Michael Woerister-21/+15
The initial linkage-assignment (especially for closures) is a conservative one that makes some symbols more visible than they need to be. While this is not a correctness problem, it does force the LLVM inliner to be more conservative too, which results in poor performance. Once translation is based solely on MIR, it will be easier to also make the initial linkage assignment a better fitting one. Until then `internalize_symbols()` does a good job of preventing most performance regressions.
2016-07-18Rollup merge of #34889 - infinity0:master, r=sanxiynSeo Sanghyeon-0/+10
Test fixes for ARM64 When these changes are applied, rustc 1.10.0 tests pass successfully on [asachi.debian.org](https://db.debian.org/machines.cgi?host=asachi).
2016-07-18Rollup merge of #34884 - shepmaster:from_raw_parts_doc, r=@nagisaSeo Sanghyeon-1/+13
Improve {String,Vec}::from_raw_parts documentation
2016-07-18Rollup merge of #34875 - frewsxcv:std-slice-struct, r=GuillaumeGomezSeo Sanghyeon-0/+10
Indicate where `std::slice` structs originate from. None
2016-07-18Rollup merge of #34853 - frewsxcv:vec-truncate, r=GuillaumeGomezSeo Sanghyeon-1/+28
Partial rewrite/expansion of `Vec::truncate` documentation. None
2016-07-18Rollup merge of #34807 - sanxiyn:dump-mir, r=nagisaSeo Sanghyeon-1/+1
Remove extra newlines in MIR dump
2016-07-18Auto merge of #34886 - jseyfried:improve_stmt_matchers, r=eddybbors-49/+48
macros: fix bug in `stmt` matchers Today, `stmt` matchers stop too early when parsing expression statements that begin with non-braced macro invocations. For example, ```rust fn main() { macro_rules! m { ($s:stmt;) => { $s } } id!(vec![].push(0);); //^ Before this PR, the `stmt` matcher only consumes "vec![]", so this is an error. //| After this PR, the `stmt` matcher consumes "vec![].push(0)", so this compiles. } ``` This change is backwards compatible due to the follow set for `stmt`. r? @eddyb
2016-07-17Auto merge of #34860 - jseyfried:encapsulate_hygiene, r=nrcbors-233/+157
Clean up and encapsulate `syntax::ext::mtwt`, rename `mtwt` to `hygiene` r? @nrc
2016-07-17Remove extraneous wordsJake Goulding-1/+1
2016-07-17Document from_raw_parts involves ownership transferJake Goulding-0/+12
2016-07-17Auto merge of #34876 - frewsxcv:vec-as-mut-slice, r=alexcrichtonbors-1/+1
Remove unnecessary indexing and deref in `Vec::as_mut_slice`. None
2016-07-17doc/book: fix tests for non-x86 architectures, such as aarch64Ximin Luo-0/+8
`rustdoc --test` gets confused when "main" exists for some architectures but not others.
2016-07-17test: disable more stdcall tests for ARM arches. temp workaround for #24958Ximin Luo-0/+2
2016-07-17Remove some unit tests and that are redundant with `run-pass/hygiene.rs`Jeffrey Seyfried-35/+0
and that would be painful to rewrite.
2016-07-17Rename `mtwt` to `hygiene`Jeffrey Seyfried-14/+14
2016-07-17Clean up and encapsulate `syntax::ext::mtwt`Jeffrey Seyfried-151/+110
2016-07-17Add regression testJeffrey Seyfried-0/+17
2016-07-17Auto merge of #34871 - petrochenkov:inherent, r=jseyfriedbors-27/+1
Do not resolve inherent static methods from other crates prematurely Under some specific circumstances paths like `Type::method` can be resolved early in rustc_resolve instead of type checker. `Type` must be defined in another crate, it should be an enum or a trait object (i.e. a type that acts as a "module" in resolve), and `method` should be an inherent static method. As a result, such paths don't go through `resolve_ufcs`, may be resolved incorrectly and break some invariants in type checker. This patch removes special treatment of such methods. The removed code was introduced in https://github.com/rust-lang/rust/commit/2bd46e767c0fe5b6188df61cb9daf8f2e65a3ed0 to fix a problem that no longer exists. r? @jseyfried
2016-07-17macros: Fix bug in statement matchersJeffrey Seyfried-49/+31
2016-07-17Indicate where `std::slice` structs originate from.Corey Farwell-0/+10
2016-07-17Auto merge of #34829 - cgswords:tstream, r=nrcbors-1/+9
Added tokenstream parser procedure A tiny PR that simply adds a procedure for parsing `TokenStream`s to the parser in `src/libsyntax`. This is to ease using `TokenStream`s with the current (old) procedural macro system.
2016-07-17Implement traits for variadic function pointersVadim Petrochenkov-2/+25
2016-07-17Auto merge of #34789 - jonathandturner:simplify_liberror, r=alexcrichtonbors-2118/+1550
Simplify librustc_errors This is part 2 of the error crate refactor, starting with #34403. In this refactor, I focused on slimming down the error crate to fewer moving parts. As such, I've removed quite a few parts and replaced the with simpler, straight-line code. Specifically, this PR: * Removes BasicEmitter * Remove emit from emitter, leaving emit_struct * Renames emit_struct to emit * Removes CoreEmitter and focuses on a single Emitter * Implements the latest changes to error format RFC (#1644) * Removes (now-unused) code in emitter.rs and snippet.rs * Moves more tests to the UI tester, removing some duplicate tests in the process There is probably more that could be done with some additional refactoring, but this felt like it was getting to a good state. r? @alexcrichton cc: @Manishearth (as there may be breaking changes in stuff I removed/changed)
2016-07-16Auto merge of #34606 - mathstuf:llvm-with-ninja, r=alexcrichtonbors-0/+1
llvm, rt: build using the Ninja generator if available The Ninja generator generally builds much faster than make. It may also be used on Windows to have a vast speed improvement over the Visual Studio generators. Currently hidden behind an `--enable-ninja` flag because it does not obey the top-level `-j` or `-l` flags given to `make`.
2016-07-16Remove unnecessary indexing and deref in `Vec::as_mut_slice`.Corey Farwell-1/+1
2016-07-16Auto merge of #34852 - GuillaumeGomez:rollup, r=GuillaumeGomezbors-45/+85
Rollup of 7 pull requests - Successful merges: #33362, #34768, #34837, #34838, #34847, #34848, #34849 - Failed merges: #33951, #34850
2016-07-17Do not resolve inherent static methods from other crates prematurelyVadim Petrochenkov-27/+1
2016-07-16Auto merge of #34846 - jonas-schievink:issue34839, r=eddybbors-1/+33
Variant Size Differences: Erase regions before computing type layout Fixes #34839
2016-07-16Revert "Refactored code to access TLS only in case of panic"Tim Neumann-11/+9
2016-07-16Merge pull request #34836 from cynicaldevil/panic-counterAlex Crichton-9/+11
Refactored code to access TLS only in case of panic
2016-07-16Partial rewrite/expansion of `Vec::truncate` documentation.Corey Farwell-1/+28
2016-07-16Rollup merge of #34849 - tshepang:patch-2, r=apasel422Guillaume Gomez-1/+1
doc: remove extraneous word
2016-07-16Rollup merge of #34848 - tshepang:patch-1, r=apasel422Guillaume Gomez-1/+1
doc: remove stray comma
2016-07-16Rollup merge of #34847 - baskerville:unwanted-tag, r=apasel422Guillaume Gomez-1/+1
Add missing inline code delimiters around Vec<T> r? @steveklabnik
2016-07-16Rollup merge of #34838 - steveklabnik:gh33677, r=alexcrichtonGuillaume Gomez-30/+56
Fix up documentation around no_std 1. Fix the sections in the book to have the correct signatures. I've also marked them as `ignore`; there's no way to set the `no_std` feature for libc, so it pulls in the stdlib, so this wasn't even testing the actual thing it was testing. Better to just ignore. 2. Correcting libcore's docs for factual inaccuracy, and add a note about language items. Fixes #33677 r? @alexcrichton
2016-07-16Rollup merge of #34837 - GuillaumeGomez:better_example, r=nagisaGuillaume Gomez-1/+1
Improve float number example r? @nagisa
2016-07-16Rollup merge of #34768 - alexcrichton:issue-audit, r=aturonGuillaume Gomez-8/+8
std: Correct tracking issue for SipHash{13,24} The referenced tracking issue was closed and was actually about changing the algorithm. cc #34767
2016-07-16Rollup merge of #33362 - andradei:master, r=ManishearthGuillaume Gomez-3/+17
Add mention to RFC 940 in the Rust Reference. This PR adds a mention to hyphens in Cargo package names being replaced by underscores when used as a crate, as per [RFC 940](https://github.com/rust-lang/rfcs/blob/master/text/0940-hyphens-considered-harmful.md) It also formats the RFCs consistently as RFC XXX instead of RFCXXX.
2016-07-16Auto merge of #34816 - jseyfried:fix_include_path, r=nrcbors-1/+13
Fix `include!()`s inside `asm!()` invocations Fixes #34812, a regression caused by #33749 that was not fixed in #34450. r? @nrc
2016-07-16doc: remove extraneous wordTshepang Lekhonkhobe-1/+1
2016-07-16doc: remove stray commaTshepang Lekhonkhobe-1/+1
2016-07-16Add missing inline code delimiters around Vec<T>Bastien Dejean-1/+1
2016-07-16Erase regions before computing type layoutJonas Schievink-1/+33
Fixes #34839
2016-07-16Auto merge of #34779 - infinity0:master, r=alexcrichtonbors-2/+24
If local-rust is the same as the current version, then force a local-rebuild In Debian, we would like the option to build/rebuild the current release from *either* the current or previous stable release. So we use enable-local-rust instead of enable-local-rebuild, and read the bootstrap key dynamically from whatever is installed locally. In general, it does not make much sense to allow enable-local-rust without also setting the bootstrap key, since the build would fail otherwise. (The way I detect "the bootstrap key of [the local] rustc installation" is a bit hacky, suggestions welcome.)