about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-03-16Add `try_canonicalize` to `rustc_fs_util` and use it over `fs::canonicalize`John Kåre Alsaker-14/+31
2023-03-16Auto merge of #109206 - matthiaskrgr:rollup-oev8ax6, r=matthiaskrgrbors-411/+791
Rollup of 10 pull requests Successful merges: - #108875 (rustdoc: fix type search for `Option` combinators) - #108971 (error-msg: impl better suggestion for `E0532`) - #109139 (rustdoc: DocFS: Replace rayon with threadpool and enable it for all targets) - #109151 (Assert def-kind is correct for alias types) - #109158 (error-msg: expand suggestion for `unused_def` lint) - #109166 (make `define_opaque_types` fully explicit) - #109171 (Some cleanups in our normalization logic) - #109180 (Unequal → Not equal) - #109185 (rustdoc: remove `std::` from primitive intra-doc link tooltips) - #109192 (Mention UEFI target promotion in release notes for 1.67.0) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-03-16Rollup merge of #109192 - lukas-code:uefi-relnotes, r=joshtriplettMatthias Krüger-1/+2
Mention UEFI target promotion in release notes for 1.67.0 The promotion happened in https://github.com/rust-lang/rust/pull/103933/, but it was forgotten in the release notes for 1.67.0. See also discussion in https://rust-lang.zulipchat.com/#narrow/stream/241545-t-release/topic/UEFI.20targets.20relnotes
2023-03-16Rollup merge of #109185 - notriddle:notriddle/primitive-tooltip, r=jshaMatthias Krüger-0/+8
rustdoc: remove `std::` from primitive intra-doc link tooltips Take the intra-doc link to the method `iter` from https://doc.rust-lang.org/nightly/std/slice/struct.Iter.html Before: `method std::slice::iter` After: `method slice::iter`
2023-03-16Rollup merge of #109180 - gimbles:master, r=compiler-errorsMatthias Krüger-21/+21
Unequal → Not equal Fixes #109168
2023-03-16Rollup merge of #109171 - oli-obk:normalization_cleanup, r=compiler-errorsMatthias Krüger-77/+48
Some cleanups in our normalization logic Changed a match to be exhaustive and deduplicated some code. r? ```@compiler-errors``` this pulls out the uncontroversial part of https://github.com/rust-lang/rust/pull/108860
2023-03-16Rollup merge of #109166 - lcnr:define_opaque_types-explicit, r=oli-obkMatthias Krüger-224/+307
make `define_opaque_types` fully explicit based on the idea of #108389. Moved `define_opaque_types` into the actual operations, e.g. `eq`, instead of `infcx.at` because normalization doesn't use `define_opaque_types` and even creates it's own `At` with a different `define_opaque_types` internally. Somewhat surprisingly, coherence actually relies on `DefineOpaqueTypes::Yes` for soundness which was revealed because I've incorrectly used `DefineOpaqueTypes::No` in `equate_impl_headers`. It feels concerning that even though this is the case, we still sometimes use `DefineOpaqueTypes::No` in coherence. I did not look into this as part of this PR as it is purely changing the structure of the code without changing behavior in any way. r? ```@oli-obk```
2023-03-16Rollup merge of #109158 - Ezrashaw:expand-sugg-for-unused-lint, r=NilstriebMatthias Krüger-31/+138
error-msg: expand suggestion for `unused_def` lint Fixes #108885 Expands `let _ = ..` suggestion into more positions.
2023-03-16Rollup merge of #109151 - compiler-errors:debug-assert-alias, r=WaffleLapkinMatthias Krüger-20/+16
Assert def-kind is correct for alias types Make sure we're not constructing alias types for the wrong def-kind, at least for debug cases :sweat_smile:
2023-03-16Rollup merge of #109139 - GuillaumeGomez:rustdoc-windows-wait-for-write, ↵Matthias Krüger-11/+32
r=notriddle rustdoc: DocFS: Replace rayon with threadpool and enable it for all targets Fixes https://github.com/rust-lang/rust/issues/109060. Switching to `threadpool` makes it a bit simpler for us to wait for all tasks in `DocFS` directly in the `Drop` implementation. I'm also curious if making all the writes into a thread pool could improve run time for rustdoc on all other platforms than Windows as well. I'll run a perf check to see. cc ```@ehuss``` r? ```@notriddle```
2023-03-16Rollup merge of #108971 - Ezrashaw:E0532-better-binding-names, r=WaffleLapkinMatthias Krüger-17/+169
error-msg: impl better suggestion for `E0532` Fixes #106862 No test as there is already a test which is nearly identical to the example in the linked issue.
2023-03-16Rollup merge of #108875 - notriddle:notriddle/return-trait, r=GuillaumeGomezMatthias Krüger-9/+50
rustdoc: fix type search for `Option` combinators
2023-03-16Auto merge of #108809 - lqd:fix-ignore, r=pietroalbinibors-2/+3
fix ignore header in MSVC test From `@pietroalbini's` [zulip message](https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/better.20compiletest.20ignore.20messages/near/339845864) > there are tests like `tests/ui/panic-runtime/unwind-tables-target-required.rs` which have `only-x86_64-windows-msvc` which I'm pretty sure is invalid This test is currently ignored on x64 MSVC CI because of this incorrect target. We'll see if it still passes. r? `@pietroalbini`
2023-03-16Auto merge of #109183 - lqd:revert-107376, r=compiler-errorsbors-87/+152
Revert #107376 to fix potential `bincode` breakage and `rustc-perf` benchmark. #107376 caused `rustc-perf`'s `webrender` benchmark to break, by regressing on the `bincode-1.3.3` crate. ~~This PR is a draft revert in case we can't land a fix soon enough, and we'd like to land the revert instead~~ (Though I myself think it'd be safer to do the revert, and run crater when relanding #107376.) cc `@aliemjay`
2023-03-15Mention UEFI target promotion in release notes for 1.67.0Lukas Markeffsky-1/+2
2023-03-15Auto merge of #108282 - cjgillot:mir-checked-sh, r=tmiaskobors-111/+109
Implement checked Shl/Shr at MIR building. This does not require any special handling by codegen backends, as the overflow behaviour is entirely determined by the rhs (shift amount). This allows MIR ConstProp to remove the overflow check for constant shifts. ~There is an existing different behaviour between cg_llvm and cg_clif (cc `@bjorn3).` I took cg_llvm's one as reference: overflow if `rhs < 0 || rhs > number_of_bits_in_lhs_ty`.~ EDIT: `cg_llvm` and `cg_clif` implement the overflow check differently. This PR uses `cg_llvm`'s implementation based on a `BitAnd` instead of `cg_clif`'s one based on an unsigned comparison.
2023-03-15rustdoc: remove `std::` from primitive intra-doc link tooltipsMichael Howell-0/+8
2023-03-15Auto merge of #109169 - bjorn3:sync_cg_clif-2023-03-15, r=bjorn3bors-792/+873
Sync rustc_codegen_cranelift Bunch of bug fixes this time. Also an update to Cranelift 0.93 which adds a brand new optimization pass which cg_clif exposes when using `--release`. And various improvements to cg_clif's test suite, making it faster to run. And finally two small perf improvements. r? `@ghost` `@rustbot` label +A-codegen +A-cranelift +T-compiler
2023-03-15unequal → not equalgimbles-21/+21
2023-03-15Update docsfs module documentationGuillaume Gomez-1/+0
2023-03-15Revert "Auto merge of #107376 - aliemjay:remove-givens, r=lcnr"Rémy Rakic-87/+152
This reverts commit e84e5ff04a647ce28540300244a26ba120642eea, reversing changes made to 1716932743a7b3705cbf0c34db0c4e070ed1930d.
2023-03-15Auto merge of #109164 - Dylan-DPC:rollup-0bwxwos, r=Dylan-DPCbors-296/+294
Rollup of 7 pull requests Successful merges: - #108991 (add `enable-warnings` flag for llvm, and disable it by default.) - #109109 (Use `unused_generic_params` from crate metadata) - #109111 (Create dirs for build_triple) - #109136 (Simplify proc macro signature validity check) - #109150 (Update cargo) - #109154 (Fix MappingToUnit to support no span of arg_ty) - #109157 (Remove mw from review rotation for a while) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-03-15Merge commit 'dec0daa8f6d0a0e1c702f169abb6bf3eee198c67' into ↵bjorn3-792/+873
sync_cg_clif-2023-03-15
2023-03-15Rustup to rustc 1.70.0-nightly (171693274 2023-03-14)bjorn3-1/+1
2023-03-15Sync from rust 1716932743a7b3705cbf0c34db0c4e070ed1930dbjorn3-6/+6
2023-03-15Introduce Box::new in mini_corebjorn3-0/+11
2023-03-15Use patched git-subtree from bjorn3/git@tqc-subtree-portablebjorn3-3/+22
This patched has been necessary for subtree syncs from the start, but previously it was necessary to locally install tqc's patched git version, which hasn't been updated for quite a while. I made a small change to allow downloading it as script without requiring an entire git installation for the patched version.
2023-03-15always make `define_opaque_types` explicitlcnr-224/+307
2023-03-15Rollup merge of #109157 - michaelwoerister:tb, r=Mark-SimulacrumDylan DPC-1/+0
Remove mw from review rotation for a while I'm triple booked right now 📚
2023-03-15Rollup merge of #109154 - chenyukang:yukang/fix-109152, r=compiler-errorsDylan DPC-2/+39
Fix MappingToUnit to support no span of arg_ty Fixes #109152
2023-03-15Rollup merge of #109150 - weihanglo:update-cargo, r=weihangloDylan DPC-2/+2
Update cargo 14 commits in 7d3033d2e59383fd76193daf9423c3d141972a7d..4a3c588b1f0a8e2dc8dd8789dbf3b6a71b02ed49 2023-03-08 17:05:08 +0000 to 2023-03-14 14:05:36 +0000 - ci: make clean-test-output a script for reuse (rust-lang/cargo#11848) - Accurately show status when downgrading dependencies (rust-lang/cargo#11839) - docs(contrib): Move Design Principles earlier in the book (rust-lang/cargo#11842) - docs(contrib): Point compilation docs to doc comments (rust-lang/cargo#11841) - `cargo install --git` multiple packages with binaries found hint (rust-lang/cargo#11835) - Disable flaky auth tests when `gitoxide` runs them (rust-lang/cargo#11830) - Add some documentation on writing cross-compilation tests (rust-lang/cargo#11825) - chore: Use sparse protocol on stable CI (rust-lang/cargo#11829) - Notice for potential unexpected shell expansions in help text of `cargo-add` (rust-lang/cargo#11826) - Add tracking issue to gitoxide unstable docs (rust-lang/cargo#11822) - Bump crates-io to 0.36.0 (rust-lang/cargo#11820) - Bump to 0.71.0; update changelog (rust-lang/cargo#11815) - docs(contrib): Move overview to lib (rust-lang/cargo#11809) - Fix semver check for 1.68 (rust-lang/cargo#11817) r? `@ghost`
2023-03-15Rollup merge of #109136 - compiler-errors:simplify-proc-macro-checking, ↵Dylan DPC-275/+212
r=oli-obk Simplify proc macro signature validity check Use an `ObligationCtxt` instead of `normalize_erasing_regions` + `DeepRejectCtxt`. This should both give us a more accurate error message, and also avoid issues like not-well-formed proc macro signatures. Also, let's fall back on the regular type mismatch error reporting for making these diagnostic notes, instead of hard-coding a bunch of specific diagnostics. Fixes #109129
2023-03-15Rollup merge of #109111 - MU001999:master, r=jyn514Dylan DPC-0/+1
Create dirs for build_triple Fixes #109103
2023-03-15Rollup merge of #109109 - compiler-errors:polymorphize-foreign, r=NilstriebDylan DPC-10/+28
Use `unused_generic_params` from crate metadata Due to the way that `separate_provide_extern` interacted with the implementation of `<ty::InstanceDef<'tcx> as Key>::query_crate_is_local`, we actually never hit the foreign provider for `unused_generic_params`. Additionally, since the *local* provider of `unused_generic_params` calls `should_polymorphize`, which always returns false if the def-id is foreign, this means that we never actually polymorphize monomorphic instances originating from foreign crates. We don't actually encode `unused_generic_params` for items where all generics are used, so I had to tweak the foreign provider to fall back to `ty::UnusedGenericParams::new_all_used()` to avoid more ICEs when the above bugs were fixed.
2023-03-15Rollup merge of #108991 - ozkanonur:new-llvm-flag, r=albertlarsan68Dylan DPC-6/+12
add `enable-warnings` flag for llvm, and disable it by default. This flag allows to turn off warnings of llvm compilation for people who are not interested on those warnings.
2023-03-15Deduplicate logic between projection normalization with and without escaping ↵Oli Scherer-59/+21
bound vars
2023-03-15Exhaustively match over all alias kindsOli Scherer-20/+29
2023-03-15Auto merge of #109035 - scottmcm:ptr-read-should-know-undef, ↵bors-48/+358
r=WaffleLapkin,JakobDegen Ensure `ptr::read` gets all the same LLVM `load` metadata that dereferencing does I was looking into `array::IntoIter` optimization, and noticed that it wasn't annotating the loads with `noundef` for simple things like `array::IntoIter<i32, N>`. Trying to narrow it down, it seems that was because `MaybeUninit::assume_init_read` isn't marking the load as initialized (<https://rust.godbolt.org/z/Mxd8TPTnv>), which is unfortunate since that's basically its reason to exist. The root cause is that `ptr::read` is currently implemented via the *untyped* `copy_nonoverlapping`, and thus the `load` doesn't get any type-aware metadata: no `noundef`, no `!range`. This PR solves that by lowering `ptr::read(p)` to `copy *p` in MIR, for which the backends already do the right thing. Fortuitiously, this also improves the IR we give to LLVM for things like `mem::replace`, and fixes a couple of long-standing bugs where `ptr::read` on `Copy` types was worse than `*`ing them. Zulip conversation: <https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/Move.20array.3A.3AIntoIter.20to.20ManuallyDrop/near/341189936> cc `@erikdesjardins` `@JakobDegen` `@workingjubilee` `@the8472` Fixes #106369 Fixes #73258
2023-03-15error-msg: expand suggestion for unused lintEzra Shaw-31/+138
2023-03-15add `enable-warnings` flag for llvmozkanonur-6/+12
Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-03-15error-msg: impl better suggestion for `E0532`Ezra Shaw-17/+169
2023-03-15Remove mw from review rotation.Michael Woerister-1/+0
2023-03-15Auto merge of #109089 - compiler-errors:opt_rpitit_info-follow-up, r=spastorinobors-8/+16
Encode `opt_rpitit_info` for associated types Follow-up, only last commit matters r? `@spastorino` This needs a perf run after the parent pr lands
2023-03-15Split the mem-replace codegen testScott McMurray-22/+36
Apparently in CI it's getting generated in the opposite order, one function per file will make the test pass either way.
2023-03-15Fix #109152, fix the scenario that we may can not get span of funcyukang-2/+39
2023-03-14Improved implementation and comments after code review feedbackScott McMurray-77/+124
2023-03-15Auto merge of #107376 - aliemjay:remove-givens, r=lcnrbors-152/+87
remove obsolete `givens` from regionck Fixes #106567 r? `@lcnr` (feel free to reassign)
2023-03-14Don't make projection tys out of anon constsMichael Goulet-21/+10
2023-03-14Assert def-kind is correct for alias typesMichael Goulet-0/+7
2023-03-14Update cargoWeihang Lo-2/+2
14 commits in 7d3033d2e59383fd76193daf9423c3d141972a7d..4a3c588b1f0a8e2dc8dd8789dbf3b6a71b02ed49 2023-03-08 17:05:08 +0000 to 2023-03-14 14:05:36 +0000 - ci: make clean-test-output a script for reuse (rust-lang/cargo#11848) - Accurately show status when downgrading dependencies (rust-lang/cargo#11839) - docs(contrib): Move Design Principles earlier in the book (rust-lang/cargo#11842) - docs(contrib): Point compilation docs to doc comments (rust-lang/cargo#11841) - `cargo install --git` multiple packages with binaries found hint (rust-lang/cargo#11835) - Disable flaky auth tests when `gitoxide` runs them (rust-lang/cargo#11830) - Add some documentation on writing cross-compilation tests (rust-lang/cargo#11825) - chore: Use sparse protocol on stable CI (rust-lang/cargo#11829) - Notice for potential unexpected shell expansions in help text of `cargo-add` (rust-lang/cargo#11826) - Add tracking issue to gitoxide unstable docs (rust-lang/cargo#11822) - Bump crates-io to 0.36.0 (rust-lang/cargo#11820) - Bump to 0.71.0; update changelog (rust-lang/cargo#11815) - docs(contrib): Move overview to lib (rust-lang/cargo#11809) - Fix semver check for 1.68 (rust-lang/cargo#11817)