Commit Graph

274426 Commits

Author SHA1 Message Date
John Kåre Alsaker
4bf85c25ec Try to write the panic message with a single write_all call 2025-01-01 15:58:29 +01:00
bors
eeeff9a66c Auto merge of - Marcondiro:master, r=jhpratt,programmerjake
char to_digit: avoid unnecessary casts to u64

Hello,
in the `char::to_digit` method there are a few `as u64` casts that are not strictly necessary.
I assume that the reason behind these casts is to avoid possible overflows in the `+ 10` add.

This PR removes the aforementioned casts, avoiding the overflow issue by slightly modifying the ASCII letter to int mapping.

Thanks,
Happy new year.
2025-01-01 10:54:12 +00:00
bors
bc3e3015b6 Auto merge of - Zalathar:rollup-pldy5w6, r=Zalathar
Rollup of 6 pull requests

Successful merges:

 -  (Remove allowing static_mut_refs lint)
 -  (E0277: suggest dereferencing function arguments in more cases)
 -  (add suggestion for wrongly ordered format parameters)
 -  (Some small nits to the borrowck suggestions for mutating a map through index)
 -  (bootstrap: Overhaul and simplify the `tool_check_step!` macro)
 -  (Provide structured suggestion for `impl Default` of type where all fields have defaults)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-01 08:10:15 +00:00
Stuart Cook
65cb7c66d0
Rollup merge of - estebank:default-lint-sugg, r=compiler-errors
Provide structured suggestion for `impl Default` of type where all fields have defaults

```
error: `Default` impl doesn't use the declared default field values
  --> $DIR/manual-default-impl-could-be-derived.rs:28:1
   |
LL | / impl Default for B {
LL | |     fn default() -> Self {
LL | |         B {
LL | |             x: s(),
   | |                --- this field has a default value
LL | |             y: 0,
   | |                - this field has a default value
...  |
LL | | }
   | |_^
   |
help: to avoid divergence in behavior between `Struct { .. }` and `<Struct as Default>::default()`, derive the `Default`
   |
LL ~ #[derive(Default)] struct B {
   |
```

Note that above the structured suggestion also includes completely removing the manual `impl`, but the rendering doesn't.
2025-01-01 16:35:32 +11:00
Stuart Cook
cf7d7f5096
Rollup merge of - Zalathar:tool-check-step, r=jieyouxu
bootstrap: Overhaul and simplify the `tool_check_step!` macro

Main changes:

- Pull most of `run` out of the macro and into a regular helper function
- Reduce the number of redundant/unnecessary macro arguments
- Switch to struct-like syntax so that optional arguments are clearer, and so that rustfmt is happy

~~The one “functional” change is that the `-check.stamp` files now get their name from the final path segment, instead of the struct name; in practice this means that they now contain more hyphens in some cases. As far as I'm aware, the exact filename doesn't matter so this should be fine.~~ (that change has been removed from this PR)
2025-01-01 16:35:31 +11:00
Stuart Cook
f91bfd97bf
Rollup merge of - compiler-errors:map-mutate-nits, r=estebank
Some small nits to the borrowck suggestions for mutating a map through index

1. Suggesting users to either use `.insert` or `.get_mut` (which do totally different things) can be a bit of a footgun, so let's make that a bit more nuanced.
2. I find the suggestion of `.get_mut(|val| { *val = whatever; })` to be a bit awkward. I changed this to be an if-let instead.
3. Fix a bug which was suppressing the structured suggestion for some mutations via the index operator on `HashMap`/`BTreeMap`.

r? estebank or reassign
2025-01-01 16:35:31 +11:00
Stuart Cook
1ea1db5b08
Rollup merge of - DavisRayM:129966-format-string-help-message, r=estebank
add suggestion for wrongly ordered format parameters

Add suggestion for wrongly ordered format parameters like `?#`.

Supersedes 
Fix 
2025-01-01 16:35:30 +11:00
Stuart Cook
0204259780
Rollup merge of - dianne:e0277-suggest-deref, r=estebank
E0277: suggest dereferencing function arguments in more cases

