about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2020-04-02Rollup merge of #70678 - lzutao:patch-1, r=Dylan-DPCMazdak Farrokhzad-2/+2
Add missing markdown rust annotation
2020-04-02Rollup merge of #70658 - davidtwco:issue-70285-still-further-specializable, ↵Mazdak Farrokhzad-57/+86
r=eddyb add `STILL_FURTHER_SPECIALIZABLE` flag Contributes to #70285. This PR adds a `STILL_FURTHER_SPECIALIZABLE` flag to `TypeFlags` which replaces `needs_infer` and `needs_subst` in `Instance::resolve` and `assemble_candidates_from_impls`. r? @eddyb
2020-04-02Rollup merge of #70634 - Centril:import-directly, r=Mark-SimulacrumMazdak Farrokhzad-468/+414
Remove some reexports in `rustc_middle` This will help get these imports out of the way of detecting the true dependencies in and out to `rustc_middle`, thereby helping future work towards https://github.com/rust-lang/rust/issues/65031.
2020-04-02Rollup merge of #70631 - ehuss:update-cargo, r=ehussMazdak Farrokhzad-0/+0
Update cargo 8 commits in 8a0d4d9c9abc74fd670353094387d62028b40ae9..6e07d2dfb7fc87b1c9489de41da4dafa239daf03 2020-03-24 17:57:04 +0000 to 2020-03-31 03:22:39 +0000 - Fix man page typo for "Owner Options". (rust-lang/cargo#8057) - enable progress bar on all UNIX platforms (rust-lang/cargo#8054) - Squelch some rustdoc warnings. (rust-lang/cargo#8052) - Remove clippy tests. (rust-lang/cargo#8053) - Fix -Zfeatures=itarget with certain host dependencies (rust-lang/cargo#8048) - Checking for binary that is built as an implicit dependency of an integration test. (rust-lang/cargo#8020) - Use stabilized version of rustdoc's --crate-version (rust-lang/cargo#8039) - Remove the `git-checkout` subcommand. (rust-lang/cargo#8040)
2020-04-02Rollup merge of #70615 - Lezzz:rename-tables, r=oli-obkMazdak Farrokhzad-117/+117
Renamed `PerDefTables` to `Tables` Originally suggested by @eddyb
2020-04-02Rollup merge of #70421 - Centril:recover-const-async-fn-ptr, r=estebankMazdak Farrokhzad-23/+215
parse: recover on `const fn()` / `async fn()` Recover on `const fn()` and `async fn()` function pointers, suggesting to remove the qualifier. For example: ``` error: an `fn` pointer type cannot be `async` --> $DIR/recover-const-async-fn-ptr.rs:6:11 | LL | type T3 = async fn(); | -----^^^^^ | | | `async` because of this | help: remove the `async` qualifier ``` r? @estebank
2020-04-02Rollup merge of #70281 - xfix:infallible-hash, r=dtolnayMazdak Farrokhzad-0/+8
Implement Hash for Infallible https://www.reddit.com/r/rust/comments/fmllgx/never_crate_stable_alternative_to/ lists not implementing `Hash` as a reason for the `never` crate. I see no reason not to implement `Hash` for `Infallible`, so might as well do it. No changes necessary for `!`, because `!` already implements `Hash` (see https://github.com/rust-lang/rust/pull/51404).
2020-04-02Improve docs in `AllocRef`Tim Diekmann-5/+7
2020-04-02Remove unused discriminant reads from MIR bodiesWesley Wiser-20/+71
Allow the `SimplifyLocals` pass to remove reads of discriminants if the read is never used.
2020-04-02fix fulldeps test falloutMazdak Farrokhzad-2/+4
2020-04-02nix CachingSourceMapView reexportMazdak Farrokhzad-1/+0
2020-04-02direct imports for langitem stuffMazdak Farrokhzad-52/+48
2020-04-02use direct import for ErrorReportedMazdak Farrokhzad-44/+29
2020-04-02nix rustc_target::abi::* reexport in ty::layoutMazdak Farrokhzad-369/+333
2020-04-02add `STILL_FURTHER_SPECIALIZABLE` flagDavid Wood-57/+86
This commit adds a STILL_FURTHER_SPECIALIZABLE flag to `TypeFlags` which replaces `needs_infer` and `needs_subst` in `Instance::resolve` and `assemble_candidates_from_impls.` Signed-off-by: David Wood <david@davidtw.co>
2020-04-02Auto merge of #70628 - pietroalbini:gha-multiple-tries, r=Mark-Simulacrumbors-3/+4
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
2020-04-02Improve docs for option_optionSimon Farnsworth-2/+20
Hint about using tri-state enums to replace legitimate uses of `Option<Option<_>>`
2020-04-02tests: remove ignore directives from tests that mention core/alloc/std spans.Eduard-Mihai Burtescu-585/+229
2020-04-02Translate the virtual `/rustc/$hash` prefix back to a real directory.Eduard-Mihai Burtescu-18/+121
2020-04-02Writing testsKevin Per-0/+53
2020-04-02Check if the suggestion's `this block is empty...` span is in the last ↵Kevin Per-4/+19
properly closed block.
2020-04-02Auto merge of #70362 - TimDiekmann:alloc-overhaul, r=Amanieubors-1619/+1445
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
2020-04-02Handle unterminated raw strings with no #s properlyRussell Cohen-1/+49
The modified code to handle parsing raw strings didn't properly account for the case where there was no "#" on either end and erroneously reported this strings as complete. This lead to a panic trying to read off the end of the file.
2020-04-02Use Self over specific type in return positionLzu Tao-7/+7
2020-04-02Auto merge of #70667 - flip1995:clippyup, r=Manishearthbors-7/+9
Update Clippy r? @Manishearth Closes #70663
2020-04-02Auto merge of #5349 - jpospychala:useless_rc, r=Manishearthbors-8/+259
useless Rc<Rc<T>>, Rc<Box<T>>, Rc<&T>, Box<&T> refers to #2394 changelog: Add lints for Rc<Rc<T>> and Rc<Box<T>> and Rc<&T>, Box<&T> this is based on top of another change #5310 so probably should go after that one.
2020-04-02Use unrolled looplzutao-9/+43
2020-04-02use of wmemchr for faster searching in [u16]Lzu Tao-2/+12
2020-04-02Add missing markdown rust annotationlzutao-2/+2
2020-04-01Remove duplicated code in trait selectionEsteban Küber-298/+81
2020-04-02useless Rc<Rc<T>>, Rc<Box<T>>, Rc<&T>, Box<&T>Jacek Pospychala-8/+259
2020-04-01Auto merge of #5402 - pmk21:allow-let-underscore-must-use, r=flip1995bors-7/+9
Allow let_underscore_must_use to be ignored changelog: none Fixes #5366
2020-04-01Auto merge of #5401 - dtolnay:option, r=Manishearthbors-14/+19
Downgrade option_option to pedantic Based on a search of my work codebase (\>500k lines) for `Option<Option<`, it looks like a bunch of reasonable uses to me. The documented motivation for this lint is: > an optional optional value is logically the same thing as an optional value but has an unneeded extra level of wrapping which seems a bit bogus in practice. For example a typical usage would look like: ```rust let mut host: Option<String> = None; let mut port: Option<i32> = None; let mut payload: Option<Option<String>> = None; for each field { match field.name { "host" => host = Some(...), "port" => port = Some(...), "payload" => payload = Some(...), // can be null or string _ => return error, } } let host = host.ok_or(...)?; let port = port.ok_or(...)?; let payload = payload.ok_or(...)?; do_thing(host, port, payload) ``` This lint seems to fit right in with the pedantic group; I don't think linting on occurrences of `Option<Option<T>>` by default is justified. --- changelog: Remove option_option from default set of enabled lints
2020-04-01Auto merge of #70672 - Dylan-DPC:rollup-cco9bbd, r=Dylan-DPCbors-363/+411
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
2020-04-01Rollup merge of #70662 - eddyb:compiletest-stdout-fix, r=Mark-SimulacrumDylan DPC-8/+4
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
2020-04-01Rollup merge of #70649 - GuillaumeGomez:cleanup-e0468, r=Dylan-DPCDylan DPC-2/+2
clean up E0468 explanation r? @Dylan-DPC
2020-04-01Rollup merge of #70626 - pietroalbini:remove-webrender-cargotest, ↵Dylan DPC-7/+0
r=Mark-Simulacrum 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
2020-04-01Rollup merge of #70616 - anyska:fieldplacement-rename, r=oli-obkDylan DPC-64/+64
rustc_target::abi: rename FieldPlacement to FieldsShape. Originally suggested by @eddyb.
2020-04-01Rollup merge of #70590 - RalfJung:miri-backtrace, r=oli-obkDylan DPC-161/+192
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
2020-04-01Rollup merge of #70535 - jonas-schievink:graph-refactor, r=nikomatsakisDylan DPC-121/+149
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
2020-04-01In Thread::new, add a comment that a panic could cause a memory leak.Vytautas Astrauskas-5/+14
2020-04-02Allow let_underscorepmk21-7/+6
2020-04-01Update option_option ui testDavid Tolnay-10/+16
2020-04-02Test for ignoring let_underscore_must_usepmk21-0/+3
2020-04-01Update Clippyflip1995-7/+9
2020-04-01Downgrade option_option to pedanticDavid Tolnay-4/+3
2020-04-01Auto merge of #5400 - flip1995:rustup, r=Manishearthbors-17/+17
Rustups r? @Manishearth changelog: none
2020-04-01Fix dogfood falloutflip1995-1/+1
2020-04-01Rustup to rust-lang/rust#70632flip1995-13/+13
2020-04-01Rustup to rust-lang/rust#70081flip1995-2/+2