about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2019-04-07Auto merge of #59119 - cramertj:cx-back, r=withoutboatsbors-70/+176
Future-proof the Futures API cc https://github.com/rust-lang/rust/issues/59113, @carllerche, @rust-lang/libs r? @withoutboats
2019-04-07Revert "Auto merge of #57842 - gnzlbg:extract_libtest, r=gnzlbg"Jacob Greenfield-40/+5602
This reverts commit 3eb4890dfe6db0279fdd3cda19f9643873ae3db9, reversing changes made to 7a4df3b53da369110984a2b57419c05a53e33b38.
2019-04-07Update commentOliver Scherer-1/+1
2019-04-07Add more regression tests for accidental promotionOliver Scherer-2/+39
2019-04-07Function arguments should never get promotedOliver Scherer-1/+19
2019-04-07Add reference to cfg attrlzutao-1/+3
2019-04-07Auto merge of #58739 - matthewjasper:more-restrictive-tpb, r=pnkfelixbors-207/+455
More restrictive 2 phase borrows - take 2 Signal lint diagnostic `mutable_borrow_reservation_conflict` when borrow-check finds a 2-phase borrow's reservation overlapping with a shared borrow. (pnkfelix updated description) cc #56254 , #59159 blocks PR #59114 r? @pnkfelix cc @RalfJung @nikomatsakis
2019-04-06Remove check_match from const_evalIsaac Whitfield-16/+3
2019-04-06miri engine: lazily allocate memory for locals on first writeRalf Jung-40/+79
2019-04-06Rollup merge of #59755 - matthewjasper:update-miri, r=RalfJungMazdak Farrokhzad-14/+14
Update miri r? @RalfJung
2019-04-06Rollup merge of #59754 - ehuss:update-books, r=frewsxcvMazdak Farrokhzad-0/+0
Update books ## nomicon 1 commits in f1ff93b66844493a7b03101c7df66ac958c62418..c02e0e7754a76886e55b976a3a4fac20100cd35d 2019-02-26 13:37:28 -0500 to 2019-03-25 16:52:56 -0400 - dropck: The drop order is now defined (rust-lang-nursery/nomicon#113) ## reference 3 commits in 27ad493a10364e907ec476e2ad61e8a1614b57e1..98f90ff4de8e588f651f0fb493b5c7496551cd59 2019-03-26 02:06:15 +0100 to 2019-04-06 09:29:08 -0700 - Document repr packed(N). (rust-lang-nursery/reference#553) - Fix broken link in glossary. (rust-lang-nursery/reference#558) - Typo fixes (rust-lang-nursery/reference#556) ## embedded-book 2 commits in 07fd3880ea0874d82b1d9ed30ad3427ec98b4e8a..7989c723607ef5b13b57208022259e6c771e11d0 2019-03-27 15:40:52 +0000 to 2019-04-04 12:14:37 +0000 - fix rust-embedded/book#182 (rust-embedded/book#183) - Add openocd to list of installable packages (rust-embedded/book#179)
2019-04-06Rollup merge of #59751 - tbu-:pr_doc_fix_format, r=CentrilMazdak Farrokhzad-1/+1
Tiny docs fix
2019-04-06Rollup merge of #59740 - cuviper:folded-extend, r=scottmcmMazdak Farrokhzad-22/+10
Use for_each to extend collections This updates the `Extend` implementations to use `for_each` for many collections: `BinaryHeap`, `BTreeMap`, `BTreeSet`, `LinkedList`, `Path`, `TokenStream`, `VecDeque`, and `Wtf8Buf`. Folding with `for_each` enables better performance than a `for`-loop for some iterators, especially if they can just forward to internal iterators, like `Chain` and `FlatMap` do.
2019-04-06Rollup merge of #59738 - flip1995:match_path_move, r=eddyb,ManishearthMazdak Farrokhzad-107/+114
Move match_path from DefId to lint::LateContext cc https://github.com/rust-lang/rust/pull/59316#discussion_r272351353 r? @eddyb
2019-04-06Update miriMatthew Jasper-14/+14
2019-04-06Update booksEric Huss-0/+0
2019-04-06Tiny docs fixTobias Bucher-1/+1
2019-04-06Auto merge of #59710 - alexcrichton:llvm-9-compat, r=sanxiynbors-27/+45
rustc: Start implementing compat with LLVM 9 This commit doesn't actually migrate to LLVM 9, but it brings our own C++ bindings in line with LLVM 9 and able to compile against tip of tree. The changes made were: * The `MainSubprogram` flag for debuginfo moved between flag types. * Iteration of archive members was tweaked slightly and we have to construct the two iterators before constructing the returned `RustArchiveIterator` value. * The `getOrInsertFunction` binding now returns a wrapper which we use `getCallee()` on to get the value we're interested in.
2019-04-06path -> fromBastian Gruber-2/+2
2019-04-06Auto merge of #59745 - cwhakes:master, r=sanxiynbors-10/+10
Change `copytest` parameter name from `y` to `sign` This should help clarify ambiguity with whether `a.copysign(b)` applies the sign of `a` to `b` or `b` to `a`. r? @Centril
2019-04-06Remove copy_book_toml method in favor for copy_recursiveBastian Gruber-7/+0
2019-04-06Add book.toml to tools/unstable, add copy_book_toml to sciptBastian Gruber-0/+8
2019-04-06Auto merge of #59744 - cuviper:output-errors, r=sanxiynbors-13/+26
Show better errors for LLVM IR output I was trying to output LLVM IR directly to the console: $ rustc hello.rs --emit=llvm-ir -o /dev/stdout LLVM ERROR: IO failure on output stream: Bad file descriptor Now `LLVMRustPrintModule` returns an error, and we print: error: failed to write LLVM IR to /dev/stdout.hello.7rcbfp3g-cgu.0.rcgu.ll: Permission denied ... which is more informative.
2019-04-06Auto merge of #59723 - Zoxc:rem-noforce, r=michaelwoeristerbors-1/+0
Remove no_force from coherent_trait r? @michaelwoerister
2019-04-05Change `copytest` parameter name from `y` to `sign`Will Hakes-10/+10
2019-04-05Show better errors for LLVM IR outputJosh Stone-13/+26
I was trying to output LLVM IR directly to the console: $ rustc hello.rs --emit=llvm-ir -o /dev/stdout LLVM ERROR: IO failure on output stream: Bad file descriptor Now `LLVMRustPrintModule` returns an error, and we print: error: failed to write LLVM IR to /dev/stdout.hello.7rcbfp3g-cgu.0.rcgu.ll: Permission denied ... which is more informative.
2019-04-06Rollup merge of #59727 - alexcrichton:wasi-apis, r=fitzgenMazdak Farrokhzad-88/+87
wasi: Use shared API for preopened fds This commit updates the wasi target with supported added in CraneStation/wasi-sysroot#10. That function allows both C and Rust to cooperate in how preopened files are managed, enabling us to learn about propened files through the same interface. The `open_parent` function in the wasi `fs` module was updated to avoid its own initialization of a global preopened map and instead delegate to libc to perform this functionality. This should both be more robust into the future in terms of handling path logic as well as ensuring the propened map is correctly set up at process boot time. This does currently require some unfortunate allocations on our side, but if that becomes an issue we can always paper over those in time!
2019-04-06Rollup merge of #59707 - GuillaumeGomez:GuillaumeGomez-patch-1, r=CentrilMazdak Farrokhzad-0/+20
Add missing tryfrom example r? @rust-lang/docs
2019-04-06Rollup merge of #59696 - michaelwoerister:fix-issue-59137, r=alexcrichtonMazdak Farrokhzad-4/+20
Remove invalid assertion back::link::from add_upstream_rust_crates(). This removes a misplaced assertion. The function containing the assertion is actually only ever called for upstream crates that are not considered for LTO, so we don't care whether upstream code has been merged in by LTO or not. Fixes #59137 r? @alexcrichton
2019-04-06Rollup merge of #59624 - jethrogb:jb/sgx-unwind-syms, r=alexcrichtonMazdak Farrokhzad-41/+53
SGX target: Use linker option to avoid code CGU assignment kludge cc @VardhanThigle @faern
2019-04-06Rollup merge of #58894 - GuillaumeGomez:invalid-lifetime-bounds, r=estebankMazdak Farrokhzad-11/+27
Fix invalid bounds string generation in rustdoc Fixes #58737. Very weird and I'm not sure this is the best fix around. However, trying to fix it beforehand seems overly complicated compared to the gain (in `clean`, it wouldn't change anything since we **have to** return something so that wouldn't work, and in `hir`, I'm afraid I'd break something else for very little gain). Also, I wasn't able to make a small code to reproduce the issue. The only way to test is to document `crossbeam` directly and check the `Scope` struct... r? @QuietMisdreavus
2019-04-05Future-proof the Futures APITaylor Cramer-70/+176
2019-04-05Use for_each to extend collectionsJosh Stone-22/+10
This updates the `Extend` implementations to use `for_each` for many collections: `BinaryHeap`, `BTreeMap`, `BTreeSet`, `LinkedList`, `Path`, `TokenStream`, `VecDeque`, and `Wtf8Buf`. Folding with `for_each` enables better performance than a `for`-loop for some iterators, especially if they can just forward to internal iterators, like `Chain` and `FlatMap` do.
2019-04-05Move match_path from DefId to lint::LateContextflip1995-107/+114
2019-04-05remove lookup_char_pos_adjAleksey Kladov-30/+9
It is now exactly equivalent to lookup_char_pos.
2019-04-05Auto merge of #59500 - crlf0710:boxed-closure-impls, r=cramertjbors-100/+119
Unsized rvalues: implement boxed closure impls. (2nd try) This is a rebase of S-blocked-closed PR #55431 to current master. LLVM has moved forward since then, so maybe we can check whether the new LLVM 8.0 version unblocked this work.
2019-04-05Remove parensUnreachable-2/+2
2019-04-05wasi: Use shared API for preopened fdsAlex Crichton-88/+87
This commit updates the wasi target with supported added in CraneStation/wasi-sysroot#10. That function allows both C and Rust to cooperate in how preopened files are managed, enabling us to learn about propened files through the same interface. The `open_parent` function in the wasi `fs` module was updated to avoid its own initialization of a global preopened map and instead delegate to libc to perform this functionality. This should both be more robust into the future in terms of handling path logic as well as ensuring the propened map is correctly set up at process boot time. This does currently require some unfortunate allocations on our side, but if that becomes an issue we can always paper over those in time!
2019-04-05Add missing tryfrom exampleGuillaume Gomez-0/+20
2019-04-05rustc: Start implementing compat with LLVM 9Alex Crichton-27/+45
This commit doesn't actually migrate to LLVM 9, but it brings our own C++ bindings in line with LLVM 9 and able to compile against tip of tree. The changes made were: * The `MainSubprogram` flag for debuginfo moved between flag types. * Iteration of archive members was tweaked slightly and we have to construct the two iterators before constructing the returned `RustArchiveIterator` value. * The `getOrInsertFunction` binding now returns a wrapper which we use `getCallee()` on to get the value we're interested in.
2019-04-05Auto merge of #59076 - dtolnay:comma, r=alexcrichtonbors-252/+226
Include trailing comma in multiline Debug representation This PR changes the behavior of [`Formatter::debug_struct`](https://doc.rust-lang.org/std/fmt/struct.Formatter.html#method.debug_struct), [`debug_tuple`](https://doc.rust-lang.org/std/fmt/struct.Formatter.html#method.debug_tuple), [`debug_list`](https://doc.rust-lang.org/std/fmt/struct.Formatter.html#method.debug_list), [`debug_set`](https://doc.rust-lang.org/std/fmt/struct.Formatter.html#method.debug_set), and [`debug_map`](https://doc.rust-lang.org/std/fmt/struct.Formatter.html#method.debug_map) to render trailing commas in `{:#?}` mode, which is the dominant style in modern Rust code. #### Before: ```console Language { name: "Rust", trailing_commas: false } ``` #### After: ```console Language { name: "Rust", trailing_commas: true, } ```
2019-04-05Include trailing comma in multiline Debug representationDavid Tolnay-252/+226
This commit changes the behavior of Formatter::debug_struct, debug_tuple, debug_list, debug_set, and debug_map to render trailing commas in {:#?} mode, which is the dominant style in modern Rust code. Before: Language { name: "Rust", trailing_commas: false } After: Language { name: "Rust", trailing_commas: true, }
2019-04-05Auto merge of #59721 - Centril:rollup-ieam9ke, r=Centrilbors-32/+24
Rollup of 5 pull requests Successful merges: - #59665 (improve worst-case performance of HashSet.is_subset) - #59687 (cleanup shebang handling in the lexer) - #59690 (Mark unix::ffi::OsStrExt methods as inline) - #59702 (Use declare_lint_pass! and impl_lint_pass! in more places) - #59712 (wasm32: Default to a "static" relocation model) Failed merges: r? @ghost
2019-04-05Remove no_force from coherent_traitJohn Kåre Alsaker-1/+0
2019-04-05Rollup merge of #59712 - alexcrichton:wasm-static-not-pic, r=eddybMazdak Farrokhzad-0/+9
wasm32: Default to a "static" relocation model LLVM 9 is adding support for a "pic" relocation model for wasm code, which is quite different than the current model. In order to preserve the mode of compilation that we have today default to "static" to ensure that we don't accidentally start creating experimental relocatable binaries.
2019-04-05Rollup merge of #59702 - hgallagher1993:origin, r=CentrilMazdak Farrokhzad-20/+2
Use declare_lint_pass! and impl_lint_pass! in more places Fixes #59683
2019-04-05Rollup merge of #59690 - xfix:patch-17, r=cramertjMazdak Farrokhzad-0/+3
Mark unix::ffi::OsStrExt methods as inline This is a small change, but I found it surprising it's not inlined looking at the assembly.
2019-04-05Rollup merge of #59687 - matklad:shebang, r=petrochenkovMazdak Farrokhzad-11/+5
cleanup shebang handling in the lexer
2019-04-05Rollup merge of #59665 - ssomers:hashset_revisited, r=KodrAusMazdak Farrokhzad-1/+5
improve worst-case performance of HashSet.is_subset One more simple optimization opportunity for HashSet that was applied in BTreeSet in #59186 (and wasn't in #57043). Already covered by the existing unit test. r? @KodrAus
2019-04-05Add regression test for #59137.Michael Woerister-0/+20