This unifies and generalizes some of the logic in `TypeErrCtxt::suggest_dereferences` so that it will suggest dereferencing arguments to function/method calls in order to satisfy trait bounds in more cases.

Previously it would only fire on reference types, and it had two separate cases (one specifically to get through custom `Deref` impls when passing by-reference, and one specifically to catch ). I've based the new checks loosely on what's done for `E0308` in `FnCtxt::suggest_deref_or_ref`: it will suggest dereferences to satisfy trait bounds whenever the referent is `Copy`, is boxed (& so can be moved out of the boxes), or is being passed by reference.

This doesn't make the suggestion fire in contexts other than function arguments or binary operators (which are in a separate case that this doesn't touch), and doesn't make it suggest a combination of `&`-removal and dereferences. Those would require a bit more restructuring, so I figured just doing this would be a decent first step.

Closes 
2025-01-01 16:35:30 +11:00
Stuart Cook
f4db757cb5
Rollup merge of - mu001999-contrib:cleanup/static-mut, r=estebank
Remove allowing static_mut_refs lint
2025-01-01 16:35:29 +11:00
bors
a8953d83cf Auto merge of - rustbot:docs-update, r=ehuss
Update books

## rust-lang/book

13 commits in ad2011d3bcad9f152d034faf7635c22506839d58..04d06dfe541607e6419f3d028c3f9b245f3be4d9
2024-12-20 22:44:11 UTC to 2024-12-16 18:18:21 UTC

- Update section name ()
- Update text to reflect the change from '&str' to 'char' in example ()
- Update figure number in text and file name ()
- Fix chapter number ()
- Delete unused reference ()
- Remove orphaned half-sentence ()
- Fix chapter number ()
- A better phrasing for generic methods. ()
- Fix minor grammatical error ()
- Update appendix-06-translation.md to add another Chinese translation. ()
- Change Korean translation repo to newer ()
- Clarify/improve readability in Ch. 02 discussion of `Result` variants ()
- Ch. 20: conclude §01 with a reference to the Rustonomicon ()

## rust-lang/nomicon

1 commits in 97e84a38c94bf9362b11284c20b2cb4adaa1e868..7ef05b9777c94836bc92f50f23e6e00981521a89
2024-12-30 10:38:10 UTC to 2024-12-30 10:38:10 UTC

- Fix URL fragment to MutexGuard's negative impl of Send ()

## rust-lang/reference

3 commits in 9f41bc11342d46544ae0732caf14ec0bcaf27376..acd6794e712d5e2ef6f5c84fb95688d32a69b816
2024-12-18 23:04:30 +0000 to 2024-12-30 22:12:57 +0000

- Revert "`coverage` attribute" ()
- Document Rust 2024 match ergonomics reservations ()
- Add documentation for `#[diagnostic::do_not_recommend]` ()

## rust-lang/edition-guide

5 commits in bc4ce51e1d4dacb9350a92e95f6159a42de2f8c6..d56e0f3a0656b7702ca466d4b191e16c28262b82
2024-12-18 05:34:59 +0000 to 2024-12-31 20:04:52 +0000

- 2024: Document rustfmt overflow_delimited_expr ()
- 2024: Document rustfmt fixes ()
- Update the transitioning steps ()
- Revert "2024: Assignment operator RHS indentation" ()
- Revert "2024: Add chapter on single-line `where` clauses" ()

## rust-lang/rust-by-example

1 commits in 76406337f4131253443aea0ed7e7f451b464117c..093397535b48ae13ec76bc526b7e6eb8c096a85c
2024-12-18 17:29:56 UTC to 2024-12-18 17:29:56 UTC

- Mention that you're not allowed to partially move Drop types ()

## rust-lang/rustc-dev-guide

18 commits in 7f7ba48f04abc2ad25e52f30b5e2bffa286b019f..ad93c5f1c49f2aeb45f7a4954017b1e607df9f5e
2024-12-30 09:22:22 UTC to 2024-12-17 17:00:38 UTC

