about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-03-08Remove `identity_future` indirectionArpad Borsos-357/+145
This was previously needed because the indirection used to hide some unexplained lifetime errors, which it turned out were related to the `min_choice` algorithm. Removing the indirection also solves a couple of cycle errors, large moves and makes async blocks support the `#[track_caller]` annotation.
2023-03-01Auto merge of #108476 - saethlin:remove-library-rustc-box, r=thomccbors-9/+7
Remove or document uses of #[rustc_box] in library r? `@thomcc` Only one of these uses is tested for in the rustc-perf benchmark suite. The impact there on compile time is somewhat dramatic, but I am inclined to make this change as a simplification to the library and wait for people to complain if it explodes their compilation time. I think in the absence of data or reports from users about what code paths really matter, if we are optimizing for compilation time, it's hard to argue against using `#[rustc_box]` everywhere we currently call `Box::new`.
2023-03-01Auto merge of #108587 - matthiaskrgr:rollup-rw6po59, r=matthiaskrgrbors-227/+343
Rollup of 10 pull requests Successful merges: - #108376 (compiler/rustc_session: fix sysroot detection logic) - #108400 (add llvm cgu instructions stats to perf) - #108496 (fix #108495, postfix decrement and prefix decrement has no warning) - #108505 (Further unify validity intrinsics) - #108520 (Small cleanup to `one_bound_for_assoc_type`) - #108560 (Some `infer/mod.rs` cleanups) - #108563 (Make mailmap more correct) - #108564 (Fix `x clean` with specific paths) - #108571 (Add contains_key to SortedIndexMultiMap) - #108578 (Update Fuchsia platform team members) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-03-01Auto merge of #108586 - matthiaskrgr:rollup-ry9u2ou, r=matthiaskrgrbors-1729/+550
Rollup of 8 pull requests Successful merges: - #108297 (Exit when there are unmatched delims to avoid noisy diagnostics) - #108531 (rustdoc: Show that repeated expression arrays can be made with constant values) - #108536 (Update books) - #108550 (Remove the `capture_disjoint_fields` feature) - #108551 (Descriptive error when users try to combine RPITIT/AFIT with specialization) - #108554 (Only look for param in item's generics if it actually comes from generics) - #108555 (Fix a race in the query system) - #108558 (add missing feature in core/tests) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-03-01Rollup merge of #108578 - djkoloski:update_fuchsia_team, r=tmandryMatthias Krüger-1/+0
Update Fuchsia platform team members r? `@tmandry`
2023-03-01Rollup merge of #108571 - Jesse-Bakker:sorted_index_multi_map_contains_key, ↵Matthias Krüger-0/+9
r=Nilstrieb Add contains_key to SortedIndexMultiMap
2023-03-01Rollup merge of #108564 - clubby789:patch-1, r=jyn514Matthias Krüger-0/+1
Fix `x clean` with specific paths Fixes #108517 `cargo clean` takes package names to clean with `-p`, rather than as free args
2023-03-01Rollup merge of #108563 - albertlarsan68:patch-1, r=compiler-errorsMatthias Krüger-1/+1
Make mailmap more correct
2023-03-01Rollup merge of #108560 - Nilstrieb:infer-cleanup, r=compiler-errorsMatthias Krüger-39/+11
Some `infer/mod.rs` cleanups
2023-03-01Rollup merge of #108520 - compiler-errors:one-bound-nit, r=jackh726Matthias Krüger-20/+16
Small cleanup to `one_bound_for_assoc_type` Use fewer closures :)
2023-03-01Rollup merge of #108505 - Nilstrieb:further-unify-validity-intrinsics, ↵Matthias Krüger-163/+119
r=michaelwoerister Further unify validity intrinsics Also merges the inhabitedness check into the query to further unify the code paths. Depends on #108364
2023-03-01Rollup merge of #108496 - nx2k3:issue-108495-dec, r=WaffleLapkinMatthias Krüger-2/+134
fix #108495, postfix decrement and prefix decrement has no warning Fixes #108495
2023-03-01Rollup merge of #108400 - csmoe:cgu-instr-perf, r=bjorn3Matthias Krüger-0/+41
add llvm cgu instructions stats to perf r? ```@bjorn3```
2023-03-01Rollup merge of #108376 - liushuyu:fix-sysroot-infer-103660, r=ozkanonurMatthias Krüger-1/+11
compiler/rustc_session: fix sysroot detection logic This pull request fixes the sysroot detection logic on systems where `/usr/lib` contains a multi-arch structure (e.g. installs `rustc_driver` into `/usr/lib/x86_64-linux-gnu` folder). This fixes a regression for various Linux systems introduced in #103660. On Debian and Ubuntu systems, the logic in the pull request, as mentioned earlier, will resolve the sysroot to `/usr/lib`, making `rustc --print target-libdir` to return `/usr/lib/lib/rustlib/x86_64-unknown-linux-gnu/lib` (notice the extra `lib` at the beginning). The fix is not very "clean" according to the standard. If you have any suggestions on improving the logic, you are more than welcome to comment below!
2023-03-01Rollup merge of #108558 - RalfJung:core-tests, r=thomccMatthias Krüger-0/+1
add missing feature in core/tests https://github.com/rust-lang/rust/pull/104265 introduced the `ip_in_core` feature. For some reason core tests seem to still build without that feature -- no idea how that is possible. Might be related to https://github.com/rust-lang/rust/issues/15702? I was under the impression that `pub use` with different stability doesn't actually work. That's why `intrinsics::transmute` is stable, for example. Either way, core tests fail to build in miri-test-libstd, and adding the feature fixes that. r? ```@thomcc```
2023-03-01Rollup merge of #108555 - Zoxc:par-fix, r=cjgillotMatthias Krüger-4/+5
Fix a race in the query system This fixes an issue where in between the `job` removal and `complete` call the query neither has a job nor a result, allowing another thread to start executing it again. r? ``@cjgillot``
2023-03-01Rollup merge of #108554 - compiler-errors:late-bound-object-default, r=oli-obkMatthias Krüger-49/+119
Only look for param in item's generics if it actually comes from generics Record whether a `hir::GenericParam` comes from an item's generics, or from a `for<...>` binder. Then, only look for the param in `object_lifetime_default` if it actually comes from the item's generics. Fixes #108177
2023-03-01Rollup merge of #108551 - compiler-errors:rpitit-bad-spec, r=oli-obkMatthias Krüger-65/+83
Descriptive error when users try to combine RPITIT/AFIT with specialization Previously we failed with some esoteric error like: ``` error[E0053]: method `foo` has an incompatible type for trait --> $DIR/dont-project-to-specializable-projection.rs:14:35 | LL | default async fn foo(_: T) -> &'static str { | ^^^^^^^^^^^^ expected associated type, found future | note: type in trait --> $DIR/dont-project-to-specializable-projection.rs:10:27 | LL | async fn foo(_: T) -> &'static str; | ^^^^^^^^^^^^ = note: expected signature `fn(_) -> impl Future<Output = &'static str>` found signature `fn(_) -> impl Future<Output = &'static str>` ``` Now we error like: ``` error: async associated function in trait cannot be specialized --> $DIR/dont-project-to-specializable-projection.rs:14:5 | LL | default async fn foo(_: T) -> &'static str { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: specialization behaves in inconsistent and surprising ways with `#![feature(async_fn_in_trait)]`, and for now is disallowed ```
2023-03-01Rollup merge of #108550 - clubby789:remove-disjoint, r=compiler-errorsMatthias Krüger-29/+17
Remove the `capture_disjoint_fields` feature As best I can tell, this was stabilized for Edition 2021 in #88126 but the feature was never removed.
2023-03-01Rollup merge of #108536 - rustbot:docs-update, r=ehussMatthias Krüger-0/+0
Update books ## rust-lang/book 1 commits in d94e03a18a2590ed3f1c67b859cb11528d2a2d5c..21a2ed14f4480dab62438dcc1130291bebc65379 2023-02-13 19:45:29 UTC to 2023-02-13 19:45:29 UTC - Removed "," typo on ch03-01 line 85 (rust-lang/book#3537) ## rust-lang/reference 1 commits in e5adb99c04817b7fbe08f4ffce5b36702667345f..a9afb04b47a84a6753e4dc657348c324c876102c 2023-02-14 14:57:15 UTC to 2023-02-14 14:57:15 UTC - Document the `efiapi` ABI (rust-lang/reference#1309) ## rust-lang/rust-by-example 1 commits in efe23c4fe12e06351b8dc8c3d18312c761455109..af0998b7473839ca75563ba3d3e7fd0160bef235 2023-02-15 18:17:20 UTC to 2023-02-15 18:17:20 UTC - Typographical mistake in tuples.md (rust-lang/rust-by-example#1685) ## rust-lang/rustc-dev-guide 30 commits in 41a96ab971cb45e2a184df20619ad1829765c990..b06dab84083390e0ee1e998f466545a8a1a76a9f 2023-02-26 22:30:52 UTC to 2023-02-14 05:16:01 UTC - Fixed typing errors (rust-lang/rustc-dev-guide#1622) - this remains true (rust-lang/rustc-dev-guide#1620) - diagnostics: small fixes/improvements (rust-lang/rustc-dev-guide#1618) - typo (rust-lang/rustc-dev-guide#1616) - typo (rust-lang/rustc-dev-guide#1617) - keep "grey area" lint summary green (rust-lang/rustc-dev-guide#1619) - new solver: write canonicalization chapter (rust-lang/rustc-dev-guide#1595) - bootstrap now creates a usable toolchain when building stage0 std (rust-lang/rustc-dev-guide#1615) - llvm 13 is now not supported (rust-lang/rustc-dev-guide#1612) - enable AND search (rust-lang/rustc-dev-guide#1607) - Vetting deps datecheck (rust-lang/rustc-dev-guide#1614) - mention Dev desktops, to help with LLVM builds (rust-lang/rustc-dev-guide#1613) - fix and clarify llvm bugfix policy (rust-lang/rustc-dev-guide#1611) - lower-case "Compiler" in headings, for consistency (and looks) (rust-lang/rustc-dev-guide#1605) - Explain what the rest of the backend agnostic page is about (rust-lang/rustc-dev-guide#1609) - Bump dependencies to fix CI (rust-lang/rustc-dev-guide#1610) - rustc_codegen_ssa feels permanent enough not to need date-check (rust-lang/rustc-dev-guide#1606) - make use of the `host` symlink in the build directory, to ease things (rust-lang/rustc-dev-guide#1608) - have checkboxes only point to date-check lines in files (rust-lang/rustc-dev-guide#1603) - remove stray text (rust-lang/rustc-dev-guide#1604) - Typo (rust-lang/rustc-dev-guide#1601) - Typo (rust-lang/rustc-dev-guide#1602) - Add link to vscode settings in Rust repo (rust-lang/rustc-dev-guide#1591) - avoid code duplication by including files in docs (rust-lang/rustc-dev-guide#1598) - howto run the examples (rust-lang/rustc-dev-guide#1593) - Add sample CodeLLDB launch.json (rust-lang/rustc-dev-guide#1482) - typo (rust-lang/rustc-dev-guide#1600) - use actual names (rust-lang/rustc-dev-guide#1594) - Fix a typo (rust-lang/rustc-dev-guide#1597) - Add Neovim configuration information (rust-lang/rustc-dev-guide#1545)
2023-03-01Rollup merge of #108531 - Coca162:rustdoc-repeat-const-array, r=thomccMatthias Krüger-4/+8
rustdoc: Show that repeated expression arrays can be made with constant values The [rust reference](https://doc.rust-lang.org/reference/expressions/array-expr.html) currently says that repeated values for arrays can be constant or `Copy` > repeat operand is [Copy](https://doc.rust-lang.org/reference/special-types-and-traits.html#copy) or that it must be a [path](https://doc.rust-lang.org/reference/expressions/path-expr.html) to a constant item This updates the rust documentation on primitive arrays to reflect what the rust reference says (and also compiler suggestions if you do not use a `const` item)
2023-03-01Rollup merge of #108297 - chenyukang:yukang/delim-error-exit, r=petrochenkovMatthias Krüger-1578/+317
Exit when there are unmatched delims to avoid noisy diagnostics From https://github.com/rust-lang/rust/pull/104012#issuecomment-1311764832 r? ``@petrochenkov``
2023-03-01Auto merge of #108582 - weihanglo:update-cargo, r=weihanglobors-15/+6
Update cargo 10 commits in 9d5b32f503fc099c4064298465add14d4bce11e6..9880b408a3af50c08fab3dbf4aa2a972df71e951 2023-02-22 23:04:16 +0000 to 2023-02-28 19:39:39 +0000 - bump jobserver to respect `--jobserver-auth=fifo:PATH` (rust-lang/cargo#11767) - Addition of support for -F as an alias for --features (rust-lang/cargo#11774) - Added documentation for the configuration discovery of `cargo install` to the man pages (rust-lang/cargo#11763) - Fix Cargo removing the sparse+ prefix from sparse URLs in .crates.toml (rust-lang/cargo#11756) - Fix warning with tempfile (rust-lang/cargo#11771) - Error message for transitive artifact dependencies with targets the package doesn't directly interact with (rust-lang/cargo#11643) - Fix tests with nondeterministic ordering (rust-lang/cargo#11766) - Make some blocking tests non-blocking (rust-lang/cargo#11650) - Suggest cargo add when installing library crate (rust-lang/cargo#11410) - chore: bump is-terminal to 0.4.4 (rust-lang/cargo#11759) r? `@ghost`
2023-02-28Update cargoWeihang Lo-15/+6
10 commits in 9d5b32f503fc099c4064298465add14d4bce11e6..9880b408a3af50c08fab3dbf4aa2a972df71e951 2023-02-22 23:04:16 +0000 to 2023-02-28 19:39:39 +0000 - bump jobserver to respect `--jobserver-auth=fifo:PATH` (rust-lang/cargo#11767) - Addition of support for -F as an alias for --features (rust-lang/cargo#11774) - Added documentation for the configuration discovery of `cargo install` to the man pages (rust-lang/cargo#11763) - Fix Cargo removing the sparse+ prefix from sparse URLs in .crates.toml (rust-lang/cargo#11756) - Fix warning with tempfile (rust-lang/cargo#11771) - Error message for transitive artifact dependencies with targets the package doesn't directly interact with (rust-lang/cargo#11643) - Fix tests with nondeterministic ordering (rust-lang/cargo#11766) - Make some blocking tests non-blocking (rust-lang/cargo#11650) - Suggest cargo add when installing library crate (rust-lang/cargo#11410) - chore: bump is-terminal to 0.4.4 (rust-lang/cargo#11759)
2023-02-28Update Fuchsia platform team membersDavid Koloski-1/+0
2023-02-28compiler/rustc_session: fix sysroot detection logic ...liushuyu-1/+11
... on systems where /usr/lib contains a multi-arch structure
2023-02-28Add contains_key to SortedIndexMultiMapJesse Bakker-0/+9
2023-02-28micro fmt changesMaybe Waffle-13/+12
2023-02-28Fix `x clean` with specific pathsclubby789-0/+1
2023-02-28Make mailmap more correctAlbert Larsan-1/+1
2023-02-28Auto merge of #107987 - EFanZh:inline-poll-methods, r=Mark-Simulacrumbors-0/+5
Inline `Poll` methods With `opt-level="z"`, the `Poll::map*` methods are sometimes not inlined (see <https://godbolt.org/z/ca5ajKTEK>). This PR adds `#[inline]` to these methods. I have a project that can benefit from this change, but do we want to enable this behavior universally? Fixes #101080.
2023-02-28Some `infer/mod.rs` cleanupsNilstrieb-39/+11
2023-02-28add missing feature in core/testsRalf Jung-0/+1
2023-02-28refactor parse_token_trees to not return unmatched_delimsyukang-30/+29
2023-02-28no need to return unmatched_delims from tokentreesyukang-11/+6
2023-02-28rename unmatched_braces to unmatched_delimsyukang-26/+27
2023-02-28remove duplicated diagnostic for unclosed delimiteryukang-313/+82
2023-02-28Exit when there are unmatched delims to avoid noisy diagnosticsyukang-1277/+252
2023-02-28Auto merge of #108098 - notriddle:notriddle/rustdoc-tooltip-alloc, ↵bors-29/+40
r=GuillaumeGomez rustdoc: reduce allocations when generating tooltips An attempt to reduce the perf regression in https://github.com/rust-lang/rust/pull/108052#issuecomment-1430631861
2023-02-28Fix a race in the query systemJohn Kåre Alsaker-4/+5
2023-02-28Only look for param in generics if it actually comes from genericsMichael Goulet-49/+119
2023-02-28Auto merge of #106774 - Nugine:master, r=Amanieubors-4/+4
Stabilize cmpxchg16b_target_feature Tracking issue for target features + #44839 stdarch issue + https://github.com/rust-lang/stdarch/issues/827 stdarch PR + https://github.com/rust-lang/stdarch/pull/1358 reference PR + https://github.com/rust-lang/reference/pull/1331 It's my first time contributing to rust-lang/rust. Please tell me if I missed something.
2023-02-28Descriptive error when users try to combine RPITIT/AFIT with specializationMichael Goulet-65/+83
2023-02-27Remove or justify use of #[rustc_box]Ben Kimock-9/+7
2023-02-28Remove the `capture_disjoint_fields` featureclubby789-29/+17
2023-02-28Auto merge of #99767 - LeSeulArtichaut:stable-target-feature-11, r=estebankbors-151/+78
Stabilize `#![feature(target_feature_11)]` ## Stabilization report ### Summary Allows for safe functions to be marked with `#[target_feature]` attributes. Functions marked with `#[target_feature]` are generally considered as unsafe functions: they are unsafe to call, cannot be assigned to safe function pointers, and don't implement the `Fn*` traits. However, calling them from other `#[target_feature]` functions with a superset of features is safe. ```rust // Demonstration function #[target_feature(enable = "avx2")] fn avx2() {} fn foo() { // Calling `avx2` here is unsafe, as we must ensure // that AVX is available first. unsafe { avx2(); } } #[target_feature(enable = "avx2")] fn bar() { // Calling `avx2` here is safe. avx2(); } ``` ### Test cases Tests for this feature can be found in [`src/test/ui/rfcs/rfc-2396-target_feature-11/`](https://github.com/rust-lang/rust/tree/b67ba9ba208ac918228a18321fc3a11a99b1c62b/src/test/ui/rfcs/rfc-2396-target_feature-11/). ### Edge cases - https://github.com/rust-lang/rust/issues/73631 Closures defined inside functions marked with `#[target_feature]` inherit the target features of their parent function. They can still be assigned to safe function pointers and implement the appropriate `Fn*` traits. ```rust #[target_feature(enable = "avx2")] fn qux() { let my_closure = || avx2(); // this call to `avx2` is safe let f: fn() = my_closure; } ``` This means that in order to call a function with `#[target_feature]`, you must show that the target-feature is available while the function executes *and* for as long as whatever may escape from that function lives. ### Documentation - Reference: https://github.com/rust-lang/reference/pull/1181 --- cc tracking issue #69098 r? `@ghost`
2023-02-27Auto merge of #108487 - cjgillot:no-typeck-mir, r=oli-obkbors-207/+223
Avoid invoking typeck from borrowck This PR attempts to reduce direct dependencies between typeck and MIR-related queries. The goal is to have all the information transit either through THIR or through dedicated queries that avoid depending on the whole `TypeckResults`. In a first commit, we store the type information that MIR building requires into THIR. This avoids edges between mir_built and typeck. In the second and third commit, we wrap informations around closures (upvars, kind origin and user-provided signature) to avoid borrowck depending on typeck information. There should be a single remaining borrowck -> typeck edge in the good path, due to inline consts.
2023-02-27Auto merge of #108538 - matthiaskrgr:rollup-vw6h5ea, r=matthiaskrgrbors-4024/+4449
Rollup of 8 pull requests Successful merges: - #104265 (Move IpAddr, SocketAddr and V4+V6 related types to `core`) - #107110 ([stdio][windows] Use MBTWC and WCTMB) - #108308 (Allow building serde and serde_derive in parallel) - #108363 (Move the unused extern crate check back to the resolver.) - #108519 (Bages for easy access links to Rust community) - #108522 (Commit some new solver tests) - #108523 (Avoid `&str` to `String` conversions) - #108533 (diagnostics: avoid querying `associated_item` in the resolver) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-02-27Rollup merge of #108533 - notriddle:notriddle/resolver-def-descr, ↵Matthias Krüger-2/+23
r=compiler-errors diagnostics: avoid querying `associated_item` in the resolver Fixes #108529 CC #108324
2023-02-27Rollup merge of #108523 - TaKO8Ki:avoid-str-to-string-conversions, r=NilstriebMatthias Krüger-3/+3
Avoid `&str` to `String` conversions This patch removes some unnecessary `&str` to `String` conversions.