about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2020-04-01In Thread::new, add a comment that a panic could cause a memory leak.Vytautas Astrauskas-5/+14
2020-04-01Update Clippyflip1995-7/+9
2020-04-01Downgrade option_option to pedanticDavid Tolnay-1/+1
2020-04-01Fix link to write_vectoredThomas de Zeeuw-1/+1
2020-04-01compiletest: don't use `std::io::stdout()`, as it bypasses `set_print`.Eduard-Mihai Burtescu-8/+4
2020-04-01Use unspecified over undefined in io::Write::write_all_vectored docsThomas de Zeeuw-7/+9
2020-04-01Update -Ccodegen-units docs wrt incr. comp. in rustc book.Michael Woerister-3/+2
2020-04-01Rollup merge of #70652 - lzutao:patch-1, r=CentrilMazdak Farrokhzad-0/+3
Add git repo address to unstable book
2020-04-01Rollup merge of #70627 - spastorino:use-place-directly-its-copy, r=oli-obkMazdak Farrokhzad-371/+354
Use place directly its copy r? @oli-obk
2020-04-01Rollup merge of #70591 - cuviper:fulldeps-library-path, r=Mark-SimulacrumMazdak Farrokhzad-1/+10
Ensure LLVM is in the link path for "fulldeps" tests This is a follow-up to #70123, which added `llvm-config --libdir` to the `LIBRARY_PATH` for rustc tools. We need the same for "run-make-fulldeps" and "ui-fulldeps" tests which depend on compiler libraries, implicitly needing to link to `-lLLVM` as well.
2020-04-01Rollup merge of #70547 - wesleywiser:extract_can_unwind, r=eddybMazdak Farrokhzad-61/+70
Add `can_unwind` field to `FnAbi` This is a pure refactoring with no behavior changes. Extracted out of #70467 r? @eddyb
2020-04-01Rollup merge of #70522 - rcoh:60762-raw-string-errors, r=petrochenkovMazdak Farrokhzad-74/+385
Improve error messages for raw strings (#60762) This diff improves error messages around raw strings in a few ways: - Catch extra trailing `#` in the parser. This can't be handled in the lexer because we could be in a macro that actually expects another # (see test) - Refactor & unify error handling in the lexer between ByteStrings and RawByteStrings - Detect potentially intended terminators (longest sequence of "#*" is suggested) Fixes #60762 cc @estebank who reviewed the original (abandoned) PR for the same ticket. r? @Centril
2020-04-01Rollup merge of #70511 - ecstatic-morse:mir-dataflow-graphviz, r=davidtwcoMazdak Farrokhzad-7/+30
Add `-Z dump-mir-dataflow` flag for dumping dataflow results visualization Previously, to visualize the results of a MIR dataflow pass, one had to add a `#[rustc_mir(borrowck_graphviz_postflow)]` attribute to functions of interest. However, there is no way to specify this attribute on closures and generators, so it was impossible to view results for these MIR bodies. This PR adds a flag, `-Z dump-mir-dataflow`, which will output the dataflow results for any functions specified in `-Z dump-mir` to the output directory specified by `-Z dump-mir-dir`. This behavior is modeled on the `-Z dump-mir-graphviz` flag.
2020-04-01Add git repo address to unstable booklzutao-0/+3
2020-04-01clean up E0468 explanationGuillaume Gomez-2/+2
2020-04-01Add missing allocation guard in `RawVec::grow`Tim Diekmann-0/+1
2020-04-01Auto merge of #70571 - RalfJung:miri, r=RalfJungbors-7/+7
bump Miri r? @ghost Cc @oli-obk Fixes https://github.com/rust-lang/rust/issues/70521
2020-04-01Rename `modules_config` as `regular_config`.Nicholas Nethercote-4/+4
That way it matches `ModuleKind::Regular`.
2020-04-01Improve `ModuleConfig` initialization.Nicholas Nethercote-152/+137
There are three `ModuleConfigs`, one for each `ModuleKind`. The code to initialized them is spaghetti imperative code that sets each field to a default value and then modifies many fields in complicated ways. This makes it very hard to tell what value ends up in each field in each config. For example, the `modules_config.emit_pre_lto_bc` field is set twice, which means it can be set to true and then incorrectly set back to false. (This probably hasn't been noticed because it happens in a very obscure case.) This commit changes the code to a declarative style in which `ModuleConfig::new` initializes all fields and then they are never changed again. This is slightly more concise and much easier to read. (And it fixes the abovementioned `emit_pre_lto_bc` error as well.)
2020-04-01Revert "Dropping "block is empty..." error message on incorrect closing ↵Kevin Per-3/+7
delimiter #70583" This reverts commit 811d817eaf5d78522773ab9d21543629027e4ecb.
2020-04-01Remove some dead code.Nicholas Nethercote-7/+0
The condition checks if `sess.opts.output_types` doesn't contain `OutputType::Assembly` within a match arm that is only reached if `sess.opts.output_types` contains `OutputType::Assembly`.
2020-04-01Auto merge of #70414 - lopsided98:armv6-gcc-8, r=pietroalbinibors-743/+1035
Upgrade GCC to 8.3.0, glibc to 2.17.0 and crosstool-ng to 1.24.0 for dist-arm-linux and dist-armhf-linux Attempt to fix #69420 in the same manner as #65302 did for armv7l. I have tested that this eliminates the segfault while building a `hello_world` package on `arm-unknown-linux-gnueabihf`. I have not been able to test whether the bug exists for `arm-unknown-linux-gnueabi` as well, but I suspect it does, so I upgraded the toolchain for that platform as well.
2020-03-31Address review feedbackWesley Wiser-18/+11
2020-03-31Use Box::into_raw instead of ManuallyDrop in Thread::new.Vytautas Astrauskas-36/+20
2020-03-31Renamed `PerDefTables` to `Tables`Valentin Lazureanu-117/+117
2020-04-01Hide `task_context` when lowering bodyJonas Schievink-0/+58
2020-04-01Rollup merge of #70632 - tspiteri:vec-new, r=sfacklerDylan DPC-0/+6
expand vec![] to Vec::new() The current expansion of `vec![]` calls `into_vec` on a boxed slice, which results in longer IR, and even after optimization, some unwinding artifacts are still present in the IR. This PR uses `Vec::new()` for `vec![]`. This also allows `vec![]` to be used in const expressions.
2020-04-01Rollup merge of #70630 - ehuss:update-books, r=ehussDylan DPC-0/+0
Update books. ## reference 2 commits in e2f11fe4d6a5ecb471c70323197da43c70cb96b6..89dd146154474559536d5d4049a03831c501deea 2020-03-10 06:59:24 +0100 to 2020-03-31 09:42:10 -0700 - Clarify rule for end-of-line backslashes in strings (rust-lang-nursery/reference#784) - Fix and clarify section on re-export (rust-lang-nursery/reference#780) ## book 1 commits in 6fb3705e5230311b096d47f7e2c91f9ce24393d0..c8841f2841a2d26124319ddadd1b6a245f9a1856 2020-02-12 13:48:57 -0500 to 2020-03-22 09:07:01 -0500 - Fix broken front_of_house.rs test on nightly. (rust-lang/book#2289) ## rust-by-example 7 commits in cb369ae95ca36b841960182d26f6d5d9b2e3cc18..edd2a7e687358712608896730c083cb76c7b401a 2020-03-14 12:13:22 -0500 to 2020-03-30 09:37:29 -0300 - feat: add doc attributes section to documentation (rust-lang/rust-by-example#1323) - feat: add playpen topic (rust-lang/rust-by-example#1324) - feat: add sentence about rustdoc & std library (rust-lang/rust-by-example#1322) - fix: make spelling/style of rustdoc consistent (rust-lang/rust-by-example#1321) - Rewrite section on 'static lifetime. (rust-lang/rust-by-example#1320) - Remove deprecated `std::error::Error` functions and other minor changes (rust-lang/rust-by-example#1319) - Remove mdbook version flags from README (rust-lang/rust-by-example#1318) ## nomicon 1 commits in 9f797e65e6bcc79419975b17aff8e21c9adc039f..411197b0e77590c967e37e8f6ec681abd359afe8 2020-03-04 03:45:13 +0100 to 2020-03-31 20:46:09 +0200 - Fix negative_impls feature. (rust-lang-nursery/nomicon#205)
2020-04-01Rollup merge of #70605 - Amanieu:pthread_msvcrt, r=varkorDylan DPC-0/+2
Add missing -lmsvcrt on mingw after -lpthread Fixes #70316
2020-04-01Rollup merge of #70556 - Centril:fix-70552, r=estebankDylan DPC-0/+12
parse_and_disallow_postfix_after_cast: account for `ExprKind::Err`. Fixes https://github.com/rust-lang/rust/issues/70552. r? @estebank cc @daboross
2020-04-01Rollup merge of #70081 - lcnr:issue68387, r=varkorDylan DPC-176/+559
add `unused_braces` lint Add the lint `unused_braces` which is warn by default. `unused_parens` is also extended and now checks anon consts. closes #68387 r? @varkor
2020-04-01Rollup merge of #68770 - ssomers:btree_drain_filter, r=AmanieuDylan DPC-14/+671
BTreeMap/BTreeSet: implement drain_filter Provide an implementation of drain_filter for BTreeMap and BTreeSet. Should be optimal when the predicate picks only elements in leaf nodes with at least MIN_LEN remaining elements, which is a common case, at least when draining only a fraction of the map/set, and also when the predicate picks elements stored in internal nodes where the right subtree can easily let go of a replacement element. The first commit adds benchmarks with an external, naive implementation. to compare how much this claimed optimality-in-some-cases is actually worth.
2020-03-31Inline start_thread into its callers.Vytautas Astrauskas-26/+30
2020-03-31Use Place directly in apply_call_return_effect on framework/tests, it's CopySantiago Pastorino-1/+1
2020-03-31Use Place directly in codegen_place_to_pointer, it's CopySantiago Pastorino-3/+3
2020-03-31Use Place directly in evaluate_array_len, it's CopySantiago Pastorino-2/+2
2020-03-31Use Place directly in codegen_transmute, it's CopySantiago Pastorino-2/+2
2020-03-31Use Place directly on make_return_dest, it's CopySantiago Pastorino-2/+2
2020-03-31Use Place directly on codegen_drop_terminator, it's CopySantiago Pastorino-2/+2
2020-03-31Use Place directly in peek_at, it's CopySantiago Pastorino-4/+4
2020-03-31Use Place directly on place_contents_drop_state_cannot_differ, it's CopySantiago Pastorino-2/+2
2020-03-31Use Place directly in place_as_reborrow, it's CopySantiago Pastorino-3/+3
2020-03-31Use Place directly in librustc_mir_build, it's CopySantiago Pastorino-63/+55
2020-03-31Dropping "block is empty..." error message on incorrect closing delimiter #70583Kevin Per-7/+3
2020-03-31expand vec![] to Vec::new()Trevor Spiteri-0/+6
2020-03-31Fix double-free and undefined behaviour in libstd::syn::unix::Thread::new.Vytautas Astrauskas-18/+43
2020-03-31Update cargoEric Huss-0/+0
2020-03-31Update books.Eric Huss-0/+0
2020-03-31Add io::Write::write_all_vectoredThomas de Zeeuw-1/+161
Similar to io::Write::write_all but uses io::Write::write_vectored instead.
2020-03-31ci: disable cancel-outdated-builds for the try branchPietro Albini-0/+1
While for auto, try and PR builds we only want the latest commit to be tested, that's not true for try builds: each commit pushed to the branch is a different PR being tested, and we want multiple PRs to be tested in parallel if there is enough demand. Fixes #70569