- Opt into, rather than out of, linkcheck ()
- Remove stale implementation details of coverage instrumentation ()
- Remove properly tracked config file from .gitignore & add support for skipping of link-checking ()
- Add a couple of linkcheck exceptions: ()
- Add missing link for [Node] ()
- Fix 403 received for HEAD request ()
- Start using mdbook-linkcheck2 ()
- Document `x test --no-capture` ()
- Remove the `-test` suffix from normalize directives ()
- Rework the driver docs ()
- Document `forbid-output` for UI tests ()
- completions: Zsh is now supported ()
- region-outlives propagation ()
- compiletest: Document the `--debugger` flag ()
- document the public ci dashboard ()
- Fix trivial typo of "query-fied" ()
- Fix some typos ()
- Add suggestion for `--keep-stage 0` ()
2025-01-01 05:25:45 +00:00
bors
2085bce154 Auto merge of - tgross35:rollup-s59bx7c, r=tgross35
Rollup of 8 pull requests

Successful merges:

 -  (Add more mailmap entries)
 -  (borrowck diagnostics: make `add_move_error_suggestions` use the HIR rather than `SourceMap`)
 -  (Add GUI test for item info elements color)
 -  (Print how to rebless Python formatting in tidy)
 -  (chore: fix typos)
 -  (add .mailmap entry for myself)
 -  (Revert  single line where clause style guide)
 -  (Revert style guide rhs break)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-01 01:34:29 +00:00
Trevor Gross
9472d32842
Rollup merge of - ehuss:revert-style-guide-rhs-break, r=compiler-errors
Revert style guide rhs break

This reverts https://github.com/rust-lang/rust/pull/132369 and https://github.com/rust-lang/rust/pull/119838. The style-guide change for indentation of rhs was not implemented in time for the 2024 style edition.
See tracking issue https://github.com/rust-lang/rust/issues/132380.

cc  for the other style guide change in 2024.

r? ``@compiler-errors``
2024-12-31 18:42:26 -05:00
Trevor Gross
fee79a2900
Rollup merge of - ehuss:revert-single-line-where, r=compiler-errors
Revert  single line where clause style guide

This did not get implemented for the style edition in 2024, so this PR removes it from the documentation.
See tracking issue https://github.com/rust-lang/rust/issues/132381.

This can be added back in the next edition if it gets implemented. I'm a little unclear on what the style team intends for how future changes are documented. For example, the current style-guide documented behavior that rustfmt does not support. I'm not sure who the audience for this document is, or how this is intended to stay in sync with rustfmt. For example, if I read this and assume this is how it is supposed to work, and then rustfmt breaks that, it seems like that is confusing. Similarly, if I'm staying on an older edition, this documentation would be incorrect for my crate.

Perhaps changes like this could be "teed-up" in a PR, but not merged until the edition is stabilized (similar to how the reference works)? And include notes for parts that are edition-specific (so if I am using an older edition, I can see that something is different). In general, I'm a little confused on how this is intended to work.

Reverts:

- https://github.com/rust-lang/rust/pull/119515
2024-12-31 18:42:25 -05:00
Trevor Gross
8a2979c18f
Rollup merge of - Skgland:master, r=Noratrieb
add .mailmap entry for myself

Seeing  in the bors queue I decided to check myself and noticed I was listed four times.
This fixed that by cannonicalizing all entries to use my username and the github no-reply email address, rather than some combination of name or username and different email addresses.
2024-12-31 18:42:25 -05:00
Trevor Gross
ac4546c9fd
Rollup merge of - dxsullivan:fix-typo, r=lqd
chore: fix typos

I hope my typo corrections will help you. Thank you for your work.
2024-12-31 18:42:24 -05:00
Trevor Gross
53b99dee15
Rollup merge of - Kobzol:tidy-bless-log, r=Noratrieb
Print how to rebless Python formatting in tidy

