about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-02-09Auto merge of #107717 - nnethercote:opt-TyKind-eq, r=compiler-errorsbors-41/+45
Optimize `TyKind::eq`. r? `@ghost`
2023-02-08Auto merge of #107811 - matthiaskrgr:rollup-rpjzshk, r=matthiaskrgrbors-210/+1248
Rollup of 8 pull requests Successful merges: - #105641 (Implement cursors for BTreeMap) - #107271 (Treat Drop as a rmw operation) - #107710 (Update strip-ansi-escapes and vte) - #107758 (Change `arena_cache` to not alter the declared query result) - #107777 (Make `derive_const` derive properly const-if-const impls) - #107780 (Rename `replace_bound_vars_with_*` to `instantiate_binder_with_*`) - #107793 (Add missing tracking issue for `RawOsError`) - #107807 (Fix small debug typo) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-02-08Rollup merge of #107807 - GuillaumeGomez:fix-small-debug-typo, r=notriddleMatthias Krüger-1/+1
Fix small debug typo r? ``@notriddle``
2023-02-08Rollup merge of #107793 - joboet:raw_os_error_ty_tracking, r=Dylan-DPCMatthias Krüger-2/+2
Add missing tracking issue for `RawOsError` I forgot to add it in the original PR… See #107792. ```@rustbot``` label +T-libs-api -T-libs
2023-02-08Rollup merge of #107780 - compiler-errors:instantiate-binder, r=lcnrMatthias Krüger-60/+67
Rename `replace_bound_vars_with_*` to `instantiate_binder_with_*` Mentioning "binder" rather than "bound vars", imo, makes it clearer that we're doing something to the binder as a whole. Also, "instantiate" is the verb that I'm always reaching for when I'm looking for these functions, and the name that we use in the new solver anyways. r? types
2023-02-08Rollup merge of #107777 - ↵Matthias Krüger-17/+69
compiler-errors:derive_const-actually-derive-const, r=fee1-dead Make `derive_const` derive properly const-if-const impls Fixes #107774 Fixes #107666 Also fixes rendering of const-if-const bounds in pretty printing. r? ```@oli-obk``` or ```@fee1-dead```
2023-02-08Rollup merge of #107758 - Zoxc:arena-enref, r=cjgillotMatthias Krüger-70/+78
Change `arena_cache` to not alter the declared query result This makes the return types a bit clearer, limiting `arena_cache`'s effect to just the computation side. It also makes it easier to potentially remove `arena_cache`. r? ```@cjgillot```
2023-02-08Rollup merge of #107710 - ehuss:update-strip-ansi-escapes, r=Mark-SimulacrumMatthias Krüger-10/+28
Update strip-ansi-escapes and vte This updates strip-ansi-escapes from 0.1.0 to 0.1.1 (and consequently vte). Changes: https://github.com/luser/strip-ansi-escapes/compare/0.1.0...0.1.1 The only change really is updating vte which fixes some parsing issues (and drops the vendored source size by several megabytes). Closes #107708
2023-02-08Rollup merge of #107271 - Zeegomo:drop-rmw, r=oli-obkMatthias Krüger-9/+46
Treat Drop as a rmw operation Previously, a Drop terminator was considered a move in MIR. This commit changes the behavior to only treat Drop as a mutable access to the dropped place. In order for this change to be correct, we need to guarantee that 1. A dropped value won't be used again 2. Places that appear in a drop won't be used again before a subsequent initialization. We can ensure this to be correct at MIR construction because Drop will only be emitted when a variable goes out of scope, thus having: * (1) as there is no way of reaching the old value. drop-elaboration will also remove any uninitialized drop. * (2) as the place can't be named following the end of the scope. However, the initialization status, previously tracked by moves, should also be tied to the execution of a Drop, hence the additional logic in the dataflow analyses. From discussion in [this thread](https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/.60DROP.60.20to.20.60DROP_IF.60.20compiler-team.23558), originating from https://github.com/rust-lang/compiler-team/issues/558. See also https://github.com/rust-lang/rust/pull/104488#discussion_r1085556010
2023-02-08Rollup merge of #105641 - Amanieu:btree_cursor, r=m-ou-seMatthias Krüger-41/+957
Implement cursors for BTreeMap See the ACP for an overview of the API: https://github.com/rust-lang/libs-team/issues/141 The implementation is split into 2 commits: - The first changes the internal insertion functions to return a handle to the newly inserted element. The lifetimes involved are a bit hairy since we need a mutable handle to both the `BTreeMap` itself (which holds the root) and the nodes allocated in memory. I have tested that this passes the standard library testsuite under miri. - The second commit implements the cursor API itself. This is more straightforward to follow but still involves some unsafe code to deal with simultaneous mutable borrows of the tree root and the node that is currently being iterated.
2023-02-08Auto merge of #107644 - Zoxc:query-cache-tweak, r=cjgillotbors-37/+4
Remove QueryStorage::store_nocache This method was added in https://github.com/rust-lang/rust/pull/70674 but it doesn't seem to serve any purpose.
2023-02-08Fix small debug typoGuillaume Gomez-1/+1
2023-02-08std: add tracking issue for `RawOsError`joboet-2/+2
2023-02-08Auto merge of #107529 - Zoxc:inline-tweak-profile, r=cjgillotbors-28/+26
Optimize query_cache_hit to reduce code size of the query hot path. A small tweak which improves performance on check builds by 0.33% and reduces `rustc_driver` size by 1%. <table><tr><td rowspan="2">Benchmark</td><td colspan="1"><b>Before</b></th><td colspan="2"><b>Before</b></th><td colspan="2"><b>After</b></th></tr><tr><td align="right">Time</td><td align="right">Time</td><td align="right">%</th><td align="right">Time</td><td align="right">%</th></tr><tr><td>🟣 <b>clap</b>:check</td><td align="right">1.7978s</td><td align="right">1.7980s</td><td align="right"> 0.01%</td><td align="right">1.7930s</td><td align="right"> -0.27%</td></tr><tr><td>🟣 <b>hyper</b>:check</td><td align="right">0.2594s</td><td align="right">0.2591s</td><td align="right"> -0.12%</td><td align="right">0.2592s</td><td align="right"> -0.09%</td></tr><tr><td>🟣 <b>syntex_syntax</b>:check</td><td align="right">6.2522s</td><td align="right">6.2540s</td><td align="right"> 0.03%</td><td align="right">6.2358s</td><td align="right"> -0.26%</td></tr><tr><td>🟣 <b>syn</b>:check</td><td align="right">1.5889s</td><td align="right">1.5880s</td><td align="right"> -0.05%</td><td align="right">1.5799s</td><td align="right"> -0.57%</td></tr><tr><td>🟣 <b>regex</b>:check</td><td align="right">0.9941s</td><td align="right">0.9939s</td><td align="right"> -0.02%</td><td align="right">0.9893s</td><td align="right"> -0.49%</td></tr><tr><td>Total</td><td align="right">10.8925s</td><td align="right">10.8930s</td><td align="right"> 0.01%</td><td align="right">10.8572s</td><td align="right"> -0.32%</td></tr><tr><td>Summary</td><td align="right">1.0000s</td><td align="right">0.9997s</td><td align="right"> -0.03%</td><td align="right">0.9967s</td><td align="right"> -0.33%</td></tr></table> r? `@cjgillot`
2023-02-08Change `arena_cache` to not alter the declared query resultJohn Kåre Alsaker-70/+78
2023-02-08Auto merge of #107788 - matthiaskrgr:rollup-mw10sli, r=matthiaskrgrbors-164/+374
Rollup of 8 pull requests Successful merges: - #107656 (Bump rust-installer) - #107757 (Allow automatically creating vscode `settings.json` with `x setup`) - #107769 (Rename `PointerSized` to `PointerLike`) - #107770 (rustdoc: use a newline instead of `<br>` to format code headers) - #107771 (Tweak ICE message) - #107773 (Clearly signal purpose of the yaml template) - #107776 (Docs: Fix format of headings in String::reserve) - #107779 (Remove astconv usage in diagnostic) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-02-08Rollup merge of #107779 - compiler-errors:issue-107775, r=jackh726Matthias Krüger-10/+67
Remove astconv usage in diagnostic Fixes #107775 Location of the test sucks, I know, but I needed to put it somewhere :sweat: The issue here is that the root cause of the issue has nothing to do with what's being tested, so I couldn't really give it a better name. Oh well.
2023-02-08Rollup merge of #107776 - dbrgn:docs-string-reserve-headings, r=cuviperMatthias Krüger-2/+2
Docs: Fix format of headings in String::reserve It was inconsistent with other doc comments in the same module (and the rest of the rust std docs).
2023-02-08Rollup merge of #107773 - Mark-Simulacrum:rename-auto-template, r=estebankMatthias Krüger-1/+1
Clearly signal purpose of the yaml template Following up on https://github.com/rust-lang/rust/pull/106898#issuecomment-1383238532
2023-02-08Rollup merge of #107771 - estebank:ice-msg, r=compiler-errorsMatthias Krüger-16/+9
Tweak ICE message Modify main message to be more conversational and emit one fewer note.
2023-02-08Rollup merge of #107770 - notriddle:notriddle/br2nl, r=GuillaumeGomezMatthias Krüger-39/+61
rustdoc: use a newline instead of `<br>` to format code headers Since these elements now use `white-space: pre-wrap` since #107615, it's fine to use newlines for formatting, which is smaller and a bit less complicated.
2023-02-08Rollup merge of #107769 - compiler-errors:pointer-like, r=eholkMatthias Krüger-70/+73
Rename `PointerSized` to `PointerLike` The old name was unnecessarily vague. This PR renames a nightly language feature that I added, so I don't think it needs any additional approval, though anyone can feel free to speak up if you dislike the rename. It's still unsatisfying that we don't the user which of {size, alignment} is wrong, but this trait really is just a stepping stone for a more generalized mechanism to create `dyn*`, just meant for nightly testing, so I don't think it really deserves additional diagnostic machinery for now. Fixes #107696, cc ``@RalfJung`` r? ``@eholk``
2023-02-08Rollup merge of #107757 - clubby789:setup-settings-json, r=jyn514Matthias Krüger-26/+161
Allow automatically creating vscode `settings.json` with `x setup` Closes #107703
2023-02-08Rollup merge of #107656 - jonhoo:bump-rust-installer, r=Mark-SimulacrumMatthias Krüger-0/+0
Bump rust-installer Makes generation of `manifest.in` deterministic: https://github.com/rust-lang/rust-installer/pull/120
2023-02-08Auto merge of #107778 - weihanglo:update-cargo, r=weihanglobors-24/+48
Update cargo 12 commits in e84a7928d93a31f284b497c214a2ece69b4d7719..82c3bb79e3a19a5164e33819ef81bfc2c984bc56 2023-01-31 22:18:09 +0000 to 2023-02-04 22:52:16 +0000 - util toml targets: Do not infer directory as a file (rust-lang/cargo#11678) - Add more guidance on how to implement unstable features (rust-lang/cargo#11675) - Fix unstable chapter layout for codegen-backend (rust-lang/cargo#11676) - refactor: mod.rs over "name".rs for consistency (rust-lang/cargo#11673) - Verify source before recompile (rust-lang/cargo#11672) - doc: more doc comments and intra-doc links (rust-lang/cargo#11669) - Turn off debuginfo for build dependencies v2 (rust-lang/cargo#11252) - config: Deny CARGO_HOME in [env] table (fixes rust-lang/cargo#11590) (rust-lang/cargo#11644) - Fix the wrong comment (rust-lang/cargo#11651) - Add partial support for SSH known hosts markers (rust-lang/cargo#11635) - Replace `winapi` with `windows-sys` crate. (rust-lang/cargo#11656) - Handle .cargo-ok being truncated (rust-lang/cargo#11665) r? `@ghost`
2023-02-08Auto merge of #107688 - lukas-code:projection-with-lifetime, r=jackh726bors-2/+67
ReErased regions are local fix https://github.com/rust-lang/rust/issues/107678 fix https://github.com/rust-lang/rust/issues/107684 fix https://github.com/rust-lang/rust/issues/107686 fix https://github.com/rust-lang/rust/issues/107691 fix https://github.com/rust-lang/rust/issues/107730
2023-02-07Replacing bound vars is actually instantiating a binderMichael Goulet-60/+67
2023-02-07Remove astconv usage in diagnosticMichael Goulet-10/+67
2023-02-07Update cargoWeihang Lo-24/+48
12 commits in e84a7928d93a31f284b497c214a2ece69b4d7719..82c3bb79e3a19a5164e33819ef81bfc2c984bc56 2023-01-31 22:18:09 +0000 to 2023-02-04 22:52:16 +0000 - util toml targets: Do not infer directory as a file (rust-lang/cargo#11678) - Add more guidance on how to implement unstable features (rust-lang/cargo#11675) - Fix unstable chapter layout for codegen-backend (rust-lang/cargo#11676) - refactor: mod.rs over "name".rs for consistency (rust-lang/cargo#11673) - Verify source before recompile (rust-lang/cargo#11672) - doc: more doc comments and intra-doc links (rust-lang/cargo#11669) - Turn off debuginfo for build dependencies v2 (rust-lang/cargo#11252) - config: Deny CARGO_HOME in [env] table (fixes rust-lang/cargo#11590) (rust-lang/cargo#11644) - Fix the wrong comment (rust-lang/cargo#11651) - Add partial support for SSH known hosts markers (rust-lang/cargo#11635) - Replace `winapi` with `windows-sys` crate. (rust-lang/cargo#11656) - Handle .cargo-ok being truncated (rust-lang/cargo#11665)
2023-02-07Add ~const bounds trait bounds when using derive_constMichael Goulet-12/+46
2023-02-07Expand const-if-const trait bounds correctlyMichael Goulet-5/+23
2023-02-07Auto merge of #107768 - matthiaskrgr:rollup-9u4cal4, r=matthiaskrgrbors-450/+461
Rollup of 8 pull requests Successful merges: - #107719 (Remove `arena_cache` modifier from `upstream_monomorphizations_for`) - #107740 (Avoid locking the global context across the `after_expansion` callback) - #107746 (Split fn_ctxt/adjust_fulfillment_errors from fn_ctxt/checks) - #107749 (allow quick-edit convenience) - #107750 (make more readable) - #107755 (remove binder from query constraints) - #107756 (miri: fix ICE when running out of address space) - #107764 (llvm-16: Use Triple.h from new header location.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-02-07Docs: Fix format of headings in String::reserveDanilo Bargen-2/+2
2023-02-07Clearly signal purpose of the yaml templateMark Rousskov-1/+1
2023-02-07Tweak ICE messageEsteban Küber-16/+9
Modify main message to be more conversational and emit one fewer note.
2023-02-07Rename PointerSized to PointerLikeMichael Goulet-70/+73
2023-02-07rustdoc: use a newline instead of `<br>` to format code headersMichael Howell-39/+61
Since these elements now use `white-space: pre-wrap` since 784665d4ce59c5239791f1f96fa2137e47ca1817, it's fine to use newlines for formatting, which is smaller and a bit less complicated.
2023-02-07Auto merge of #107767 - matthiaskrgr:rollup-9m1qfso, r=matthiaskrgrbors-109/+492
Rollup of 8 pull requests Successful merges: - #100599 (Add compiler error E0523 long description and test) - #107471 (rustdoc: do not include empty default-settings tag in HTML) - #107555 (Modify existing bounds if they exist) - #107662 (Turn projections into copies in CopyProp.) - #107695 (Add test for Future inflating arg size to 3x ) - #107700 (Run the tools builder on all PRs) - #107706 (Mark 'atomic_mut_ptr' methods const) - #107709 (Fix problem noticed in PR106859 with char -> u8 suggestion) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-02-07Allow automatically creating vscode `settings.json` from bootstrapclubby789-26/+161
2023-02-07Rollup merge of #107764 - maurer:llvm-16, r=cuviperMatthias Krüger-1/+6
llvm-16: Use Triple.h from new header location. LLVM 16 has moved Triple.h from ADT and into TargetParser. LLVM [landed a commit](https://github.com/llvm/llvm-project/commit/62c7f035b4392c1933550eead6ddab35122720bc) this morning moving the header. This change should make rustc continue to build against LLVM main.
2023-02-07Rollup merge of #107756 - RalfJung:miri-out-of-addresses, r=oli-obkMatthias Krüger-33/+54
miri: fix ICE when running out of address space Fixes https://github.com/rust-lang/miri/issues/2769 r? `@oli-obk` I didn't add a test since that requires https://github.com/oli-obk/ui_test/issues/38 (host must be 64bit and target 32bit). Also the test takes ~30s, so I am not sure if we want to have it in the test suite?
2023-02-07Rollup merge of #107709 - tialaramex:master, r=compiler-errorsMatthias Krüger-3/+57
Fix problem noticed in PR106859 with char -> u8 suggestion HN reader `@ayosec` noticed that my #106859 a few weeks back, malfunctions if you have a Unicode escape, the code suggested b'\u{0}' if you tried to use '\u{0}' where a byte should be, when of course b'\u{0}' is not a byte literal, regardless of the codepoint you can't write Unicode escapes in a byte literal at all. My proposed fix here just checks that the "character" you wrote is fewer than 5 bytes, thus allowing \x7F and similar escapes but conveniently forbidding even the smallest Unicode escape \u{0} before offering the suggestion as before. I have provided an updated test which includes examples which do and don't work because of this additional rule.
2023-02-07Rollup merge of #107755 - lcnr:no-binder, r=oli-obkMatthias Krüger-39/+20
remove binder from query constraints r? types
2023-02-07Rollup merge of #107750 - tshepang:readability, r=GuillaumeGomezMatthias Krüger-1/+1
make more readable
2023-02-07Rollup merge of #107706 - tgross35:atomic-as-mut-ptr, r=m-ou-seMatthias Krüger-5/+5
Mark 'atomic_mut_ptr' methods const There's nothing that would block these methods from being const (just an UnsafeCell get), and it would be helpful for FFI interfaces in static contexts Related tracking issue: #66893
2023-02-07Rollup merge of #107749 - tshepang:editing-convenience, r=michaelwoeristerMatthias Krüger-0/+1
allow quick-edit convenience
2023-02-07Rollup merge of #107700 - jyn514:tools-builder, r=Mark-SimulacrumMatthias Krüger-40/+2
Run the tools builder on all PRs Previously, it would only run on changes to subtrees, submodules, or select directories. That made it so that changes to the compiler that broke tools would only be detected on a full bors merge. This makes it so the tools builder runs by default, making it easier to catch breaking changes to clippy (which was the most affected). r? ``@Mark-Simulacrum`` cc ``@pietroalbini`` ``@flip1995`` ``@m-ou-se``
2023-02-07Rollup merge of #107746 - ↵Matthias Krüger-370/+374
Nathan-Fenner:nathanf/clean-up-adjust_fulfillment_errors, r=compiler-errors Split fn_ctxt/adjust_fulfillment_errors from fn_ctxt/checks This is a follow-up from #106477, addressing a small number of the `FIXME`s that were added, by moving some functions into the new(er) `adjust_fulfillment_errors` module. More cleanup is possible for this file (and I'll hopefully get around to doing some of that soon) but the very first thing is to just move these functions out. There should be no "real" changes in this PR, besides minor adjustments to imports and the functions being transferred.
2023-02-07Rollup merge of #107695 - Swatinem:futcallx3, r=compiler-errorsMatthias Krüger-0/+96
Add test for Future inflating arg size to 3x This adds one more test that should track improvements to generator layout, like https://github.com/rust-lang/rust/issues/62958 and https://github.com/rust-lang/rust/issues/62575. In particular, this test highlights suboptimal layout, as the storage for the argument future is not being reused across its usage as `upvar`, `local` and `awaitee` (being polled to completion). This is on top of https://github.com/rust-lang/rust/pull/107692 (as those would conflict with each other) It is a minimal repro for code mentioned in https://github.com/moka-rs/moka/issues/212#issuecomment-1416914616 (CC `@tatsuya6502)`
2023-02-07Rollup merge of #107740 - oli-obk:lock_tcx, r=petrochenkovMatthias Krüger-5/+5
Avoid locking the global context across the `after_expansion` callback r? `@petrochenkov` This was noticed in https://github.com/model-checking/kani/pull/2184#issuecomment-1416566982 This didn't have a perf impact, as it's just an additional 2 or 3 RefCell locks being created.