- 02 4月, 2020 13 次提交
-
-
由 Niko Matsakis 提交于
-
由 bors 提交于
GHA: enable running multiple try builds at the same time 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
-
由 bors 提交于
Overhaul of the `AllocRef` trait to match allocator-wg's latest consens; Take 2 GitHub won't let me reopen #69889 so I make a new PR. In addition to #69889 this fixes the unsoundness of `RawVec::into_box` when using allocators supporting overallocating. Also it uses `MemoryBlock` in `AllocRef` to unify `_in_place` methods by passing `&mut MemoryBlock`. Additionally, `RawVec` now checks for `size_of::<T>()` again and ignore every ZST. The internal capacity of `RawVec` isn't used by ZSTs anymore, as `into_box` now requires a length to be specified. r? @Amanieu fixes rust-lang/wg-allocators#38 fixes rust-lang/wg-allocators#41 fixes rust-lang/wg-allocators#44 fixes rust-lang/wg-allocators#51
-
由 bors 提交于
Update Clippy r? @Manishearth Closes #70663
-
由 bors 提交于
Rollup of 6 pull requests Successful merges: - #70535 (Track the finalizing node in the specialization graph) - #70590 (Miri: make backtrace function names and spans match up) - #70616 (rustc_target::abi: rename FieldPlacement to FieldsShape.) - #70626 (cargotest: remove webrender) - #70649 (clean up E0468 explanation) - #70662 (compiletest: don't use `std::io::stdout()`, as it bypasses `set_print`.) Failed merges: r? @ghost
-
由 Dylan DPC 提交于
compiletest: don't use `std::io::stdout()`, as it bypasses `set_print`. This PR undoes a change made during #69916, which became unnecessary during review but was left in by accident, and which isn't correct due to `libtest` using `std::io::set_print`, which overwrites the `println!` behavior but *not* `writeln!(std::io::stdout(), ...)`. The effect of using `writeln!(std::io::stdout(), ...)` was that the diff output would show *while* running the tests, instead of at the end, when failing tests are listed. r? @Mark-Simulacrum cc @oli-obk
-
由 Dylan DPC 提交于
clean up E0468 explanation r? @Dylan-DPC
-
由 Dylan DPC 提交于
cargotest: remove webrender The current webrender commit occasionally fails without a reason, and the latest webrender commit is missing a dependency on our Windows builders. It's not worth installing an extra dependency for cargotest, and the spurious failure makes keeping this test not worth it. r? @Mark-Simulacrum
-
由 Dylan DPC 提交于
Miri: make backtrace function names and spans match up Currently, Miri backtraces are a bit confusing: ``` error: Undefined Behavior: entering unreachable code --> tests/compile-fail/never_transmute_void.rs:10:11 | 10 | match v {} //~ ERROR entering unreachable code | ^ entering unreachable code | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information note: inside call to `f` at tests/compile-fail/never_transmute_void.rs:17:5 --> tests/compile-fail/never_transmute_void.rs:17:5 | 17 | f(v); //~ inside call to `f` | ^^^^ = note: inside call to `main` at /home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/src/libstd/rt.rs:67:34 = note: inside call to closure at /home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/src/libstd/rt.rs:52:73 = note: inside call to closure at /home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/src/libstd/sys_common/backtrace.rs:130:5 ``` When reading this like a normal backtrace, one would expect that e.g. the backrace involves the "main" function at "libstd/rt.rs:67:34". But that is not actually where we are in the main function, that is *where the main function is called*. This is not how backtraces are usually rendered (including e.g. with `RUST_BACKTRACE=1`). Usually we print next to each function name where inside that function the frame is currently executing, not where the *parent* frame is executing. With this PR and the Miri side at https://github.com/rust-lang/miri/pull/1283, the backtrace now looks as follows: ``` error: Undefined Behavior: entering unreachable code --> tests/compile-fail/never_transmute_void.rs:10:11 | 10 | match v {} //~ ERROR entering unreachable code | ^ entering unreachable code | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: inside `f` at tests/compile-fail/never_transmute_void.rs:10:11 note: inside `main` at tests/compile-fail/never_transmute_void.rs:17:5 --> tests/compile-fail/never_transmute_void.rs:17:5 | 17 | f(v); //~ inside `main` | ^^^^ = note: inside closure at /home/r/src/rust/rustc/src/libstd/rt.rs:67:34 = note: inside closure at /home/r/src/rust/rustc/src/libstd/rt.rs:52:73 = note: inside `std::sys_common::backtrace::__rust_begin_short_backtrace::<[closure@DefId(1:6034 ~ std[87db]::rt[0]::lang_start_internal[0]::{{closure}}[0]::{{closure}}[0]) 0:&dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe], i32>` at /home/r/src/rust/rustc/src/libstd/sys_common/backtrace.rs:130:5 ``` Now function name and printed line numbers match up in the notes. This code is partially shared with const-eval, so the change also affects const-eval: instead of printing what is being called at some span, we print which function/constant this span is inside. With this, we can also remove the `span` field from Miri's stack frames (which used to track the *caller span* of that frame, quite confusing), and then get of a whole lot of `span` arguments that ultimately just served to fill that field (and as a fallback for `caller_location`, which however was never actually used). r? @oli-obk
-
由 Dylan DPC 提交于
Track the finalizing node in the specialization graph Fixes https://github.com/rust-lang/rust/issues/70419 Fixes https://github.com/rust-lang/rust/issues/70442 r? @EddyB
-
由 flip1995 提交于
-
由 Eduard-Mihai Burtescu 提交于
-
- 01 4月, 2020 27 次提交
-
-
由 bors 提交于
Rollup of 6 pull requests Successful merges: - #70511 (Add `-Z dump-mir-dataflow` flag for dumping dataflow results visualization) - #70522 (Improve error messages for raw strings (#60762)) - #70547 (Add `can_unwind` field to `FnAbi`) - #70591 (Ensure LLVM is in the link path for "fulldeps" tests) - #70627 (Use place directly its copy) - #70652 (Add git repo address to unstable book) Failed merges: - #70634 (Remove some reexports in `rustc_middle`) r? @ghost
-
由 Mazdak Farrokhzad 提交于
Add git repo address to unstable book
-
由 Mazdak Farrokhzad 提交于
Use place directly its copy r? @oli-obk
-
由 Mazdak Farrokhzad 提交于
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.
-
由 Mazdak Farrokhzad 提交于
Add `can_unwind` field to `FnAbi` This is a pure refactoring with no behavior changes. Extracted out of #70467 r? @EddyB
-
由 Mazdak Farrokhzad 提交于
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
-
由 Mazdak Farrokhzad 提交于
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.
-
由 lzutao 提交于
-
由 Guillaume Gomez 提交于
-
由 Tim Diekmann 提交于
-
由 bors 提交于
bump Miri r? @ghost Cc @oli-obk Fixes https://github.com/rust-lang/rust/issues/70521
-
由 bors 提交于
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.
-
由 Wesley Wiser 提交于
-
由 bors 提交于
Rollup of 6 pull requests Successful merges: - #68770 (BTreeMap/BTreeSet: implement drain_filter ) - #70081 (add `unused_braces` lint) - #70556 (parse_and_disallow_postfix_after_cast: account for `ExprKind::Err`.) - #70605 (Add missing -lmsvcrt on mingw after -lpthread) - #70630 (Update books.) - #70632 (expand vec![] to Vec::new()) Failed merges: r? @ghost
-
由 Dylan DPC 提交于
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.
-
由 Dylan DPC 提交于
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)
-
由 Dylan DPC 提交于
Add missing -lmsvcrt on mingw after -lpthread Fixes #70316
-
由 Dylan DPC 提交于
parse_and_disallow_postfix_after_cast: account for `ExprKind::Err`. Fixes https://github.com/rust-lang/rust/issues/70552. r? @estebank cc @daboross
-
由 Dylan DPC 提交于
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
-
由 Dylan DPC 提交于
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.
-
由 Santiago Pastorino 提交于
-
由 Santiago Pastorino 提交于
-
由 Santiago Pastorino 提交于
-
由 Santiago Pastorino 提交于
-
由 Santiago Pastorino 提交于
-
由 Santiago Pastorino 提交于
-
由 Santiago Pastorino 提交于
-