about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2020-04-04avoid printing allocations twiceRalf Jung-9/+11
2020-04-04Miri leak_report: do not report leaks of allocations that are reachable from ↵Ralf Jung-5/+24
globals
2020-04-04Auto merge of #69718 - arlosi:debughash, r=eddybbors-72/+288
Add hash of source files in debug info LLVM supports placing the hash of source files inside the debug info. This information can be used by a debugger to verify that the source code matches the executable. This change adds support for both hash algorithms supported by LLVM, MD5 and SHA1, controlled by a target option. * DWARF only supports MD5 * LLVM IR supports MD5 and SHA1 (and SHA256 in LLVM 11). * CodeView (.PDB) supports MD5, SHA1, and SHA256. Fixes #68980. Tracking issue: #70401 rustc dev guide PR with further details: https://github.com/rust-lang/rustc-dev-guide/pull/623
2020-04-03Auto merge of #70156 - michaelwoerister:incr-cgus, r=nikomatsakisbors-28/+122
Make the rustc respect the `-C codegen-units` flag in incremental mode. This PR implements (the as of yet unapproved) major change proposal at https://github.com/rust-lang/compiler-team/issues/245. See the description there for background and rationale. The changes are pretty straightforward and should be easy to rebase if the proposal gets accepted at some point. r? @nikomatsakis cc @pnkfelix
2020-04-03Rollup merge of #70741 - DutchGhost:test-59023, r=CentrilMazdak Farrokhzad-0/+17
Add test for #59023 Adds a test for https://github.com/rust-lang/rust/issues/59023 Closes https://github.com/rust-lang/rust/issues/59023
2020-04-03Rollup merge of #70735 - GuillaumeGomez:cleanup-e0502, r=Dylan-DPCMazdak Farrokhzad-2/+1
Clean up E0502 explanation r? @Dylan-DPC
2020-04-03Rollup merge of #70720 - ecstatic-morse:issue-70637, r=oli-obkMazdak Farrokhzad-16/+25
Place TLS initializers with relocations in .tdata Should fix #70673, although I'm not sure how to test this. Perhaps @joshlf could find a MCVE? Also adds more context to the FIXME. r? @oli-obk
2020-04-03Rollup merge of #70707 - ecstatic-morse:dataflow-graphviz-cleanup, ↵Mazdak Farrokhzad-277/+0
r=nikomatsakis Remove unused graphviz emitter This was only used by the old dataflow framework that was removed in #69644.
2020-04-03Rollup merge of #70641 - estebank:dedup-code, r=nikomatsakisMazdak Farrokhzad-298/+81
Remove duplicated code in trait selection
2020-04-03Rollup merge of #70640 - jonas-schievink:async-ice, r=cramertjMazdak Farrokhzad-0/+58
Hide `task_context` when lowering body Fixes https://github.com/rust-lang/rust/issues/70594
2020-04-03Rollup merge of #70597 - vakaras:thread_new_double_free_bug_fix, r=AmanieuMazdak Farrokhzad-77/+59
Fix double-free and undefined behaviour in libstd::syn::unix::Thread::new While working on concurrency support for Miri, I found that the `libstd::syn::unix::Thread::new` method has two potential problems: double-free and undefined behaviour. **Double-free** could occur if the following events happened (credit for pointing this out goes to @RalfJung): 1. The call to `pthread_create` successfully launched a new thread that executed to completion and deallocated `p`. 2. The call to `pthread_attr_destroy` returned a non-zero value causing the `assert_eq!` to panic. 3. Since `mem::forget(p)` was not yet executed, the destructor of `p` would be executed and cause a double-free. As far as I understand, this code also violates the stacked-borrows aliasing rules and thus would result in **undefined behaviour** if these rules were adopted. The problem is that the ownership of `p` is passed to the newly created thread before the call to `mem::forget`. Since the call to `mem::forget` is still a call, it counts as a use of `p` and triggers UB. This pull request changes the code to use `mem::ManuallyDrop` instead of `mem::forget`. As a consequence, in case of a panic, `p` would be potentially leaked, which while undesirable is probably better than double-free or undefined behaviour.
2020-04-03Rollup merge of #70576 - Rustin-Liu:rustin-patch-link-cfg, r=varkorMazdak Farrokhzad-3/+8
Update the description of the ticket to point at RFC 1721 Fixes #70538. My first PR to rust. So please let me know if I'm doing something wrong.
2020-04-03Rollup merge of #69860 - faern:use-assoc-int-consts, r=dtolnayMazdak Farrokhzad-36/+34
Use associated numeric consts in documentation Now when the associated constants on int/float types are stabilized and the recommended way of accessing said constants (#68952). We can start using it in this repository, and recommend it via documentation example code. This PR is the reincarnation of #67913 minus the actual adding + stabilization of said constants. (EDIT: Now it's only changing the documentation. So users will see the new consts, but we don't yet update the internal code) Because of how fast bit rot happens to PRs that touch this many files, it does not try to replace 100% of the old usage of the constants in the entire repo, but a good chunk of them.
2020-04-03Add regression test for #70673Oliver Scherer-0/+12
2020-04-04Update the description of link_cfg unstableRustin-Liu-3/+8
Fmt code Update tests Modify msg Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
2020-04-03Delete unnecessary stub stack overflow handler for cloudabi.Vytautas Astrauskas-13/+1
2020-04-03Delete unnecessary stub stack overflow handler for hermit.Vytautas Astrauskas-12/+0
2020-04-03Add test for #59023DutchGhost-0/+17
2020-04-03Auto merge of #70734 - Dylan-DPC:rollup-xmncatq, r=Dylan-DPCbors-220/+356
Rollup of 6 pull requests Successful merges: - #70696 (Extend #69020 test to include reversed operand order.) - #70706 (Minor cleanup in rustdoc --check-theme) - #70725 (Avoid `.unwrap()`s on `.span_to_snippet(...)`s) - #70728 (Minor doc improvements on `AllocRef`) - #70730 (Fix link in task::Wake docs) - #70731 (Minor follow-up after renaming librustc(_middle)) Failed merges: r? @ghost
2020-04-03Clean up E0502 explanationGuillaume Gomez-2/+1
2020-04-03Rollup merge of #70731 - JohnTitor:follow-up-rustc-middle, r=eddybDylan DPC-18/+23
Minor follow-up after renaming librustc(_middle) Fixes #70537 r? @Centril @eddyb
2020-04-03Rollup merge of #70730 - yoshuawuyts:fix-wake-docs-link, r=Dylan-DPCDylan DPC-2/+4
Fix link in task::Wake docs `task::Wake` was introduced in https://github.com/rust-lang/rust/pull/68700. While I was browsing the docs I noticed a link to `sync::Arc` wasn't resolving correctly. This patch fixes that. Thanks! ## Before ![Screenshot_2020-04-03 std task Wake - Rust](https://user-images.githubusercontent.com/2467194/78346384-466cb280-759f-11ea-97c8-aede186c674e.png) ## Proposed ![Screenshot_2020-04-03 alloc task Wake - Rust](https://user-images.githubusercontent.com/2467194/78349819-79657500-75a4-11ea-9282-16691ae2a5d4.png)
2020-04-03Rollup merge of #70728 - TimDiekmann:allocref-doc, r=AmanieuDylan DPC-19/+22
Minor doc improvements on `AllocRef` r? @Amanieu
2020-04-03Rollup merge of #70725 - Centril:nix-unwraps, r=estebankDylan DPC-75/+116
Avoid `.unwrap()`s on `.span_to_snippet(...)`s First commit fixes https://github.com/rust-lang/rust/issues/70724 and the others fix similar issues found by grepping. r? @estebank
2020-04-03Rollup merge of #70706 - gizmondo:check-theme, r=GuillaumeGomezDylan DPC-13/+7
Minor cleanup in rustdoc --check-theme Expand and remove try_something macro. Since https://github.com/rust-lang/rust/commit/2f6226518bd5085896a0f27cfd3ea396367ecd50 there has been only one invocation. r? @GuillaumeGomez
2020-04-03Rollup merge of #70696 - jumbatm:extend-issue-69020-test, r=RalfJungDylan DPC-93/+184
Extend #69020 test to include reversed operand order. Make sure we still emit if a lint if the generic argument comes first. See https://github.com/rust-lang/rust/pull/70566#issuecomment-607671340. r? @RalfJung
2020-04-03Auto merge of #70695 - RalfJung:miri, r=RalfJungbors-7/+7
update miri Fixes https://github.com/rust-lang/rust/issues/70664 r? @ghost Cc @oli-obk
2020-04-03Minor follow-up after renaming librustc(_middle)Yuki Okushi-18/+23
2020-04-03Fix link in task::Wake docsYoshua Wuyts-2/+4
2020-04-03Replace float module consts with assoc consts in documentationLinus Färnstrand-15/+13
2020-04-03Replace max/min_value() with MAX/MIN assoc constsLinus Färnstrand-15/+15
2020-04-03Make documentation examples use new integer assoc constsLinus Färnstrand-6/+6
2020-04-03Auto merge of #70582 - pnkfelix:update-llvm-to-fix-69841, r=cuviperbors-0/+30
Fix #69841 by updating LLVM submodule. Fix #69841 by updating LLVM submodule. Includes regression test for issue 69841.
2020-04-03update miriRalf Jung-7/+7
2020-04-03Update mod.rsTim Diekmann-1/+1
2020-04-03Minor doc improvements on `AllocRef`Tim Diekmann-19/+22
2020-04-03Auto merge of #70726 - Centril:rollup-zrdkkpt, r=Centrilbors-643/+448
Rollup of 5 pull requests Successful merges: - #68334 (AArch64 bare-metal targets: Build rust-std) - #70224 (Clean up rustdoc js testers) - #70532 (Miri engine: stronger type-based sanity check for assignments) - #70698 (bootstrap: add `--json-output` for rust-analyzer) - #70715 (Fix typo in operands section) Failed merges: r? @ghost
2020-04-03Rollup merge of #70715 - awh6al:patch-1, r=Dylan-DPCMazdak Farrokhzad-1/+1
Fix typo in operands section
2020-04-03Rollup merge of #70698 - nikomatsakis:x-py-json-output, r=Mark-SimulacrumMazdak Farrokhzad-1/+10
bootstrap: add `--json-output` for rust-analyzer Motivation is that this allows us to customize rust-analyzer's "cargo watch" integration to run x.py. You simply have to set the command to run to be `x.py --json-output` r? @Mark-Simulacrum -- feel free to make changes, this is quick and dirty for sure
2020-04-03Rollup merge of #70532 - RalfJung:miri-assign, r=eddybMazdak Farrokhzad-52/+69
Miri engine: stronger type-based sanity check for assignments r? @oli-obk @eddyb Fixes https://github.com/rust-lang/rust/issues/70405 That issue says > be sure to also add appropriate mutability checks to the patterns (mutable for the source, immutable for the dest) I decided not to do that because I see no good reason to do it. The engine does not care either way, the assignment will happen correctly.
2020-04-03Rollup merge of #70224 - GuillaumeGomez:clean-up-rustdoc-js-testers, r=Dylan-DPCMazdak Farrokhzad-589/+351
Clean up rustdoc js testers I realized after the improvement made by @ollie27 on the rustdoc-js-tester that a lot of code was actually duplicated. This PR intends to remove this duplication, making it simpler to update in case of future main.js updates. r? @ollie27 cc @kinnison
2020-04-03Rollup merge of #68334 - andre-richter:master, r=japaricMazdak Farrokhzad-0/+17
AArch64 bare-metal targets: Build rust-std This PR complements https://github.com/rust-lang/rust/pull/68253
2020-04-03Auto merge of #70642 - eddyb:remap-sysroot-src, r=Mark-Simulacrumbors-603/+350
Translate the virtual `/rustc/$hash` prefix back to a real directory. Closes #53486 and fixes #53081, by undoing the remapping to `/rustc/$hash` on the fly, when appropriate (e.g. our testsuites, or user crates that depend on `libstd`), but not during the Rust build itself (as that could leak the absolute build directory into the artifacts, breaking deterministic builds). Tested locally by setting `remap-debuginfo = true` in `config.toml`, which without these changes, was causing 56 tests to fail (see https://github.com/rust-lang/rust/issues/53081#issuecomment-606703215 for more details). cc @Mark-Simulacrum @alexcrichton @ehuss
2020-04-03.unwrap() less on .span_to_snippet()Mazdak Farrokhzad-20/+18
2020-04-03get_fn_like_arguments: avoid .unwrapMazdak Farrokhzad-37/+33
2020-04-03add_type_neq_err_label: don't .unwrapMazdak Farrokhzad-18/+65
2020-04-02Remove unnecessary stack overflow handler stub for sgx.Vytautas Astrauskas-8/+0
2020-04-03Add comment explaining the reversed operands testsjumbatm-59/+60
Also, fix the goofy reversed names with something clearer.
2020-04-03Rollup merge of #70716 - matthewjasper:infer-const-type-regions, r=eddybMazdak Farrokhzad-4/+19
Unerase regions in infer_placeholder_type closes #70608
2020-04-03Rollup merge of #70708 - Pocakking:fix-ascii-case-conv-typo, r=sfacklerMazdak Farrokhzad-2/+2
Fix typo in u8::to_ascii_uppercase and u8::to_ascii_lowercase Corrects misspelling of fifth.