about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-11-10Closure-consuming helper functions for `fmt::Debug` helpersJohn Millikin-13/+136
2023-11-08Auto merge of #117716 - GuillaumeGomez:rollup-83gnhll, r=GuillaumeGomezbors-712/+706
Rollup of 5 pull requests Successful merges: - #117263 (handle the case when the change-id isn't found) - #117282 (Recover from incorrectly ordered/duplicated function keywords) - #117679 (tests/rustdoc-json: Avoid needless use of `no_core` and `lang_items`) - #117702 (target: move base and target specifications) - #117713 (Add test for reexported hidden item with `--document-hidden-items`) r? `@ghost` `@rustbot` modify labels: rollup
2023-11-08Rollup merge of #117713 - GuillaumeGomez:document-hidden-json, r=notriddleGuillaume Gomez-0/+10
Add test for reexported hidden item with `--document-hidden-items` Coming from [this discussion on zulip](https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/Using.20cargo-semver-checks.20in.20rustdoc.20JSON.20tests.3A.20revisited). cc ``@aDotInTheVoid`` r? ``@notriddle``
2023-11-08Rollup merge of #117702 - davidtwco:target-tier-refactors, r=petrochenkovGuillaume Gomez-475/+479
target: move base and target specifications Follow-up to #116004. In anticipation of later PRs where we'll want to add tidy checks to ensure that, for each target, we have a test or a platform support document or something like that, this PR moves target specifications into a directory on their own so that we can just list the files in this directory to get a list of all targets. - Base specifications are moved to `rustc_target::spec::base`. - Target specifications are moved to `rustc_target::spec::targets`. - All the other source files containing types used in the target specs remain in `rustc_target::spec`. - `rustc_target/src/spec/abi.rs` is moved to `rustc_target/src/spec/abi/mod.rs` (where there was already a `tests.rs`) for uniformity. r? ``@petrochenkov``
2023-11-08Rollup merge of #117679 - aDotInTheVoid:yes-core, r=GuillaumeGomezGuillaume Gomez-202/+41
tests/rustdoc-json: Avoid needless use of `no_core` and `lang_items` See #117487 for motivation. I've split it into three commits, depending on how much work it was to remove `#![no_core]`. The first is entirely mechanical, the second makes no logical changes but couldn't be done with find+replace, and the third required rewriting assertions no not depend on having `#![no_core]`. All of the interesting changes for review are in the third commit, so I recommend reviewing commit-by-commit. After this, 3 tests still use `#![no_core]`: - `./tests/rustdoc-json/primitives/primitive_impls.rs`. Uses impls on primitives, so needs to simulate core - `./tests/rustdoc-json/primitives/local_primitive.rs`: Uses `rustc_doc_primitive`, so needs to simulate core - `./tests/rustdoc-json/impls/auto.rs`: Uses auto traits, so needs to simulate core But after this change, we only rely on the core-rustc boundary in tests that deliberately test those interactions. r? ``@GuillaumeGomez`` Fixes #117487
2023-11-08Rollup merge of #117282 - clubby789:recover-wrong-function-header, r=TaKO8KiGuillaume Gomez-11/+136
Recover from incorrectly ordered/duplicated function keywords Fixes #115714
2023-11-08Rollup merge of #117263 - onur-ozkan:change-id-fix, r=saethlinGuillaume Gomez-24/+40
handle the case when the change-id isn't found When we switch back and forth between the old and recent branches, if there was a breaking change in the bootstrap configuration in between, we have to update the change-id in the build configuration with each checkout, which can be exhausting. This change fixes that. r? saethlin
2023-11-08Auto merge of #117560 - lqd:issue-117146, r=matthewjasperbors-13/+114
Compute polonius loan scopes over the region graph In issue #117146 a loan flows into an SCC containing a placeholder, and whose representative is an existential region. Since we currently compute loan scopes by looking at SCCs and their representatives only, polonius would compute kill points for this loan here whereas NLLs would not of course. There are a few ways to fix this: - don't try to be efficient by doing the computation over SCCs, and simply look for free regions and placeholders in the successors of the issuing region. - change how the SCC representatives are picked, biasing towards placeholders over existential regions. They *shouldn't* matter much, but some downstream code may subtly depend on the current scheme (though no tests fail if we do such a change). This is for unrelated reasons also the way #116891 changes the representative computation. So that PR would also fix issue #117146. - try to remove placeholders from the main path, and contain them to a pre-pass + a post-pass kind of polonius leak check. If possible, it would fix this issue by turning an outlives constraints to a placeholder into a constraint to 'static. This should also fix the issue, as the representative would be the free region in the SCC. We want to prototype this change to see if it's possible to try to simplify the borrowck main path from having to deal with placeholders and higher-ranked subtyping 🤞. I'd like to take advantage of fuzzing and a crater run sooner rather than later, so that we grow more confidence that the 2 models are indeed equivalent empirically. Therefore this PR implements option 1 to fix the issue now. We can take care of efficiency later after validation, and once we implement option 3 (which could also impact option 2 and that associated PR, maybe the lack of placeholders could remove the need to change the representative computation) to traverse SCCs and their representative again. (Or we maybe will have some kind of naive position-dependent outlives propagation by then and this code would have been changed) Fixes #117146. r? `@matthewjasper`
2023-11-08Add test for reexported hidden item with `--document-hidden-items`Guillaume Gomez-0/+10
2023-11-08Auto merge of #115460 - zachs18:borrowedcursor_write_no_panic, r=dtolnaybors-2/+3
Don't panic in `<BorrowedCursor as io::Write>::write` Instead of panicking if the BorrowedCursor does not have enough capacity for the whole buffer, just return a short write, [like `<&mut [u8] as io::Write>::write` does](https://doc.rust-lang.org/src/std/io/impls.rs.html#349). (cc `@ChayimFriedman2` https://github.com/rust-lang/rust/issues/78485#issuecomment-1493129588) (I'm not sure if this needs an ACP? since it's not changing the "API", just what the function does)
2023-11-08Auto merge of #117706 - matthiaskrgr:rollup-lscx7dg, r=matthiaskrgrbors-151/+350
Rollup of 7 pull requests Successful merges: - #114316 (Add AIX platform support document) - #117531 (rustdoc: properly elide cross-crate host effect args) - #117650 (Add -Zcross-crate-inline-threshold=yes) - #117663 (bump some deps) - #117667 (Document clippy_config in nightly-rustc docs) - #117698 (Clarify `space_between`) - #117700 (coverage: Rename the `run-coverage` test mode to `coverage-run`) r? `@ghost` `@rustbot` modify labels: rollup
2023-11-08bootstrap: add more detail on change-id commentsonur-ozkan-4/+7
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-08bootstrap: improve `fn check_version`onur-ozkan-21/+21
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-08handle the case when the change-id isn't foundonur-ozkan-12/+25
When we switch back and forth between the old and recent branches, if there was a breaking change in the bootstrap configuration in between, we have to update the change-id in the build configuration with each checkout, which can be exhausting. This change fixes that. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-08Rollup merge of #117700 - Zalathar:rename-run-coverage, r=onur-ozkanMatthias Krüger-27/+27
coverage: Rename the `run-coverage` test mode to `coverage-run` Follow-up to https://github.com/rust-lang/rust/pull/117484#issuecomment-1788916563. Renaming this test mode to `coverage-run` makes it more consistent with the `coverage-map` mode and the shared `tests/coverage` test directory. --- ``@rustbot`` label +A-code-coverage
2023-11-08Rollup merge of #117698 - nnethercote:space_between-2, r=petrochenkovMatthias Krüger-30/+73
Clarify `space_between` r? ``@petrochenkov``
2023-11-08Rollup merge of #117667 - Alexendoo:doc-clippy-config, r=albertlarsan68Matthias Krüger-1/+1
Document clippy_config in nightly-rustc docs A new clippy crate added in https://github.com/rust-lang/rust-clippy/pull/11685
2023-11-08Rollup merge of #117663 - klensy:bump-deps, r=davidtwcoMatthias Krüger-58/+10
bump some deps * drop `num_cpus` from rust-installer as not used * update `rayon`, `rayon-core`, which drops it's deps on `num_cpus` and `crossbeam-channel` (for bootstrap too) (https://github.com/rayon-rs/rayon/blob/v1.8.0/RELEASES.md) * update `errno`, which drops `errno-dragonfly` (https://github.com/lambda-fairy/rust-errno/blob/5341791935df601306ffc57a665763c4ecd72755/CHANGELOG.md)
2023-11-08Rollup merge of #117650 - saethlin:inline-me-please, r=davidtwcoMatthias Krüger-13/+161
Add -Zcross-crate-inline-threshold=yes ``@thomcc`` says this would be useful for > seeing if it makes a difference in some code if i do it when building the sysroot, since -Zbuild-std + lto helps more than it seems like it should And I've changed the possible values as a reference to ``@Manishearth`` saying > LLVM's inlining heuristic is "yes".
2023-11-08Rollup merge of #117531 - ↵Matthias Krüger-21/+50
fmease:rustdoc-effects-properly-elide-x-crate-host-args, r=GuillaumeGomez rustdoc: properly elide cross-crate host effect args Fixes FIXMEs introduced in #116670.
2023-11-08Rollup merge of #114316 - ecnelises:aix_doc, r=workingjubileeMatthias Krüger-1/+28
Add AIX platform support document
2023-11-08Auto merge of #117542 - compiler-errors:only-normalize-predicate, r=lcnrbors-9/+73
Only use `normalize_param_env` when normalizing predicate in `check_item_bounds` Only use the `normalize_param_env` when normalizing the item bound predicate in `check_item_bounds`, instead of using it when processing this obligation as well. This causes <BUG> to reoccur, but hopefully with better caching in the future, we can fix this would having such bad effects on perf. This PR also fixes #117598. It turns out that the GAT predicate that we install is actually wrong -- given code like: ``` impl<'r> HasValueRef<'r> for Any { type Database = Any; } ``` We currently generate a predicate that looks like `<Any as HasValueRef<'r>>::Database = Any`, where `'r` is an early-bound variable. Really this GAT assumption should be universally quantified over the impl's args, i.e. `for<'r> <Any as HasValueRef<'r>>::Database = Any`, but then we'd need the binder to also include all the WC of the impl as well, which we don't support yet, lol.
2023-11-08Auto merge of #116881 - LuuuXXX:issue-110087, r=onur-ozkanbors-32/+120
Add a new `download-ci-llvm = if-unchanged` option and enable it by default for `profile = codegen` Three tasks have been implemented here. Add a new `download-ci-llvm = if-unchange` option and enable if by default for `profile = codegen`. Include all build artifacts by traversing the llvm-project build output, Keep the downloadable llvm the same state as if you have just run a full source build. After selecting the codegen profile during ./x.py setup, the submodule will be automatically downloaded. Resolves #110087
2023-11-08Add AIX platform-support docQiu Chaofan-1/+28
2023-11-08rustc_target: move file for uniformityDavid Wood-0/+0
Signed-off-by: David Wood <david@davidtw.co>
2023-11-08targets: move target specs to spec/targetsDavid Wood-26/+26
Signed-off-by: David Wood <david@davidtw.co>
2023-11-08target: move base specs to spec/baseDavid Wood-449/+453
Signed-off-by: David Wood <david@davidtw.co>
2023-11-08coverage: Rename the `run-coverage` test mode to `coverage-run`Zalathar-27/+27
This makes it more consistent with the `coverage-map` mode and the shared `tests/coverage` test directory.
2023-11-08Auto merge of #117699 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 7 commits in 65e297d1ec0dee1a74800efe600b8dc163bcf5db..7046d992f9f32ba209a8079f662ebccf9da8de25 2023-11-03 20:56:31 +0000 to 2023-11-08 03:24:57 +0000 - fix: Report more detailed semver errors (rust-lang/cargo#12924) - Fix some broken links in the man pages (rust-lang/cargo#12929) - Add better error message when it can not find the search section (rust-lang/cargo#12865) - Bug 12920 (rust-lang/cargo#12923) - Update link in environment-variables.md (rust-lang/cargo#12922) - refactor(toml): Pull out the schema (rust-lang/cargo#12911) - tests: Remove plugin tests (rust-lang/cargo#12921) r? ghost
2023-11-07Update cargoWeihang Lo-0/+0
2023-11-08More tests for token stream pretty-printing with adjacent punctuation.Nicholas Nethercote-0/+29
We currently do the wrong thing on a lot of these. The next commit will fix things.
2023-11-08Clarify `space_between`.Nicholas Nethercote-30/+44
To avoid `!matches!(...)`, which is hard to think about. Instead every case now uses direct pattern matching and returns true or false. Also add a couple of cases to the `stringify.rs` test that currently print badly.
2023-11-08Auto merge of #117484 - Zalathar:tests, r=cjgillotbors-2385/+435
coverage: Unify `tests/coverage-map` and `tests/run-coverage` into `tests/coverage` Ever since the introduction of the `coverage-map` suite, it's been awkward to have to manage two separate coverage test directories containing dozens of mostly-identical files. However, those two suites were separate for good reasons. They have very different requirements (since only one of them requires actually running the test program), running only one suite is noticeably faster than running both, and having separate suites allows them to be blessed separately if desired. So while unifying them was an obvious idea, actually doing so was non-trivial. --- Nevertheless, this PR finds a way to merge the two suites into one directory while retaining almost all of the developer-experience benefits of having two suites. This required non-trivial implementations of `Step`, but the end result works very smoothly. --- The first 5 commits are a copy of #117340, which has been closed in favour of this PR.
2023-11-08Only use normalize_param_env when normalizing predicate in check_item_boundsMichael Goulet-9/+73
2023-11-08Fix issue #110087LuuuX-32/+120
Three tasks have been implemented here. Add a new `download-ci-llvm = if-unchange` option and enable if by default for `profile = codegen`. Include all build artifacts by traversing the llvm-project build output, Keep the downloadable llvm the same state as if you have just run a full source build. After selecting the codegen profile during ./x.py setup, the submodule will be automatically downloaded.
2023-11-08Auto merge of #117692 - matthiaskrgr:rollup-umaf5pr, r=matthiaskrgrbors-252/+334
Rollup of 4 pull requests Successful merges: - #113925 (Improve diagnostic for const ctors in array repeat expressions) - #116399 (Small changes w/ `query::Erase<_>`) - #117625 (Fix some clippy perf lints) - #117655 (Method suggestion code tweaks) r? `@ghost` `@rustbot` modify labels: rollup
2023-11-08Rollup merge of #117655 - compiler-errors:method-tweaks, r=estebankMatthias Krüger-198/+178
Method suggestion code tweaks I was rummaging around the method suggestion code after https://github.com/rust-lang/rust/pull/117006#discussion_r1384153722 and saw a few things to simplify. This is two unrelated commits, both in the same file. Review them separately, if you'd like. r? estebank
2023-11-08Rollup merge of #117625 - nnethercote:clippy-perf, r=cuviperMatthias Krüger-20/+14
Fix some clippy perf lints `@matthiaskrgr` gave me the output of a clippy run with perf lints enabled. This PR fixes ones that I thought were worth fixing. r? `@cuviper`
2023-11-08Rollup merge of #116399 - WaffleLapkin:erase_small_things, r=cjgillotMatthias Krüger-6/+16
Small changes w/ `query::Erase<_>` r? `@cjgillot` cc `@Zoxc`
2023-11-08Rollup merge of #113925 - clubby789:const-ctor-repeat, r=estebankMatthias Krüger-28/+126
Improve diagnostic for const ctors in array repeat expressions Fixes #113912
2023-11-07Add -Zcross-crate-inline-threshold=yesBen Kimock-13/+161
2023-11-08rustdoc: minor changes suggested by clippy perf lints.Nicholas Nethercote-12/+10
2023-11-07Auto merge of #117672 - lqd:ci-gcc-lld, r=Kobzolbors-1/+7
ci: bump gcc on dist x64 linux builder to 9.5 Support for `-fuse-ld=lld` was added in GCC 9, so this PR bumps gcc to the latest 9.x release, to prepare for switching to LLD. `-Clinker-flavor=gnu-lld-cc -Clink-self-contained=+linker` will require our CI's GCC to understand `-fuse-ld=lld` when bootstrapping in a future where `x86_64-unknown-linux-gnu` is using `rust-lld` by default.
2023-11-08rustc: minor changes suggested by clippy perf lints.Nicholas Nethercote-8/+4
2023-11-07Add an explanation for `transmute_unchecked`Maybe Waffle-0/+9
2023-11-07Auto merge of #117680 - matthiaskrgr:rollup-kgaa4ma, r=matthiaskrgrbors-39/+127
Rollup of 4 pull requests Successful merges: - #115485 (Format macro const literals with pretty printer) - #117616 (warn when using an unstable feature with -Ctarget-feature) - #117639 (Update books) - #117675 (llvm-wrapper: Remove include of non-existant Vectorize.h) r? `@ghost` `@rustbot` modify labels: rollup
2023-11-07Rollup merge of #117675 - zmodem:vectorize_h, r=durin42Matthias Krüger-1/+0
llvm-wrapper: Remove include of non-existant Vectorize.h LLVM recently removed the header: https://github.com/llvm/llvm-project/commit/2400c54c37d5afdfec016b9a71f161ac10a49b31 It only contained a declaration of `createLoadStoreVectorizerPass()`, which Rust doesn't reference.
2023-11-07Rollup merge of #117639 - rustbot:docs-update, r=ehussMatthias Krüger-0/+0
Update books ## rust-lang/reference 4 commits in 16fd3c06d9e558dae2d52000818274ae70c9e90a..cd8193e972f61b92117095fc73b67af767b4d6bc 2023-11-04 17:19:39 UTC to 2023-10-30 16:04:52 UTC - Guarantee that raw pointer conversions preserve slice element count (rust-lang/reference#1417) - some asm block flags also mean there can be no fences (rust-lang/reference#1413) - Guarantee `char` layout (rust-lang/reference#1401) - Doc: Add the RISC-V stabilized target features (rust-lang/reference#1415) ## rust-lang/rust-by-example 3 commits in 6709beeb7d0fbc5ffc91ac4893a24434123b9bfa..311b84962016b28c75525c86e7b3f49fd9101a39 2023-10-31 18:32:09 UTC to 2023-10-31 18:30:39 UTC - Fixed explanation mistake in comment (rust-lang/rust-by-example#1761) - Fix typos (rust-lang/rust-by-example#1759) - docs(9.2): fix typo (rust-lang/rust-by-example#1754) ## rust-lang/rustc-dev-guide 6 commits in b0ee9ec8fa59a6c7620165e061f4747202377a62..77dbe5782b2488af3bb489ad702eaff438f465bf 2023-11-06 16:14:34 UTC to 2023-10-29 17:16:02 UTC - add a new type system invariant (rust-lang/rustc-dev-guide#1822) - Update some outdated descriptions of coverage instrumentation (rust-lang/rustc-dev-guide#1809) - Add some documentation for unsizing (rust-lang/rustc-dev-guide#1817) - Bibliography: fixing author of "You Can't Spell Trust Without Rust" (rust-lang/rustc-dev-guide#1815) - remove change-id from sample build configuration (rust-lang/rustc-dev-guide#1813) - Update name of "active" features to "unstable" (rust-lang/rustc-dev-guide#1814)
2023-11-07Rollup merge of #117616 - RalfJung:unstable-target-features, r=compiler-errorsMatthias Krüger-23/+70
warn when using an unstable feature with -Ctarget-feature Setting or unsetting the wrong target features can cause ABI incompatibility (https://github.com/rust-lang/rust/issues/116344, https://github.com/rust-lang/rust/issues/116558). We need to carefully audit features for their ABI impact before stabilization. I just learned that we currently accept arbitrary unstable features on stable and if they are in the list of Rust target features, even unstable, then we don't even warn about that!1 That doesn't seem great, so I propose we introduce a warning here. This has an obvious loophole via `-Ctarget-cpu`. I'm not sure how to best deal with that, but it seems better to fix what we can and think about the other cases later, maybe once we have a better idea for how to resolve the general mess that are ABI-affecting target features.
2023-11-07Rollup merge of #115485 - DaniPopes:rustdoc-macro-consts, r=jackh726,fmeaseMatthias Krüger-15/+57
Format macro const literals with pretty printer Fixes #115295