about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2021-08-15Update rustc_codegen_cratelift for working_dir changeAaron Hill-1/+1
2021-08-15Include (potentially remapped) working dir in crate hashAaron Hill-18/+61
Fixes #85019 A `SourceFile` created during compilation may have a relative path (e.g. if rustc itself is invoked with a relative path). When we write out crate metadata, we convert all relative paths to absolute paths using the current working direction. However, the working directory is not included in the crate hash. This means that the crate metadata can change while the crate hash remains the same. Among other problems, this can cause a fingerprint mismatch ICE, since incremental compilation uses the crate metadata hash to determine if a foreign query is green. This commit moves the field holding the working directory from `Session` to `Options`, including it as part of the crate hash.
2021-08-15Auto merge of #87792 - GuillaumeGomez:ci-fetch, r=pietroalbinibors-4/+6
Remove git fetch from CI https://github.com/rust-lang/rust/pull/86623 added a call to `git fetch`, which is problematic for releases. r? `@pietroalbini`
2021-08-15Auto merge of #86692 - dns2utf8:parallelize_rustdoc-gui_tests, r=GuillaumeGomezbors-13/+113
Run rustdoc-gui tests in parallel I hid the passing tests and only show the failed ones in alphabetical order: ![image](https://user-images.githubusercontent.com/739070/123663020-84e63100-d825-11eb-9b35-0a8c30cd219c.png) Also this PR cuts down the execution time from ~40 to ~9 seconds
2021-08-15Auto merge of #87975 - m-ou-se:unused-import-attributes, r=nagisabors-1/+34
Include attributes in removal span for unused imports. Fixes https://github.com/rust-lang/rust/issues/87973
2021-08-15Auto merge of #87974 - steffahn:slice_split_size_hints, r=dtolnaybors-8/+86
Test and fix `size_hint` for slice’s [r]split* iterators Adds extensive test (of `size_hint`) for all the _[r]split*_ iterators. Fixes `size_hint` upper bound for _split_inclusive*_ iterators which was one higher than necessary for non-empty slices. Fixes `size_hint` lower bound for _[r]splitn*_ iterators when _n == 0_, which was one too high. **Lower bound being one too high was a logic error, violating the correctness condition of `size_hint`.** _Edit:_ I’ve opened an issue for that bug, so this PR fixes #87978
2021-08-14Auto merge of #87581 - Amanieu:asm_clobber_abi, r=nagisabors-87/+668
Add support for clobber_abi to asm! This PR adds the `clobber_abi` feature that was proposed in #81092. Fixes #81092 cc `@rust-lang/wg-inline-asm` r? `@nagisa`
2021-08-14More spacing between the different blocks of resultsStefan Schindler-10/+17
2021-08-14Implement a finish method for the status_bar and some cleanupStefan Schindler-5/+11
2021-08-14Auto merge of #83417 - erikdesjardins:enableremovezsts, r=oli-obkbors-56/+21
Run RemoveZsts pass at mir-opt-level=1 per https://github.com/rust-lang/rust/pull/83177#issuecomment-803942217 This pass removes assignments to ZST places. Perf (from https://github.com/rust-lang/rust/pull/83177#issuecomment-803442557): https://perf.rust-lang.org/compare.html?start=41b315a470d583f6446599984ff9ad3bd61012b2&end=bd5d1b96f0c64c9938feea831789e1b5bb2cd4a2 r? `@oli-obk`
2021-08-14Auto merge of #87324 - asquared31415:named-asm-labels, r=Amanieubors-5/+520
Lint against named asm labels This adds a deny-by-default lint to prevent the use of named labels in inline `asm!`. Without a solution to #81088 about whether the compiler should rewrite named labels or a special syntax for labels, a lint against them should prevent users from writing assembly that could break for internal compiler reasons, such as inlining or anything else that could change the number of actual inline assembly blocks emitted. This does **not** resolve the issue with rewriting labels, that still needs a decision if the compiler should do any more work to try to make them work.
2021-08-14Auto merge of #87913 - a1phyr:vec_spec_clone_from, r=dtolnaybors-10/+30
Specialize `Vec::clone_from` for `Copy` types This should improve performance and reduce code size. This also improves `clone_from` for `String`, `OsString` and `PathBuf`.
2021-08-14Auto merge of #87375 - fee1-dead:move-constness-to-traitpred, r=oli-obkbors-211/+517
Try filtering out non-const impls when we expect const impls **TL;DR**: Associated types on const impls are now bounded; we now disallow calling a const function with bounds when the specified type param only has a non-const impl. r? `@oli-obk`
2021-08-14Auto merge of #87600 - JohnTitor:classify-ui-tests, r=petrochenkovbors-27/+1
Move some UI tests to more suitable subdirs The classifui result: https://gist.github.com/JohnTitor/c9e00840990b5e4a8fc562ec3571e427/e06c42226c6038da91e403c33b9947843420cf44 Some notes: - backtrace-debuginfo.rs: previously I skipped this, I'm still not sure what the best dir is. Any ideas? - estr-subtyping.rs: Seems a quite old test so removed, shouldn't? - deref-suggestion.rs: moved to inference as `suggestions` is not an ideal dir. - issue-43023.rs: a bit misclassified, moved to `derives` cc #73494 r? `@petrochenkov`
2021-08-14Auto merge of #85020 - lrh2000:named-upvars, r=tmandrybors-23/+276
Name the captured upvars for closures/generators in debuginfo Previously, debuggers print closures as something like ``` y::main::closure-0 (0x7fffffffdd34) ``` The pointer actually references to an upvar. It is not very obvious, especially for beginners. It's because upvars don't have names before, as they are packed into a tuple. This PR names the upvars, so we can expect to see something like ``` y::main::closure-0 {_captured_ref__b: 0x[...]} ``` r? `@tmandry` Discussed at https://github.com/rust-lang/rust/pull/84752#issuecomment-831639489 .
2021-08-14Auto merge of #88006 - GuillaumeGomez:update-browser-ui-test-dep, r=notriddlebors-1/+1
Update browser-ui-test package version r? `@notriddle`
2021-08-14Auto merge of #87997 - sl4m:update-favicon-order, r=GuillaumeGomezbors-2/+2
Updates favicon order of precedence as it matters to Chrome Hi, this updates #75438 to fix an order of precedence issue for Chrome. Unfortunately, the last favicon defined wins when it comes to Chrome, hence the primary icon being placed last. I [brought it up](https://bugs.chromium.org/p/chromium/issues/detail?id=1104663) with the Chromium team last year, but so far it's a non-issue. I've created an example website that mimics the behaviour in Chrome. https://sl4m.github.io/chrome-favicon/ This is what I'm seeing at the moment when viewing https://doc.rust-lang.org/core/index.html in Chrome. It's falling back to the PNG. <img width="80" alt="Screenshot 2021-08-12 at 21 11 58" src="https://user-images.githubusercontent.com/47347/129304041-b598213e-fcd3-4df1-addb-e6feac6c35b1.png">
2021-08-13Auto merge of #87478 - jackh726:issue-84931, r=estebankbors-8/+200
Point to where clause for GATs to add bound Fixes #84931 r? `@estebank`
2021-08-13Point to where clause for GATsjackh726-8/+200
2021-08-13Auto merge of #86492 - hyd-dev:no-mangle-method, r=petrochenkovbors-251/+920
Associated functions that contain extern indicator or have `#[rustc_std_internal_symbol]` are reachable Previously these fails to link with ``undefined reference to `foo'``: <details> <summary>Example 1</summary> ```rs struct AssocFn; impl AssocFn { #[no_mangle] fn foo() {} } fn main() { extern "Rust" { fn foo(); } unsafe { foo() } } ``` ([Playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=f1244afcdd26e2a28445f6e82ca46b50)) </details> <details> <summary>Example 2</summary> ```rs #![crate_name = "lib"] #![crate_type = "lib"] struct AssocFn; impl AssocFn { #[no_mangle] fn foo() {} } ``` ```rs extern crate lib; fn main() { extern "Rust" { fn foo(); } unsafe { foo() } } ``` </details> But I believe they should link successfully, because this works: <details> ```rs #[no_mangle] fn foo() {} fn main() { extern "Rust" { fn foo(); } unsafe { foo() } } ``` ([Playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=789b3f283ee6126f53939429103ed98d)) </details> This PR fixes the problem, by adding associated functions that have "custom linkage" to `reachable_set`, just like normal functions. I haven't tested whether #76211 and [Miri](https://github.com/rust-lang/miri/issues/1837) are fixed by this PR yet, but I'm submitting this anyway since this fixes the examples above. I added a `run-pass` test that combines my two examples above, but I'm not sure if that's the right way to test this. Maybe I should add / modify an existing codegen test (`src/test/codegen/export-no-mangle.rs`?) instead?
2021-08-13Auto merge of #87984 - m-ou-se:closure-lint-wording, r=Aaron1011bors-283/+283
Closure lint wording Some small changes to the wording of the closure migration lint. r? `@Aaron1011`
2021-08-13Update tests for new closure migration lint wording.Mara Bos-280/+280
2021-08-13Update closure migration diagnostic wording.Mara Bos-3/+3
2021-08-13Auto merge of #88009 - GuillaumeGomez:rollup-f194yyk, r=GuillaumeGomezbors-17/+129
Rollup of 4 pull requests Successful merges: - #87795 (Avoid ICE caused by suggestion) - #87966 (Fix `command-create-pidfd` test inside unprivileged Docker containers) - #87969 (Revert "Rollup merge of #87779 - Aaron1011:stmt-ast-id, r=petrochenkov") - #88005 (Add rustdoc GUI test for headers) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-08-13Rollup merge of #88005 - GuillaumeGomez:headers-gui-tests, r=notriddleGuillaume Gomez-1/+47
Add rustdoc GUI test for headers Add test for #87861. r? ``@notriddle``
2021-08-13Rollup merge of #87969 - Aaron1011:revert-stmt-id, r=petrochenkovGuillaume Gomez-7/+28
Revert "Rollup merge of #87779 - Aaron1011:stmt-ast-id, r=petrochenkov" Fixes #87877 This change interacts badly with `noop_flat_map_stmt`, which synthesizes multiple statements with the same `NodeId`. I'm working on a better fix that will still allow us to remove this special case. For now, let's revert the change to fix the ICE. This reverts commit a4262cc9841d91d48ef994b36eab323e615a7083, reversing changes made to 8ee962f88e1be7e29482b13c7776c26b98a93bf7.
2021-08-13Rollup merge of #87966 - pietroalbini:fix-pidfd-test, r=m-ou-seGuillaume Gomez-1/+12
Fix `command-create-pidfd` test inside unprivileged Docker containers In `src/test/ui/command/command-create-pidfd.rs` (added #81825), the detection code to skip the test on unsupported platforms doesn't account for unprivileged Docker containers (CI uses privileged containers), which leads to a test failure as you can't call the `clone3` syscall in that environment. This PR enhances the detection code to also consider unprivileged containers.
2021-08-13Rollup merge of #87795 - estebank:erase-lifetimes-in-suggestion, r=oli-obkGuillaume Gomez-8/+42
Avoid ICE caused by suggestion When suggesting dereferencing something that can be iterable in a `for` loop, erase lifetimes and use a fresh `ty::ParamEnv` to avoid 'region constraints already solved' panic. Fix #87657, fix #87709, fix #87651.
2021-08-13Improve wording, correct -> tight.Frank Steffahn-6/+6
2021-08-13Update browser-ui-test package versionGuillaume Gomez-1/+1
2021-08-13Add rustdoc GUI test for headersGuillaume Gomez-1/+47
2021-08-13Fix Cargo.lock and ui testDeadbeef-3/+3
2021-08-13Consistent use of `impl Trait` arguments in the test's helper function.Frank Steffahn-5/+1
2021-08-13make check less conservative and add explanationDeadbeef-11/+24
2021-08-13Bless testDeadbeef-4/+4
2021-08-13Make assoc types work with `?const `opt=outDeadbeef-27/+24
2021-08-13allow incomplete features for nowDeadbeef-0/+2
2021-08-13Moved ui testDeadbeef-34/+56
2021-08-13Fix testsDeadbeef-4/+7
2021-08-13Fix call-generic-method-nonconst testDeadbeef-4/+20
2021-08-13Don't transform predicates in InheritedDeadbeef-17/+1
2021-08-13handle the case when container is not implDeadbeef-6/+9
2021-08-13Fix assoc-type testDeadbeef-5/+29
2021-08-13Pass constness to SelectionContextDeadbeef-23/+101
2021-08-13Try to fix problemDeadbeef-4/+17
2021-08-13Relate implDeadbeef-0/+13
2021-08-13Make selection and evaluation caches use constnessDeadbeef-32/+59
2021-08-13fmtDeadbeef-2/+7
2021-08-13Inherited use constness and assoc change predicateDeadbeef-6/+61
2021-08-13fmtDeadbeef-2/+3