about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-10-26Suggest assoc fn `new` when trying to build tuple struct with private fieldsEsteban Küber-1/+70
Fix #22488.
2023-10-17Auto merge of #115577 - RalfJung:atomic-load, r=Amanieubors-0/+34
document when atomic loads are guaranteed read-only Based on this [discussion in Zulip](https://rust-lang.zulipchat.com/#narrow/stream/136281-t-opsem/topic/Can.20.60Atomic*.3A.3Aload.60.20perform.20a.20write). The values for x86 and x86_64 are complete guesswork on my side, and I have no clue what the values might be for other architectures. I hope we can get the right people to chime in to gather the required information. :) I'll update Miri to respect these rules once we have more data.
2023-10-17Auto merge of #116756 - fee1-dead-contrib:dupe-those-bounds, r=oli-obkbors-40/+661
Duplicate `~const` bounds with a non-const one in effects desugaring This should unblock #116058. r? `@oli-obk`
2023-10-17Auto merge of #116518 - vita-rust:vita, r=workingjubileebors-109/+40
Updated libc and doc for Vita target Doc changes: - Updated Vita target readme. The recommended approach to build artifacts for the platform now is [cargo-vita](https://crates.io/crates/cargo-vita) which wraps all the convoluted steps previously described in a yaml for `cargo-make` - Updated maintainer list for Vita target. (`@ZetaNumbers` `@pheki` please agree to be added to the list, `@amg98` please let us know if you're still planning on actively maintaining target support) Code changes: - ~Updated libc for rust-lang/libc#3284 and rust-lang/libc#3366~ (Already merged in #116527) - In dupfd changed the flag same as for esp target, there is no CLOEXEC on Vita - Enabled `new_pair` since we've implemented `socketpair` in Vita newlib
2023-10-17Auto merge of #116196 - onur-ozkan:reorganize-bootstrap-sources, ↵bors-508/+530
r=Mark-Simulacrum reorganize/refactor bootstrap codebase Currently, bootstrap stores everything on the root path, including very large modules, which makes things very hard to scale and adds too much complexity. This PR has the following objectives: - Improving scalability. - Making bootstrap source more understandable for the new contributors(or for everyone). - Improving the development experience and making maintenance easier for the bootstrap team. The new source structure: ``` . ├── defaults │   ├── README.md │   ├── config.codegen.toml │   ├── config.compiler.toml │   ├── config.dist.toml │   ├── config.library.toml │   └── config.tools.toml ├── mk │   └── Makefile.in ├── src │   ├── bin │   │   ├── main.rs │   │   ├── rustc.rs │   │   ├── rustdoc.rs │   │   └── sccache-plus-cl.rs │   ├── core │   │   ├── build_steps │   │   │   ├── check.rs │   │   │   ├── clean.rs │   │   │   ├── compile.rs │   │   │   ├── dist.rs │   │   │   ├── doc.rs │   │   │   ├── format.rs │   │   │   ├── install.rs │   │   │   ├── llvm.rs │   │   │   ├── mod.rs │   │   │   ├── run.rs │   │   │   ├── setup.rs │   │   │   ├── suggest.rs │   │   │   ├── synthetic_targets.rs │   │   │   ├── test.rs │   │   │   ├── tool.rs │   │   │   └── toolstate.rs │   │   ├── config │   │   │   ├── config.rs │   │   │   ├── flags.rs │   │   │   └── mod.rs │   │   ├── builder.rs │   │   ├── download.rs │   │   ├── metadata.rs │   │   ├── mod.rs │   │   └── sanity.rs │   ├── tests │   │   ├── builder.rs │   │   ├── config.rs │   │   └── setup.rs │   ├── utils │   │   ├── bin_helpers.rs │   │   ├── cache.rs │   │   ├── cc_detect.rs │   │   ├── channel.rs │   │   ├── dylib.rs │   │   ├── helpers.rs │   │   ├── job.rs │   │   ├── metrics.rs │   │   ├── mod.rs │   │   ├── render_tests.rs │   │   └── tarball.rs │   └── lib.rs ├── Cargo.lock ├── Cargo.toml ├── README.md ├── bootstrap.py ├── bootstrap_test.py ├── build.rs ├── configure.py └── download-ci-llvm-stamp ``` The next step involves: - Adding more doc-comments to the bootstrap internals (although we already have a decent amount, there is space for improvement). - Breaking large modules into smaller, more manageable modules. - Significantly increasing our unit test coverage (which is currently lacking). This PR should serve as an initial step to make the tasks above much more easier. r? Mark-Simulacrum
2023-10-17Updated libc and doc for Vita targetNikolay Arhipov-109/+40
2023-10-17bootstrap: fix warningsonur-ozkan-2/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-17rename bootstrap module utils/dylib_util->utils/dylibonur-ozkan-4/+4
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-17move bootstrap utils into bootstrap/src/utils moduleonur-ozkan-861/+297
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-17move bootstrap core implementation to bootstrap/src/core moduleonur-ozkan-189/+792
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-17improve bootstrap tests structureonur-ozkan-10/+10
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-17reorganize bootstrap bins and helper module utilizationsonur-ozkan-35/+19
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-17Auto merge of #116824 - notriddle:master, r=fmeasebors-0/+53
rustdoc: rename `issue-\d+.rs` tests to have meaningful names (part 3) Follow up * https://github.com/rust-lang/rust/pull/116214 * https://github.com/rust-lang/rust/pull/116432
2023-10-17remove 128bit atomics, they are anyway not exposed on those targetsRalf Jung-2/+1
2023-10-17Auto merge of #116822 - notriddle:notriddle/rust-logo, r=fmeasebors-1/+51
docs: add Rust logo to more compiler crates c6e6ecb1afea9695a42d0f148ce153536b279eb5 added it to some of the compiler's crates, but avoided adding it to all of them to reduce bit-rot. This commit adds to more. r? `@GuillaumeGomez`
2023-10-17Auto merge of #116477 - nnethercote:tidy-alpha-deps, r=wesleywiserbors-28/+30
Use tidy to enforce alphabetical dependency ordering I get annoyed when dependencies in `Cargo.toml` files are not in alphabetical order. The [style guide](https://github.com/rust-lang/rust/blob/master/src/doc/style-guide/src/cargo.md) agrees with me. There are ongoing efforts to provide linting/formatting of `Cargo.toml` files, e.g. https://github.com/rust-lang/rustfmt/pull/5240, https://crates.io/crates/cargo-toml-lint, and https://github.com/TimonPost/cargo-toml-format. But it's far from clear what's the right approach. So this PR does something very simple: it uses the order checking already present in tidy. This allows incremental application of ordering, starting right now, and avoiding the need for any kind of all-at-once conversion. If we do end up using some more comprehensive `Cargo.toml` linting/formatting solution in the future, the `tidy-alphabetical` lines will be easy to remove. r? `@wesleywiser`
2023-10-16rustdoc: add `check-pass` to ICE test with no expected outputMichael Howell-0/+2
2023-10-16rustdoc: move ICE test to rustdoc-uiMichael Howell-0/+0
2023-10-16Add URL to test casesMichael Howell-0/+20
2023-10-16Rename `issue-\d+.rs` tests to have meaningful namesMichael Howell-0/+0
2023-10-17Auto merge of #116826 - nnethercote:fix-116780-116797, r=compiler-errorsbors-4/+4
Fix a performance regression in obligation deduplication. Commit 8378487 from #114611 changed the location of an obligation deduplication step in `opt_normalize_projection_type`. This meant that deduplication stopped happening on one path where it was still necessary, causing a couple of drastic performance regressions. This commit moves the deduplication back to the old location. The good news is that #114611 had four commits and 8378487 was of minimal importance, so the perf benefits from that PR remain. Fixes #116780, #116797. r? `@compiler-errors`
2023-10-17Fix a performance regression in obligation deduplication.Nicholas Nethercote-4/+4
Commit 8378487 from #114611 changed the location of an obligation deduplication step in `opt_normalize_projection_type`. This meant that deduplication stopped happening on one path where it was still necessary, causing a couple of drastic performance regressions. This commit moves the deduplication back to the old location. The good news is that #114611 had four commits and 8378487 was of minimal importance, so the perf benefits from that PR remain. Fixes #116780, #116797.
2023-10-16Auto merge of #116820 - GuillaumeGomez:rollup-l54ri5q, r=GuillaumeGomezbors-230/+275
Rollup of 6 pull requests Successful merges: - #116754 (coverage: Several small cleanups in `spans`) - #116798 (Improve display of parallel jobs in rustdoc-gui tester script) - #116800 (Fix implied outlives check for GAT in RPITIT) - #116805 (Make `rustc_onunimplemented` export path agnostic) - #116808 (Add myself to smir triage) - #116811 (Preserve unicode escapes in format string literals when pretty-printing AST) r? `@ghost` `@rustbot` modify labels: rollup
2023-10-16Add `crate_name` to test so that it can be renamedMichael Howell-0/+31
2023-10-16docs: add Rust logo to more compiler cratesMichael Howell-1/+51
c6e6ecb1afea9695a42d0f148ce153536b279eb5 added it to some of the compiler's crates, but avoided adding it to all of them to reduce bit-rot. This commit adds to more.
2023-10-16Rollup merge of #116811 - ↵Guillaume Gomez-2/+33
narpfel:unpretty-unicode-escape-in-format-string-literal, r=Nilstrieb Preserve unicode escapes in format string literals when pretty-printing AST Fixes #116799 Thanks to `@Nilstrieb` for the pointer to the correct location, that was really helpful for someone unfamiliar with the codebase.
2023-10-16Rollup merge of #116808 - ouz-a:add_myself_to_triage, r=NilstriebGuillaume Gomez-1/+1
Add myself to smir triage I would like get pinged when someone makes changes to smir
2023-10-16Rollup merge of #116805 - ↵Guillaume Gomez-64/+37
Nilstrieb:onunimplemented-std-core-alloc-whatever-who-cares, r=compiler-errors Make `rustc_onunimplemented` export path agnostic This makes it so that all the matchers that match against paths use the definition path instead of the export path. This removes all duplication around `std`/`alloc`/`core`. This is not necessarily optimal because we now depend on internal implementation details like `core::ops::control_flow::ControlFlow`, which is not very nice and probably not acceptable for a stable `on_unimplemented`. An alternative would be to just string-replace normalize away `alloc`/`core` to `std` as a special case, keeping the export paths but making it so that we're still fully standard library flavor agnostic. Looking at the diff, I'm starting to think that some simple string replacement would go a long way towards fixing the problem of duplication while keeping export paths... What do you prefer? Also `@weiznich` for your thoughts about the stable version. r? compiler-errors
2023-10-16Rollup merge of #116800 - compiler-errors:rpitit-gat-outlives, r=jackh726Guillaume Gomez-33/+68
Fix implied outlives check for GAT in RPITIT We enforce certain `Self: 'lt` bounds for GATs to save space for more sophisticated implied bounds, but those currently operate on the HIR. Code was easily reworked to operate on def-ids so that we can properly let these suggestions propagate through synthetic associated types like RPITITs and AFITs. r? `@jackh726` or `@aliemjay` Fixes #116789
2023-10-16Rollup merge of #116798 - GuillaumeGomez:rustdoc-gui-tester-cleanup, r=notriddleGuillaume Gomez-2/+7
Improve display of parallel jobs in rustdoc-gui tester script If no `-j` option is not passed to `x.py`, it would display `-1`, which isn't great. r? `@notriddle`
2023-10-16Rollup merge of #116754 - Zalathar:spans, r=oli-obkGuillaume Gomez-128/+129
coverage: Several small cleanups in `spans` While investigating the details of coverage span processing, I noticed several opportunities to make the code simpler and clearer. --- `@rustbot` label +A-code-coverage
2023-10-16Auto merge of #114370 - krtab:pop_assume_cap, r=scottmcmbors-0/+25
Add invariant to Vec::pop that len < cap if pop successful Fixes: https://github.com/rust-lang/rust/issues/114334
2023-10-16Preserve unicode escapes in format string literals when pretty-printing ASTPaul Gey-2/+33
2023-10-16Auto merge of #116804 - matthiaskrgr:rollup-m2qm8ul, r=matthiaskrgrbors-120/+209
Rollup of 7 pull requests Successful merges: - #114157 (Enable triagebot no-merges check) - #116257 (Suggest trait bounds for used associated type on type param) - #116430 (vendoring in tarball sources) - #116709 (Update minifier version to 0.2.3) - #116786 (Update my mailmap entry) - #116790 (opt-dist: disable unused features for tabled crate) - #116802 (Remove `DefiningAnchor::Bubble` from opaque wf check) r? `@ghost` `@rustbot` modify labels: rollup
2023-10-16Improve display of parallel jobs in rustdoc-gui tester scriptGuillaume Gomez-2/+7
2023-10-16add myself to smir triageOğuz Ağcayazı-1/+1
2023-10-16Make `rustc_onunimplemented` export path agnosticNilstrieb-64/+37
This makes it so that all the matchers that match against paths use the definition path instead of the export path. This removes all duplication around `std`/`alloc`/`core`. This is not necessarily optimal because we now depend on internal implementation details like `core::ops::control_flow::ControlFlow`, which is not very nice and probably not acceptable for a stable `on_unimplemented`. An alternative would be to just string-replace normalize away `alloc`/`core` to `std` as a special case, keeping the export paths but making it so that we're still fully standard library flavor agnostic.
2023-10-16use target-arch based tableRalf Jung-5/+4
2023-10-16Rollup merge of #116802 - compiler-errors:anchor-opaque-wf, r=oli-obkMatthias Krüger-48/+37
Remove `DefiningAnchor::Bubble` from opaque wf check Set the defining anchor to `DefiningAnchor::Bind(parent_def_id)` where `parent_def_id` is the first parent def-id that isn't an opaque. This "fixes" some of the nested-return-type wf tests. If we *do* want these to be hard-errors for TAITs, we should probably make those error separately from this check (i.e. via some check like the code in the `OPAQUE_HIDDEN_INFERRED_BOUND` lint). The fact that some of these tests fail but not all of them seems kinda coincidental. r? oli-obk
2023-10-16Rollup merge of #116790 - klensy:opt-dist-tabled-no-derive, r=KobzolMatthias Krüger-39/+1
opt-dist: disable unused features for tabled crate Features looks unused, so left only used ones. r? `@Kobzol`
2023-10-16Rollup merge of #116786 - Urgau:mailmap-update, r=NilstriebMatthias Krüger-1/+3
Update my mailmap entry
2023-10-16Rollup merge of #116709 - GuillaumeGomez:update-minifier, r=notriddleMatthias Krüger-3/+3
Update minifier version to 0.2.3 Thanks for the fix `@notriddle` ! r? `@notriddle`
2023-10-16Rollup merge of #116430 - onur-ozkan:vendoring-in-tarball-sources, r=clubby789Matthias Krüger-6/+9
vendoring in tarball sources fixes #94782
2023-10-16Rollup merge of #116257 - estebank:issue-101351, r=b-naberMatthias Krüger-23/+152
Suggest trait bounds for used associated type on type param Fix #101351. When an associated type on a type parameter is used, and the type parameter isn't constrained by the correct trait, suggest the appropriate trait bound: ``` error[E0220]: associated type `Associated` not found for `T` --> file.rs:6:15 | 6 | field: T::Associated, | ^^^^^^^^^^ there is a similarly named associated type `Associated` in the trait `Foo` | help: consider restricting type parameter `T` | 5 | struct Generic<T: Foo> { | +++++ ``` When an associated type on a type parameter has a typo, suggest fixing it: ``` error[E0220]: associated type `Baa` not found for `T` --> $DIR/issue-55673.rs:9:8 | LL | T::Baa: std::fmt::Debug, | ^^^ there is a similarly named associated type `Bar` in the trait `Foo` | help: change the associated type name to use `Bar` from `Foo` | LL | T::Bar: std::fmt::Debug, | ~~~ ```
2023-10-16Rollup merge of #114157 - pitaj:triagebot_no-merges, r=ehussMatthias Krüger-0/+4
Enable triagebot no-merges check Follow-up on https://github.com/rust-lang/triagebot/pull/1704 ### Motivation Occasionally, a merge commit like https://github.com/rust-lang/rust/commit/cb5c011670ce8d073d0aae8c45e73c20593bfa11 makes it past manual review and gets merged into master. At one point, we tried adding a check to CI to prevent this from happening (https://github.com/rust-lang/rust/pull/105058), but that ended up [problematic](https://github.com/rust-lang/rust/pull/106319#issuecomment-1368144076) and was [reverted](https://github.com/rust-lang/rust/pull/106320). This kind of check is simply too fragile for CI, and there must be a way for a human to override the bot's decision. The capability to detect and warn about merge commits has been present in triagebot for quite some time, but was never enabled at rust-lang/rust, possibly due to concerns about false positives on rollup and subtree sync PRs. This PR intends to alleviate those concerns. ### Configuration This configuration will exclude rollup PRs and subtree sync PRs from merge commit detection, and it will post the default warning message and add the `has-merge-commits` and `S-waiting-on-author` labels when merge commits are detected on other PRs. The eventual vision is to have bors refuse to merge if the `has-merge-commits` label is present. A reviewer can still force the merge by removing that label if they so wish. ### Note for contributors The rollup tool should add that label automatically, but anyone performing subtree updates should begin including "subtree update" in the titles of those PRs, to avoid false positives. r? infra ## Open Questions 1. This configuration uses the default message that's built into triagebot: > There are merge commits (commits with multiple parents) in your changes. We have a [no merge policy](https://rustc-dev-guide.rust-lang.org/git.html#no-merge-policy) so these commits will need to be removed for this pull request to be merged. > > You can start a rebase with the following commands: > ```shell-session > $ # rebase > $ git rebase -i master > $ # delete any merge commits in the editor that appears > $ git push --force-with-lease > ``` Any changes to this are easy, I'll just have to add a `message` option. Should we mention the excluded titles in the message?
2023-10-16Add invariant to Vec::pop that len < cap if pop successfulArthur Carcano-0/+25
Fixes: https://github.com/rust-lang/rust/issues/114334
2023-10-16Auto merge of #116731 - Alexendoo:hash-untracked-state, r=oli-obkbors-7/+28
Add `Config::hash_untracked_state` callback For context, I'm looking to use [late module passes](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint/context/struct.LintStore.html#structfield.late_module_passes) in Clippy which unlike regular late passes run incrementally per module However we have a config file which can change between runs, we need changes to that to invalidate the `lint_mod` query. This PR adds a side channel for us to hash some extra state into `Options` in order to do that This does not make any changes to Clippy, I plan to do that in a PR to the Clippy repo along with some other required changes An alternative implementation would be to add a new query to track this state and override the `lint_mod` query in Clippy to first call that cc `@rust-lang/clippy`
2023-10-16Remove `DefiningAnchor::Bubble` from opaque wf checkMichael Goulet-48/+37
2023-10-16Fix outlives suggestion for GAT in RPITITMichael Goulet-33/+68
2023-10-16Auto merge of #116550 - nnethercote:rustc-features-more, r=Nilstriebbors-292/+254
Cleanup `rustc_features` some more The sequel to #116437. r? `@Nilstrieb`