about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2019-04-07initialize unsized locals when copying to the for the first timeRalf Jung-33/+57
2019-04-07fix miri engine debug output for uninitialized localsRalf Jung-11/+6
2019-04-07make StorageLive lazy as wellRalf Jung-37/+22
2019-04-06miri engine: lazily allocate memory for locals on first writeRalf Jung-40/+79
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-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-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-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-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
2019-04-05Auto merge of #59681 - dtolnay:cargo, r=alexcrichtonbors-0/+0
Update cargo 20 commits in 63231f438a2b5b84ccf319a5de22343ee0316323..6f3e9c367abb497c64f360c3839dab5e74928d5c 2019-03-27 12:26:45 +0000 to 2019-04-04 14:11:33 +0000 - Fix Init for Fossil SCM project (rust-lang/cargo#6792) - Fix member_manifest_version_error accessing the network (rust-lang/cargo#6799) - Don't include email if it is empty (rust-lang/cargo#6802) - Fix unused import warning (rust-lang/cargo#6807) - Add some help and documentation for unstable flags (rust-lang/cargo#6791) - Allow `cargo doc --open` with multiple packages (rust-lang/cargo#6803) - Allow `cargo install --path P` to load config from P (rust-lang/cargo#6804) - Add more suggestions on how to deal with excluding a package from a workspace (rust-lang/cargo#6805) - Warn on version req with metadata (rust-lang/cargo#6806) - cargo install: Be more restrictive about cli flags (rust-lang/cargo#6801) - Support force-pushed repos with git-fetch-with-cli (rust-lang/cargo#6800) - Cargo clippy (rust-lang/cargo#6759) - Don't include metadata in wasm binary examples (rust-lang/cargo#6812) - Update glossary for `feature` (rust-lang/cargo#6809) - Include proc-macros in `build-override` (rust-lang/cargo#6811) - Resolver: A dep is equivalent to one of the things it can resolve to (rust-lang/cargo#6776) - Add some docs for `Downloads` (rust-lang/cargo#6815) - Resolve: Be less strict while offline (rust-lang/cargo#6814) - Accept trailing comma in test of impl Debug for PackageId (rust-lang/cargo#6818) - Fix doc link (rust-lang/cargo#6820) <br> I specifically care about "Accept trailing comma in test of impl Debug for PackageId (rust-lang/cargo#6818)" to unblock https://github.com/rust-lang/rust/pull/59076. Mentioning @ehuss.
2019-04-05Fix expectations on some ui test in nll compare mode.Charles Lew-5/+3
2019-04-05Auto merge of #59643 - alexcrichton:wasi-symbols, r=sanxiynbors-1/+1
std: Upgrade `compiler_builtins` to fix wasi linkage Turns out we needed to exclude a number of math functions on the `wasm32-unknown-wasi` target, and this was fixed in 0.1.9 of compiler-builtins and this is pulling in the fix to libstd's own build.
2019-04-05Auto merge of #59704 - alexcrichton:fix-freebsd, r=pietroalbinibors-1/+5
ci: Update FreeBSD tarball downloads These appear to have disappeared from the original server, so I acquired the contents from a different mirror and uploaded them to our S3 bucket
2019-04-04wasm32: Default to a "static" relocation modelAlex Crichton-0/+9
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-04ci: Update FreeBSD tarball downloadsAlex Crichton-1/+5
These appear to have disappeared from the original server, so I acquired the contents from a different mirror and uploaded them to our S3 bucket
2019-04-05Add ignore to doc codeMasaki Hara-2/+2
2019-04-05Simplify fnbox docs.Masaki Hara-235/+15
2019-04-05Stabilize boxed_closure_impls in 1.35.0.Charles Lew-109/+3
2019-04-05Remove FnBox specialization of impl FnOnce for Box<impl FnOnce>.Masaki Hara-41/+1
2019-04-05We already have unsized_locals in stage0.Masaki Hara-9/+0
2019-04-05Fix failing tests.Masaki Hara-25/+10
2019-04-05Fix expectations on some ui tests involving FnOnce.Masaki Hara-72/+42
2019-04-05Add unstable-book articles on fnbox and boxed_closure_impls.Masaki Hara-0/+350
2019-04-05Add tests for boxed_closure_impls.Masaki Hara-0/+61
2019-04-05Add Fn* blanket impls for Box.Masaki Hara-0/+34
2019-04-05Make FnBox a subtrait of FnOnce.Masaki Hara-5/+1
2019-04-04std: Upgrade `compiler_builtins` to fix wasi linkageAlex Crichton-1/+1
Turns out we needed to exclude a number of math functions on the `wasm32-unknown-wasi` target, and this was fixed in 0.1.9 of compiler-builtins and this is pulling in the fix to libstd's own build.
2019-04-04Auto merge of #59676 - alexcrichton:osx-deadlock, r=sfacklerbors-13/+65
std: Avoid usage of `Once` in `Instant` This commit removes usage of `Once` from the internal implementation of time utilities on OSX and Windows. It turns out that we accidentally hit a deadlock today (#59020) via events that look like: * A thread invokes `park_timeout` * Internally, only on OSX, `park_timeout` calls `Instant::elapsed` * Inside of `Instant::elapsed` on OSX we enter a `Once` to initialize global timer data * Inside of `Once`, it attempts to `park` This means on the same stack frame, when there's contention, we're calling `park` from inside `park_timeout`, causing a deadlock! The solution implemented in this commit was to remove usage of `Once` and instead just do a small dance with atomics. There's no real need we need to guarantee that the global information is only learned once, only that it's only *stored* once. This implementation may have multiple threads invoke `mach_timebase_info`, but only one will store the global information which will amortize the cost for all other threads. A similar fix has been applied to windows to be uniform across our implementations, but looking at the code on Windows no deadlock was possible. This is purely just a consistency update for Windows and in theory a slightly leaner implementation. Closes #59020
2019-04-04Update cargoDavid Tolnay-0/+0
2019-04-04Use declare_lint_pass! and impl_lint_pass! in more placeshgallagher1993-20/+2
2019-04-04Auto merge of #59695 - Centril:rollup-88qffc2, r=Centrilbors-32/+91
Rollup of 8 pull requests Successful merges: - #59470 (Document std::fs::File close behavior ignoring errors) - #59555 (update miri) - #59556 (update stdsimd) - #59596 (Forward formatter settings to bounds of `Range<T>` in `fmt::Debug` impl) - #59639 (Never return uninhabited values at all) - #59671 (Make some of lexer's API private) - #59685 (Add description for -Os and -Oz in rustc.1) - #59686 (Temporarily disable stack probing for gnux32.) Failed merges: r? @ghost
2019-04-04std: Avoid usage of `Once` in `Instant`Alex Crichton-13/+65
This commit removes usage of `Once` from the internal implementation of time utilities on OSX and Windows. It turns out that we accidentally hit a deadlock today (#59020) via events that look like: * A thread invokes `park_timeout` * Internally, only on OSX, `park_timeout` calls `Instant::elapsed` * Inside of `Instant::elapsed` on OSX we enter a `Once` to initialize global timer data * Inside of `Once`, it attempts to `park` This means on the same stack frame, when there's contention, we're calling `park` from inside `park_timeout`, causing a deadlock! The solution implemented in this commit was to remove usage of `Once` and instead just do a small dance with atomics. There's no real need we need to guarantee that the global information is only learned once, only that it's only *stored* once. This implementation may have multiple threads invoke `mach_timebase_info`, but only one will store the global information which will amortize the cost for all other threads. A similar fix has been applied to windows to be uniform across our implementations, but looking at the code on Windows no deadlock was possible. This is purely just a consistency update for Windows and in theory a slightly leaner implementation. Closes #59020