about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-12-20Merge from rustcRalf Jung-610/+948
2024-12-20Add test to ensure passing `--doctest_compilation_args` multiple times workGuillaume Gomez-1/+24
2024-12-20Move test into the `tests.rs` fileGuillaume Gomez-23/+22
2024-12-20Add explanations on how arguments are splitGuillaume Gomez-0/+19
2024-12-20Split arguments from `--doctest-compilation-args` like a shell wouldGuillaume Gomez-8/+64
2024-12-20Update `run-make/rustdoc-default-output` testGuillaume Gomez-2/+4
2024-12-20Add explanations about `--doctest-compilation-args` in rustdoc bookGuillaume Gomez-18/+76
2024-12-20Add regression test for `--doctest-compilation-args`Guillaume Gomez-0/+18
2024-12-20Add `--doctest-compilation-args` option to allow passing arguments to ↵Guillaume Gomez-1/+25
doctest compilation
2024-12-20Preparing for merge from rustcRalf Jung-1/+1
2024-12-20Auto merge of #134550 - jhpratt:rollup-wsfmo59, r=jhprattbors-583/+712
Rollup of 6 pull requests Successful merges: - #126118 (docs: Mention `spare_capacity_mut()` in `Vec::set_len`) - #132830 (Rename `elem_offset` to `element_offset`) - #133103 (Pass FnAbi to find_mir_or_eval_fn) - #134321 (Hide `= _` as associated constant value inside impl blocks) - #134518 (fix typos in the example code in the doc comments of `Ipv4Addr::from_bits()`, `Ipv6Addr::from_bits()` & `Ipv6Addr::to_bits()`) - #134521 (Arbitrary self types v2: roll loop.) r? `@ghost` `@rustbot` modify labels: rollup
2024-12-20Rollup merge of #134521 - adetaylor:roll-loop, r=wesleywiserJacob Pratt-17/+10
Arbitrary self types v2: roll loop. Just for slightly more concise code - no functional changes. r? `@wesleywiser` Part of #44874
2024-12-20Rollup merge of #134518 - hltj:typo-fix, r=tgross35Jacob Pratt-3/+3
fix typos in the example code in the doc comments of `Ipv4Addr::from_bits()`, `Ipv6Addr::from_bits()` & `Ipv6Addr::to_bits()`
2024-12-20Rollup merge of #134321 - dtolnay:docassocconst, r=fmeaseJacob Pratt-100/+201
Hide `= _` as associated constant value inside impl blocks Closes #134320. ### Before: <img src="https://github.com/user-attachments/assets/19d28811-45d2-4563-9726-f40c6af411c6" width="300">&nbsp;<img src="https://github.com/user-attachments/assets/1ecf8764-97ce-47f0-87fa-3b174d2fc578" width="300"> ### After: <img src="https://github.com/user-attachments/assets/6408c4ca-b1c4-42e4-884b-248833a4865f" width="300">&nbsp;<img src="https://github.com/user-attachments/assets/df2f6981-16f6-409f-8abb-73c0a4a71d6b" width="300"> r? `@fmease`
2024-12-20Rollup merge of #133103 - tiif:fnabi, r=RalfJungJacob Pratt-455/+484
Pass FnAbi to find_mir_or_eval_fn https://github.com/rust-lang/miri/issues/4013 needs information from ``FnAbi``, hence it is passed to ``find_mir_or_eval_fn``. r? `@RalfJung`
2024-12-20Rollup merge of #132830 - wr7:substr_range_documentation, r=tgross35Jacob Pratt-7/+8
Rename `elem_offset` to `element_offset` Tracking issue: #126769 Renames `slice::elem_offset` to `slice::element_offset` and improves the documentation of it and its related methods. The current documentation can be misinterpreted (as explained [here](https://github.com/rust-lang/rust/issues/126769#issuecomment-2453363897)).
2024-12-20Rollup merge of #126118 - jan-ferdinand:docs_for_vec_set_len, r=the8472Jacob Pratt-1/+6
docs: Mention `spare_capacity_mut()` in `Vec::set_len` I recently went down a small rabbit hole when trying to identify safe use of `Vec::set_len`. The solution was `Vec::spare_capacity_mut`. I think the docs on `Vec::set_len` benefit from mentioning this method. A possible counter-argument could be that the [clippy lint `uninit_vec`](https://rust-lang.github.io/rust-clippy/master/index.html#/uninit_vec) already nudges people in the right direction. However, I think a working example on `Vec::set_len` is still beneficial. Happy to hear your thoughts on the matter. :blush:
2024-12-20Merge pull request #4100 from rust-lang/rustup-2024-12-20Ralf Jung-3918/+5998
Automatic Rustup
2024-12-20Merge from rustcThe Miri Cronjob Bot-3917/+5997
2024-12-20Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-12-20Auto merge of #134438 - lqd:const-qualif-bitsets, r=compiler-errorsbors-5/+15
Use `MixedBitSet`s in const qualif These analyses' domains should be very homogeneous, having compressed bitmaps on huge cfgs should make a difference (and doesn’t have an impact on the smaller / regular cfgs in our benchmarks). This is a >40% walltime reduction on [this stress test](https://github.com/Manishearth/icu4x_compile_sample) extracted from a real world ICU case, and a 10x or so max-rss reduction. cc `@oli-obk` `@RalfJung` Should help with (or fix) issue #134404.
2024-12-20fix typos in the example code in the doc comments of ↵hltj-3/+3
`Ipv4Addr::from_bits()`, `Ipv6Addr::from_bits()` & `Ipv6Addr::to_bits()`
2024-12-20Auto merge of #134433 - MarcoIeni:ubuntu-22-large-runners, r=Kobzolbors-3/+3
ci: use ubuntu-22 for large runners
2024-12-19Auto merge of #134516 - matthiaskrgr:rollup-aqwxii0, r=matthiaskrgrbors-488/+531
Rollup of 5 pull requests Successful merges: - #134463 (compiletest: don't register predefined `MSVC`/`NONMSVC` FileCheck prefixes) - #134487 (Add reference annotations for the `coverage` attribute) - #134497 (coverage: Store coverage source regions as `Span` until codegen (take 2)) - #134502 (Update std libc version to 0.2.169) - #134506 (Remove a duplicated check that doesn't do anything anymore.) r? `@ghost` `@rustbot` modify labels: rollup
2024-12-19Auto merge of #133793 - nnethercote:speed-up-expected_tokens, r=spastorinobors-844/+1415
Speed up `Parser::expected_tokens` The constant pushing/clearing of `Parser::expected_tokens` during parsing is slow. This PR speeds it up greatly. r? `@estebank`
2024-12-19Rename TyMethodItem -> RequiredMethodItemDavid Tolnay-20/+24
2024-12-19Rename TyAssocTypeItem -> RequiredAssocTypeItemDavid Tolnay-23/+25
2024-12-19Suppress `= _` on associated constants in implsDavid Tolnay-14/+47
2024-12-19Add test for rustdoc showing underscore as assoc const valueDavid Tolnay-0/+27
2024-12-19Split AssocConstItem into ProvidedAssocConstItem and ImplAssocConstItemDavid Tolnay-34/+62
2024-12-19Rename TyAssocConstItem -> RequiredAssocConstItemDavid Tolnay-22/+29
2024-12-19Auto merge of #134486 - compiler-errors:drop-for-lint, r=nikomatsakisbors-41/+461
Make sure we handle `backwards_incompatible_lint` drops appropriately in drop elaboration In #131326, a new kind of scheduled drop (`drop_kind: DropKind::Value` + `backwards_incompatible_lint: true`) was added so that we could insert a new kind of no-op MIR statement (`backward incompatible drop`) for linting purposes. These drops were intended to have *no side-effects*, but drop elaboration code forgot to handle these drops specially and they were handled otherwise as normal drops in most of the code. This ends up being **unsound** since we insert more than one drop call for some values, which means that `Drop::drop` could be called more than once. This PR fixes this by splitting out the `DropKind::ForLint` and adjusting the code. I'm not totally certain if all of the places I've adjusted are either reachable or correct, but I'm pretty certain that it's *more* correct than it was previously. cc `@dingxiangfei2009` r? nikomatsakis Fixes #134482
2024-12-19Arbitrary self types v2: roll loop.Adrian Taylor-17/+10
Just for slightly more concise code - no functional changes. r? @wesleywiser
2024-12-19pacify merciless fmtNiko Matsakis-5/+5
2024-12-19Rollup merge of #134506 - oli-obk:push-mrrulszyuslt, r=jieyouxuMatthias Krüger-42/+18
Remove a duplicated check that doesn't do anything anymore. fixes #134005 This code didn't actually `lub` the type of the previous expressions, but just the current type over and over again. Changing it to using the actual expression type does not change anything either, so may as well remove the entire loop.
2024-12-19Rollup merge of #134502 - SergioGasquez:feat/libc-0.2.169, r=tgross35Matthias Krüger-5/+5
Update std libc version to 0.2.169 Bumps `libc` to the latest release version [0.2.169](https://github.com/rust-lang/libc/releases/tag/0.2.169) which includes several fixes and additions, including mirroring `c_char` configuration (https://github.com/rust-lang/rust/pull/132975) for many targets.
2024-12-19Rollup merge of #134497 - Zalathar:spans, r=jieyouxuMatthias Krüger-271/+299
coverage: Store coverage source regions as `Span` until codegen (take 2) This is an attempt to re-land #133418: > Historically, coverage spans were converted into line/column coordinates during the MIR instrumentation pass. > This PR moves that conversion step into codegen, so that coverage spans spend most of their time stored as Span instead. > In addition to being conceptually nicer, this also reduces the size of coverage mappings in MIR, because Span is smaller than 4x u32. That PR was reverted by #133608, because in some circumstances not covered by our test suite we were emitting coverage metadata that was causing `llvm-cov` to exit with an error (#133606). --- The implementation here is *mostly* the same, but adapted for subsequent changes in the relevant code (e.g. #134163). I believe that the changes in #134163 should be sufficient to prevent the problem that required the original PR to be reverted. But I haven't been able to reproduce the original breakage in a regression test, and the `llvm-cov` error message is extremely unhelpful, so I can't completely rule out the possibility of this breaking again. r? jieyouxu (reviewer of the original PR)
2024-12-19Rollup merge of #134487 - ehuss:reference-coverage, r=compiler-errorsMatthias Krüger-103/+123
Add reference annotations for the `coverage` attribute This adds reference annotations for the `coverage` attribute.
2024-12-19Rollup merge of #134463 - jieyouxu:filecheck-prefix, r=ZalatharMatthias Krüger-67/+86
compiletest: don't register predefined `MSVC`/`NONMSVC` FileCheck prefixes This was fragile as it was based on host target passed to compiletest, but the user could cross-compile and run test for a different target (e.g. cross from linux to msvc, but msvc won't be set on the target). Furthermore, it was also very surprising as normally revision names (other than `CHECK`) was accepted as FileCheck prefixes. This partially reverts the `MSVC`/`NONMSVC` predefined FileCheck prefix registration introduced historically for some codegen tests. This makes some codegen tests more verbose since they now need to explicitly introduce `MSVC`/`NONMSVC` revisions, but I think that's less surprising, e.g.: ```rs //@ revisions: MSVC NONMSVC //`@[MSVC]` only-msvc //`@[NONMSVC]` ignore-msvc ``` Note that revisions are not *only* FileCheck prefixes in FileCheck-based test suites, as they also can be used to conditionally apply certain compiletest directives. r? `@Zalathar` (or reroll a `r/? compiletest` reviewer) try-job: x86_64-msvc try-job: i686-msvc try-job: x86_64-mingw-1 try-job: i686-mingw
2024-12-19Pass FnAbi to find_mir_or_eval_fntiif-455/+484
2024-12-19explain how `build_scope_drops` worksNiko Matsakis-2/+38
2024-12-19Explicitly register `MSVC`/`NONMSVC` revisions for some codegen tests许杰友 Jieyou Xu (Joe)-50/+76
2024-12-19compiletest: don't register `MSVC`/`NONMSVC` FileCheck prefixes许杰友 Jieyou Xu (Joe)-17/+10
This was fragile as it was based on host target passed to compiletest, but the user could cross-compile and run test for a different target (e.g. cross from linux to msvc, but msvc won't be set on the target). Furthermore, it was also very surprising as normally revision names (other than `CHECK`) was accepted as FileCheck prefixes.
2024-12-19Auto merge of #134499 - jieyouxu:rollup-zmaveur, r=jieyouxubors-367/+446
Rollup of 7 pull requests Successful merges: - #133702 (Variants::Single: do not use invalid VariantIdx for uninhabited enums) - #134427 (ci: remove duplicate task definition) - #134432 (Fix intra doc links not generated inside footnote definitions) - #134437 (reduce compiler `Assemble` complexity) - #134474 (Forbid overwriting types in typeck) - #134477 (move lint_unused_mut into sub-fn) - #134491 (Some destructor/drop related tweaks) r? `@ghost` `@rustbot` modify labels: rollup
2024-12-19coverage: Add a synthetic test for when all spans are discardedZalathar-3/+67
2024-12-19Remove a duplicated check that doesn't do anything anymore.Oli Scherer-42/+18
2024-12-19build: Update libc versionSergio Gasquez-5/+5
2024-12-19Fix `Parser` size assertion on s390x.Nicholas Nethercote-3/+3
For some reason the memory layout is different on s390x.
2024-12-19Merge pull request #4098 from RalfJung/native-call-warningOli Scherer-10/+88
add warning explaining the limitations of the native code mode
2024-12-19Rollup merge of #134491 - compiler-errors:dtor-tweaks, r=lqd许杰友 Jieyou Xu (Joe)-53/+46
Some destructor/drop related tweaks Two random tweaks I got from investigating some stuff around drops in edition 2024: 1. Use the `TypingEnv` of the mir builder, rather than making it over again. 2. Rename the `id` field from `Scope` to `local_id`, to reflect that it's a local id, and remove the `item_local_id()` accessor which just returned the id field.