Suggested [here](https://github.com/rust-lang/rust/pull/134964#discussion_r1900124882).

r? ``@Noratrieb``
2024-12-31 18:42:24 -05:00
Trevor Gross
63d5b72482
Rollup merge of - GuillaumeGomez:item-info-colors, r=fmease
Add GUI test for item info elements color

Fixes https://github.com/rust-lang/rust/issues/98341.

r? ``@fmease``
2024-12-31 18:42:23 -05:00
Trevor Gross
3d3d898a2e
Rollup merge of - dianne:fix-move-error-suggestion, r=estebank
borrowck diagnostics: make `add_move_error_suggestions` use the HIR rather than `SourceMap`

This PR aims to fix  by rewriting `add_move_error_suggestions`[^1]. Previously, it manually scanned the source text to find a leading `&`, which isn't always going to produce a correct result (see: that issue). Admittedly, the HIR visitor in this PR introduces a lot of boilerplate, but hopefully the logic at its core isn't too complicated (I go over it in the comments). I also tried a simpler version that didn't use a HIR visitor and suggested adding `ref` always, but the `&ref x` suggestions really didn't look good. As a bonus for the added complexity though, it's now able to produce nice `&`-removing suggestions in more cases.

I tried to do this such that it avoids edition-dependent checks and its suggestions can be applied together with those from the match ergonomics 2024 migration lint. I haven't added tests for that since the details of match ergonomics 2024 are still being sorted out, but I can try if desired once that's finalized.

[^1]: In brief, it fires on patterns where users try to bind by-value in such a way that moves out of a reference to a non-Copy type (including slice references with non-copy elements). The suggestions are to change the binding's mode to be by-reference, either by removing[^2] an enclosing `&`/`&mut` or adding `ref` to the binding.

[^2]: Incidentally, I find the terminology of "consider removing the borrow" a bit confusing for a suggestion to remove a `&` pattern in order to make bindings borrow rather than move. I'm not sure what a good, concise way to explain that would be though, and that should go in a separate PR anyway.
2024-12-31 18:42:23 -05:00
Trevor Gross
ecfb85b3e1
Rollup merge of - Noratrieb:lots-of-mailmapping-round-2, r=Mark-Simulacrum
Add more mailmap entries

If you have been pinged: I'm adding a mailmap entry for you to keep thanks.rust-lang.org working properly.

**I have picked the canonical address mostly arbitrarily. If you want a different one as the canonical address, please tell me here**.

<details>
<summary>more details on the change</summary>

builds on top of , this containing the less obvious changes that add new canonical email addresses instead of just adding new current ones.

The people updated in this commit have contributed under different email
addresses than the ones they have used in rust-lang/team.
https://github.com/rust-lang/thanks/pull/53 will use team data for thanks reviewers, which requires this to be in
sync.
Therefore, I have updated many of the people that I've noticed being
duplicated after the change.

</details>

I'm adding a novel entry for you: ``@apiraino`` ``@KodrAus`` ``@cramertj`` ``@sunfishcode`` ``@Eh2406`` ``@skade`` ``@huonw`` ``@jsha`` ``@shepmaster`` ``@workingjubilee`` ``@rbtcollins``  ``@nrc`` ``@fitzgen`` ``@sophiajt`` ``@tmiasko`` ``@notriddle`` ``@TimNN`` ``@WaffleLapkin``
2024-12-31 18:42:22 -05:00
bors
4e59b1da80 Auto merge of - weihanglo:update-cargo, r=weihanglo
Update cargo

5 commits in c86f4b3a1b153218e6e50861214b0b4b4e695f23..d73d2caf9e41a39daf2a8d6ce60ec80bf354d2a7
2024-12-24 17:49:48 +0000 to 2024-12-31 20:51:21 +0000
- fix(package): warn if symlinks checked out as plain text files ()
- test: track caller for `.crate` file publish verification ()
- test: relax panic output assertion ()
- test: relax `bad_crate_type` to only match error message prefix ()
- refactor(package): split `cargo_package` to modules ()

r? ghost
2024-12-31 22:37:20 +00:00
Weihang Lo
acb38ec197
Update cargo 2024-12-31 17:05:16 -05:00
Eric Huss
40b2cd9dde Update reference, edition-guide 2024-12-31 12:29:50 -08:00
bors
d117b7f211 Auto merge of - clarfonthey:bigint-mul, r=scottmcm
Tidy up bigint multiplication methods

This tidies up the library version of the bigint multiplication methods after the addition of the intrinsics in . It follows [this summary](https://github.com/rust-lang/rust/issues/85532#issuecomment-2403442775) of what's desired for these methods.

Note that, if `2H = N`, then `uH::MAX * uH::MAX + uH::MAX + uH::MAX` is `uN::MAX`, and that we can effectively add two "carry" values without overflowing.

For ease of terminology, the "low-order" or "least significant" or "wrapping" half of multiplication will be called the low part, and the "high-order" or "most significant" or "overflowing" half of multiplication will be called the high part. In all cases, the return convention is `(low, high)` and left unchanged by this PR, to be litigated later.

## API Changes

The original API:

```rust
impl uN {
    // computes self * rhs
    pub const fn widening_mul(self, rhs: uN) -> (uN, uN);

    // computes self * rhs + carry
    pub const fn carrying_mul(self, rhs: uN, carry: uN) -> (uN, uN);
}
```

The added API:

```rust
impl uN {
    // computes self * rhs + carry1 + carry2
    pub const fn carrying2_mul(self, rhs: uN, carry: uN, add: uN) -> (uN, uN);
}
impl iN {
    // note that the low part is unsigned
    pub const fn widening_mul(self, rhs: iN) -> (uN, iN);
    pub const fn carrying_mul(self, rhs: iN, carry: iN) -> (uN, iN);
    pub const fn carrying_mul_add(self, rhs: iN, carry: iN, add: iN) -> (uN, iN);
}
```

Additionally, a naive implementation has been added for `u128` and `i128` since there are no double-wide types for those. Eventually, an intrinsic will be added to make these more efficient, but rather than doing this all at once, the library changes are added first.

## Justifications for API

The unsigned parts are done to ensure consistency with overflowing addition: for a two's complement integer, you want to have unsigned overflow semantics for all parts of the integer except the highest one. This is because overflow for unsigned integers happens on the highest bit (from `MAX` to zero), whereas overflow for signed integers happens on the second highest bit (from `MAX` to `MIN`). Since the sign information only matters in the highest part, we use unsigned overflow for everything but that part.

There is still discussion on the merits of signed bigint *addition* methods, since getting the behaviour right is very subtle, but at least for signed bigint *multiplication*, the sign of the operands does make a difference. So, it feels appropriate that at least until we've nailed down the final API, there should be an option to do signed versions of these methods.

Additionally, while it's unclear whether we need all three versions of bigint multiplication (widening, carrying-1, and carrying-2), since it's possible to have up to two carries without overflow, there should at least be a method to allow that. We could potentially only offer the carry-2 method and expect that adding zero carries afterword will optimise correctly, but again, this can be litigated before stabilisation.

## Note on documentation

While a lot of care was put into the documentation for the `widening_mul` and `carrying_mul` methods on unsigned integers, I have not taken this same care for `carrying_mul_add` or the signed versions. While I have updated the doc tests to be more appropriate, there will likely be many documentation changes done before stabilisation.

## Note on tests

Alongside this change, I've added several tests to ensure that these methods work as expected. These are alongside the codegen tests for the intrinsics.
2024-12-31 18:49:36 +00:00
Esteban Küber
2b2ea9e875 Provide structured suggestion for impl Default of type where all fields have defaults
```
error: `Default` impl doesn't use the declared default field values
  --> $DIR/manual-default-impl-could-be-derived.rs:28:1
   |
LL | / impl Default for B {
LL | |     fn default() -> Self {
LL | |         B {
LL | |             x: s(),
   | |                --- this field has a default value
LL | |             y: 0,
   | |                - this field has a default value
...  |
LL | | }
   | |_^
   |
help: to avoid divergence in behavior between `Struct { .. }` and `<Struct as Default>::default()`, derive the `Default`
   |
LL ~ #[derive(Default)] struct B {
   |
```

Note that above the structured suggestion also includes completely removing the manual `impl`, but the rendering doesn't.
2024-12-31 18:06:01 +00:00
Eric Huss
7a46c7b112 Revert "Rollup merge of - joshtriplett:style-guide-binop-indent, r=compiler-errors"
This reverts commit 36287830a2, reversing
changes made to 31026b7fe3.
2024-12-31 08:50:28 -08:00
Eric Huss
a6ba04ae6a Revert "Rollup merge of - joshtriplett:style-guide-binop-heuristic-assignment-only, r=calebcartwright"
This reverts commit 348d28052b, reversing
changes made to 526c67f37b.
2024-12-31 08:50:04 -08:00
bors
34719e8c40 Auto merge of - matthiaskrgr:rollup-lmhmgsv, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 -  (Format `build.toml` consistently in platform support docs)
 -  (Windows: Enable issue 70093 link tests)
 -  (Fix doc for read&write unaligned in zst operation)
 -  (Account for C string literals and `format_args` in `HiddenUnicodeCodepoints` lint)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-12-31 16:05:41 +00:00
Skgland
19387e6518
add .mailmap entry for myself 2024-12-31 17:02:29 +01:00
Eric Huss
b4a092662c Revert "Rollup merge of - joshtriplett:style-guide-gat-where-clause-same-line, r=compiler-errors"
This reverts commit 4d1cce9de5, reversing
changes made to 030a12ce2b.
2024-12-31 07:57:06 -08:00
dxsullivan
bb16267a65 chore: fix typos
Signed-off-by: dxsullivan <193140725+dxsullivan@users.noreply.github.com>
2024-12-31 23:46:39 +08:00
Marcondiro
aa685bccca
char to_digit: avoid unnecessary casts to u64 2024-12-31 16:17:10 +01:00
Jakub Beránek
ca8b12eb54 Print how to rebless Python formatting in tidy 2024-12-31 15:45:21 +01:00
Noratrieb
a985205e08 Add more mailmap entries
The people updated in this commit have contributed under different email
addresses than the ones they have used in rust-lang/team.

A new change will use team data for thanks reviewers, which requires this to be in
sync.
Therefore, I have updated many of the people that I've noticed being
duplicated after the change.
2024-12-31 15:06:20 +01:00
Matthias Krüger
0c94f631d8
Rollup merge of - compiler-errors:format-args-hidden-chars, r=jieyouxu
Account for C string literals and `format_args` in `HiddenUnicodeCodepoints` lint

This is stacked on , and either that can land first or both of them can land together here. I split this out because this is a bit more involved of an impl.

Fixes 
2024-12-31 14:30:44 +01:00
Matthias Krüger
852440ba5f
Rollup merge of - DiuDiu777:unaligned-doc, r=RalfJung
Fix doc for read&write unaligned in zst operation

### PR Description
This PR addresses an inconsistency in the Rust documentation regarding `read_unaligned ` and `write_unaligned` on zero-sized types (ZSTs). The current documentation for [pointer validity](https://doc.rust-lang.org/nightly/std/ptr/index.html#safety) states that for zero-sized types (ZSTs), null pointers are valid:
> For zero-sized types (ZSTs), every pointer is valid, including the null pointer.

However, there is an inconsistency in the documentation for the unaligned read operation in the function [ptr::read_unaligned](https://doc.rust-lang.org/nightly/std/ptr/fn.read_unaligned.html)(as well as `write_unaligned`), which states:
> Note that even if T has size 0, the pointer must be non-null.

This change is also supported by [PR ](https://github.com/rust-lang/rust/pull/134912)
> the _unaligned method docs should be fixed.
2024-12-31 14:30:43 +01:00
Matthias Krüger
d08d132524
Rollup merge of - ChrisDenton:issue-70093, r=jieyouxu
Windows: Enable issue 70093 link tests

Tracking issue for `-Z link-native-libraries`: 
Tracking issue for `-Z link-directives`: 

`-Zlink-native-libraries=no` and `-Zlink-directives=no` *should* work on Windows, at least for msvc. The fly in ointment is that `default-linker-libraries` doesn't. On unixy platforms rustc calls another compiler which in turn calls the linker along with the default libraries. On MSVC rustc calls the linker directly therefore it would need to be the one to implement `default-linker-libraries`. Except it doesn't so we workaround that in the test by using `-C link-arg` to talk to the linker.
2024-12-31 14:30:43 +01:00
Matthias Krüger
3e888820bd
Rollup merge of - tbu-:pr_doc_target_fmt, r=Noratrieb
Format `build.toml` consistently in platform support docs

Also fix compiler team name in target tier docs.
2024-12-31 14:30:42 +01:00
bors
7a0cde96f8 Auto merge of - ChrisDenton:line-writer, r=tgross35
Avoid short writes in LineWriter

If the bytes written to `LineWriter` contains at least one new line but doesn't end in a new line (e.g. `"abc\ndef"`) then we:

- write up to the last new line direct to the underlying `Writer`.
- copy as many of the remaining bytes as will fit into our internal buffer.

That last step is inefficient if the remaining bytes are larger than our buffer. It will needlessly split the bytes in two, requiring at least two writes to the underlying `Writer` (one to flush the buffer, one more to write the rest). This PR skips the extra buffering if the remaining bytes are larger than the buffer.
2024-12-31 13:21:27 +00:00
Zalathar
66fd5340ea Use struct-like syntax in tool_check_step!
This tricks rustfmt into formatting the macro arguments as expressions, instead
of giving up and ignoring them.
2024-12-31 22:26:14 +11:00
Zalathar
774e83cea1 Make tool_check_step! always assume SourceType::InTree
All of the tools that use this macro are currently in-tree, so support for
specifying a `SourceType` was not meaningfully used. It can potentially be
re-added in the future if needed.
2024-12-31 22:12:59 +11:00
Zalathar
c59ccae739 Infer tool-check-step display name from the last path component 2024-12-31 22:12:59 +11:00
Zalathar
1afeeef77d Move most of the Step::run impl out of tool_check_step!
Ordinary code is much easier to work with than macro-generated code.
2024-12-31 22:12:59 +11:00
bors
aea4e43703 Auto merge of - jhpratt:rollup-vxt40of, r=jhpratt
Rollup of 3 pull requests

Successful merges:

 -  (Use python built in type annotations in LLDB visualizer scripts)
 -  (Unsafe binder support in rustdoc)
 -  (chore: fix some typos)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-12-31 10:36:06 +00:00
Jacob Pratt
77926e68d8
Rollup merge of - peicuiping:master, r=lqd
chore: fix some typos
2024-12-31 03:38:04 -05:00
Jacob Pratt
3785bc26c2
Rollup merge of - compiler-errors:rustdoc-unsafe-binders, r=camelid
Unsafe binder support in rustdoc

Adds rustdoc support for unsafe binder types: `unsafe<'a> Foo<'a>`. Doesn't add json support yet.

Tracking:
* https://github.com/rust-lang/rust/issues/130516
2024-12-31 03:38:03 -05:00
Jacob Pratt
f3d404a7be
Rollup merge of - Walnut356:type_annots, r=tgross35
Use python built in type annotations in LLDB visualizer scripts

Replaces type annotation comments with python's built-in type annotations.

Built-in type annotations were added in python 3.5. LLDB [currently recommends (and as of LLVM 21, will enforce)](https://github.com/llvm/llvm-project/pull/114807) a minimum python version of 3.8. Rust's test suite also requires python 3.10.
2024-12-31 03:38:02 -05:00
peicuiping
09541c263e chore: fix some typos
Signed-off-by: peicuiping <ezc5@sina.cn>
2024-12-31 15:11:18 +08:00
Walnut
693a0d5dcc use python built in type annotations 2024-12-31 00:53:59 -06:00
bors
41b579660c Auto merge of - Zalathar:rollup-i6g97md, r=Zalathar
Rollup of 8 pull requests

Successful merges:

 -  (bootstrap: Make `./x test compiler` actually run the compiler unit tests)
 -  (Make slice::as_flattened_mut unstably const)
 -  (ptr docs: make it clear that we are talking only about memory accesses)
 -  (explicitly set float ABI for all ARM targets)
 -  (Make sure we check the future type is `Sized` in `AsyncFn*`)
 -  (Fix typos)
 -  (compiler: Add a statement-of-intent to `rustc_abi`)
 -  (Convert some `Into` impls into `From` impls)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-12-31 05:51:35 +00:00
Michael Goulet
ea291e5b5f Account for format_args in HiddenUnicodeCodepoints lint 2024-12-31 05:03:22 +00:00