about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-08-14rewrite min-global-align to rmakeOneirical-24/+42
2024-08-14Auto merge of #129054 - lnicola:sync-from-ra, r=lnicolabors-2448/+3807
Subtree update of `rust-analyzer` r? `@ghost` CC `@ShoyuVanilla`
2024-08-14Auto merge of #129060 - matthiaskrgr:rollup-s72gpif, r=matthiaskrgrbors-124/+219
Rollup of 7 pull requests Successful merges: - #122884 (Optimize integer `pow` by removing the exit branch) - #127857 (Allow to customize `// TODO:` comment for deprecated safe autofix) - #129034 (Add `#[must_use]` attribute to `Coroutine` trait) - #129049 (compiletest: Don't panic on unknown JSON-like output lines) - #129050 (Emit a warning instead of an error if `--generate-link-to-definition` is used with other output formats than HTML) - #129056 (Fix one usage of target triple in bootstrap) - #129058 (Add mw back to review rotation) r? `@ghost` `@rustbot` modify labels: rollup
2024-08-14Auto merge of #129076 - matthiaskrgr:rollup-rg8mi2x, r=matthiaskrgrbors-261/+543
Rollup of 6 pull requests Successful merges: - #128410 (Migrate `remap-path-prefix-dwarf` `run-make` test to rmake) - #128759 (alloc: add ToString specialization for `&&str`) - #128873 (Add windows-targets crate to std's sysroot) - #129001 (chore(lib): Enhance documentation for core::fmt::Formatter's write_fm…) - #129061 (Use `is_lang_item` more) - #129062 (Remove a no-longer-true assert) r? `@ghost` `@rustbot` modify labels: rollup
2024-08-14Rollup merge of #129062 - Nadrieril:fix-129009, r=compiler-errorsMatthias Krüger-99/+138
Remove a no-longer-true assert Fixes https://github.com/rust-lang/rust/issues/129009 The assert was simply no longer true. I thought my test suite was thorough but I had not noticed these `let`-specific diagnostics codepaths. r? `@compiler-errors`
2024-08-14Rollup merge of #129061 - compiler-errors:lang-item, r=UrgauMatthias Krüger-24/+26
Use `is_lang_item` more Few places that I missed since introducing `TyCtxt::is_lang_item`.
2024-08-14Rollup merge of #129001 - cblh:fix/128713, r=NoratriebMatthias Krüger-0/+5
chore(lib): Enhance documentation for core::fmt::Formatter's write_fm… fix: #128713
2024-08-14Rollup merge of #128873 - ChrisDenton:windows-targets, r=Mark-SimulacrumMatthias Krüger-7/+27
Add windows-targets crate to std's sysroot With this PR, when backtrace is used as a crate from crates.io it will (once updated) use the real [windows-targets](https://crates.io/crates/windows-targets) crate. But when used from std it'll use std's replacement version. This allows sharing our customized `windows_tagets::link!` macro between std proper and the backtrace crate when used as part of std, ensuring a consistent linking story. This will be especially important once we move to using [`raw-dylib`](https://doc.rust-lang.org/reference/items/external-blocks.html#dylib-versus-raw-dylib) by default.
2024-08-14Rollup merge of #128759 - notriddle:notriddle/spec-to-string, ↵Matthias Krüger-16/+112
r=workingjubilee,compiler-errors alloc: add ToString specialization for `&&str` Fixes #128690
2024-08-14Rollup merge of #128410 - Oneirical:dwarf-fortestress, r=jieyouxuMatthias Krüger-115/+235
Migrate `remap-path-prefix-dwarf` `run-make` test to rmake Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html). Possibly my proudest branch name yet. try-job: aarch64-apple try-job: armhf-gnu try-job: test-various try-job: x86_64-gnu-llvm-18
2024-08-14Auto merge of #128812 - nnethercote:shrink-TyKind-FnPtr, r=compiler-errorsbors-231/+315
Shrink `TyKind::FnPtr`. By splitting the `FnSig` within `TyKind::FnPtr` into `FnSigTys` and `FnHeader`, which can be packed more efficiently. This reduces the size of the hot `TyKind` type from 32 bytes to 24 bytes on 64-bit platforms. This reduces peak memory usage by a few percent on some benchmarks. It also reduces cache misses and page faults similarly, though this doesn't translate to clear cycles or wall-time improvements on CI. r? `@compiler-errors`
2024-08-13Auto merge of #126245 - GuillaumeGomez:doctest-improvement-v2, r=t-rustdocbors-438/+1635
Greatly speed up doctests by compiling compatible doctests in one file Fixes #75341. Take 2 at https://github.com/rust-lang/rust/pull/123974. It should now be much simpler to review since it's based on https://github.com/rust-lang/rust/pull/125798. I split the changes as much as possible to make it as easy as possible to review (even though it's a huge lot of code changes...). The following tests are not included into the combined doctests: * `compile_fail` * If there are crate attributes (`deny`/`allow`/`warn` are ok) * have invalid AST * `test_harness` * no capture * `--show-output` (because the output is nicer without the extra code surrounding it) Everything else is merged into one file. If this one file fails to compile, we go back to the current strategy: compile each doctest separately. Because of the `edition` codeblock attribute, I couldn't make them all into one file directly so I grouped them by edition, but it should be pretty anecdotic. In case the users want a specific doctest to be opted-out from this doctest merge, I added the `standalone` codeblock attribute: ```rust /// ```rust,standalone /// // This doctest will be run in its own process! /// ``` ``` Now the interesting part, I ran it on a few crates and here are the results (with `cargo test --doc` to only include doctests): | crate | nb doctests | before this PR | with this PR | | - | - | - | - | | sysinfo | 227 | 4.6s | 1.11s | | geos | 157 | 3.95s | 0.45s | | core | 4604 | 54.08s | 13.5s (merged: 0.9s, standalone: 12.6s) | | std | 1147 | 12s | 3.56s (merged: 2.1s, standalone: 1.46s) | r? `@camelid` try-job: x86_64-msvc try-job: aarch64-apple
2024-08-13Remove a no-longer-true `assert`Nadrieril-99/+138
2024-08-13Use is_lang_item moreMichael Goulet-24/+26
2024-08-13Rollup merge of #129058 - michaelwoerister:mwback082024, r=jackh726Matthias Krüger-1/+1
Add mw back to review rotation
2024-08-13Rollup merge of #129056 - Kobzol:fix-target-triple, r=onur-ozkanMatthias Krüger-1/+1
Fix one usage of target triple in bootstrap This bug was introduced in https://github.com/rust-lang/rust/pull/128983. In this one case, the `TargetSelection` was also used as `Display` (not just as `Path`), which I did not notice in the original PR. If the target contained a custom file, it would be included in its `Display` formatting, even though only the triple should be used. Found [here](https://github.com/rust-lang/rust/pull/128983#issuecomment-2286601889). r? `@onur-ozkan`
2024-08-13Rollup merge of #129050 - ↵Matthias Krüger-12/+9
GuillaumeGomez:generate-link-to-definition-warning, r=notriddle Emit a warning instead of an error if `--generate-link-to-definition` is used with other output formats than HTML Fixes https://github.com/rust-lang/docs.rs/issues/2581. It's a bit weird to emit an error in this case anyway, a warning is more than enough. r? ``@notriddle``
2024-08-13Rollup merge of #129049 - Zalathar:json-like, r=jieyouxuMatthias Krüger-6/+4
compiletest: Don't panic on unknown JSON-like output lines The `json::extract_rendered` function is called for both compiler output and non-compiler output, so it's inappropriate to panic just because a line starting with `{` didn't contain a compiler output message. It is called from two places: when checking the output of a `ui` test process, and when printing the output of an arbitrary non-passing `ProcRes`. So unfortunately there's currently no easy way to know for sure whether it is seeing compiler output or not. Fortunately, neither call site appears to be relying on this panic; it's just an overzealous internal check. Fixes #126373.
2024-08-13Rollup merge of #129034 - henryksloan:coroutine-must-use, r=joboetMatthias Krüger-2/+4
Add `#[must_use]` attribute to `Coroutine` trait [Coroutines tracking issue](https://github.com/rust-lang/rust/issues/43122) Like closures (`FnOnce`, `AsyncFn`, etc.), coroutines are lazy and do nothing unless called (resumed). Closure traits like `FnOnce` have `#[must_use = "closures are lazy and do nothing unless called"]` to catch likely bugs for users of APIs that produce them. This PR adds such a `#[must_use]` attribute to `trait Coroutine`.
2024-08-13Rollup merge of #127857 - tbu-:pr_deprecated_safe_todo, r=petrochenkovMatthias Krüger-13/+49
Allow to customize `// TODO:` comment for deprecated safe autofix Relevant for the deprecation of `CommandExt::before_exit` in #125970. Tracking: - #124866
2024-08-13Rollup merge of #122884 - mzabaluev:pow-remove-exit-branch, r=AmanieuMatthias Krüger-89/+151
Optimize integer `pow` by removing the exit branch The branch at the end of the `pow` implementations is redundant with multiplication code already present in the loop. By rotating the exit check, this branch can be largely removed, improving code size and reducing instruction cache misses. Testing on my machine (`x86_64`, 11th Gen Intel Core i5-1135G7 @ 2.40GHz), the `num::int_pow` benchmarks improve by some 40% for the unchecked operations and show some slight improvement for the checked operations as well.
2024-08-13Add mw back to review rotationMichael Woerister-1/+1
2024-08-13Fix intra-doc linkGuillaume Gomez-3/+2
2024-08-13Ignore cross compile check for `tests/run-make/doctests-keep-binaries-2024` testGuillaume Gomez-0/+2
2024-08-13Update `tests/run-make/doctests-keep-binaries-2024/rmake.rs` test to new ↵Guillaume Gomez-6/+5
run-make API
2024-08-13Run fmtGuillaume Gomez-8/+11
2024-08-13Fix commands syntax in rustdoc-ui testsGuillaume Gomez-9/+9
2024-08-13Only keep "useful" code in `tests/rustdoc-ui/2024-doctests-checks.rs`Guillaume Gomez-24/+8
2024-08-13Add doctest to ensure that doctests with crate-level attributes are not part ↵Guillaume Gomez-0/+34
of merged doctest
2024-08-13Add more merged doctests testsGuillaume Gomez-0/+21
2024-08-13Improve documentation for internal doctest APIGuillaume Gomez-0/+13
2024-08-13Move `is_multiple_tests` argument into `RunnableDocTest`Guillaume Gomez-20/+12
2024-08-13Unify naming of `DocTest`Guillaume Gomez-42/+46
2024-08-13Don't special-case if there is only one merged doctestGuillaume Gomez-67/+43
2024-08-13Remove need for `unsafe` code in merged doctestsGuillaume Gomez-5/+10
2024-08-13Improve code readabilityGuillaume Gomez-5/+19
2024-08-13If there are crate attributes, we prevent doctest to be merged with othersGuillaume Gomez-27/+4
2024-08-13Rename `DocTest` into `DocTestBuilder`Guillaume Gomez-17/+22
2024-08-13Reduce merged doctest source code sizeGuillaume Gomez-25/+41
2024-08-13Run mergeable doctest as part of standalone doctests if there is only oneGuillaume Gomez-48/+70
2024-08-13Add documentation on `DocTest` and `RunnableDoctest` structsGuillaume Gomez-0/+3
2024-08-13Improve code by removing unneeded function argumentsGuillaume Gomez-24/+9
2024-08-13Add 2024 edition doctests to cover corner casesGuillaume Gomez-0/+55
2024-08-13Correctly handle macros using `$crate` in merged doctestsGuillaume Gomez-3/+14
2024-08-13Disable merged doctests by defaultGuillaume Gomez-2/+1
2024-08-13Only show rustdoc doctest compilation output if `nocapture` is usedGuillaume Gomez-3/+5
2024-08-13If no argument is provided to merged doctests binary, they will be run in ↵Guillaume Gomez-6/+4
the same process (needed for miri)
2024-08-13Correctly handle `internal_features` attributeGuillaume Gomez-1/+13
2024-08-13Mark location doctest as standalone since file information will not work in ↵Guillaume Gomez-1/+1
merged doctest file
2024-08-13Don't change indent in merged doctestsGuillaume Gomez-1/+1