Commit Graph

279196 Commits

Author SHA1 Message Date
Joshua Wong
97005678c3 reduce Box::default stack copies in debug mode
The `Box::new(T::default())` implementation of `Box::default` only
had two stack copies in debug mode, compared to the current version,
which has four. By avoiding creating any `MaybeUninit<T>`'s and just writing
`T` directly to the `Box` pointer, the stack usage in debug mode remains
the same as the old version.
2025-01-26 03:48:27 -05:00
Joshua Wong
80faf20351 add test for Box::default's stack usage in debug mode 2025-01-26 03:48:27 -05:00
bors
2f0ad2a71e Auto merge of - matthiaskrgr:rollup-b5enbuz, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 -  (remove long-deprecated no-op attributes no_start and crate_id)
 -  (Improve and expand documentation of pipes)
 -  (Include missing item in the 1.81 release notes)
 -  (ports last few library files to new intrinsic style)
 -  (Improve check-cfg expected names diagnostic)
 -  (docs: fix typo in std::pin overview)
 -  (Fix typo in const stability error message)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-26 00:47:18 +00:00
Matthias Krüger
08c4d6369b
Rollup merge of - fee1-dead-contrib:push-tswyxkywqrtt, r=jieyouxu
Fix typo in const stability error message
2025-01-25 23:15:26 +01:00
Matthias Krüger
65fb6286e0
Rollup merge of - nvanbenschoten:pin-typo, r=Amanieu
docs: fix typo in std::pin overview

Unimportant fix in `std::pin` documentation.
2025-01-25 23:15:25 +01:00
Matthias Krüger
dbe911a64d
Rollup merge of - Urgau:check-cfg-allow-test-improv, r=jieyouxu
Improve check-cfg expected names diagnostic

This PR improves the check-cfg `allow-same-level` test by ~~normalizing it's output and by~~ adding more context to the test.

It also filters the well known cfgs from the `expected names are` note, as to reduce the size of the diagnostic. Users can still find the full list on the [rustc book](https://doc.rust-lang.org/nightly/rustc/check-cfg.html#well-known-names-and-values), which is reinforced for Cargo users by adding a note in the Cargo check-cfg specific section.

Fixes https://github.com/rust-lang/rust/issues/135995
r? `@jieyouxu`
2025-01-25 23:15:25 +01:00
Matthias Krüger
f14993b454
Rollup merge of - BLANKatGITHUB:library, r=RalfJung
ports last few library files to new intrinsic style

This pr ports the last 2 library files to new intrinsic style this pr is part of issue 
2025-01-25 23:15:24 +01:00
Matthias Krüger
f42163621f
Rollup merge of - ferrocene:pa-1.81-relnotes, r=Mark-Simulacrum
Include missing item in the 1.81 release notes

It was pointed out to me that when I prepared the CVE-2024-43402 fix in the stable branch, I added the release notes in the stable PR (https://github.com/rust-lang/rust/pull/129960), but I forgot to do so in the beta or nightly PR. Because of that, the relnotes line only appeared in 1.81, and disappeared afterwards.
2025-01-25 23:15:24 +01:00
Matthias Krüger
20d0f0187d
Rollup merge of - joshtriplett:pipe-docs, r=joboet
Improve and expand documentation of pipes

- Reference UNIX, not just Linux
- Simplify some of the language
- Don't imply that pipes *only* work across multiple processes; instead,
  *suggest* that they're typically used across two or more separate
  processes.
- Specify that portable applications cannot use multiple readers or
  multiple writers for messages larger than a byte, due to potential
  interleaving.

Tracking issue for anonymous pipes:
https://github.com/rust-lang/rust/issues/127154
2025-01-25 23:15:23 +01:00
Matthias Krüger
f01d418139
Rollup merge of - RalfJung:remove-dead-attrs, r=chenyukang
remove long-deprecated no-op attributes no_start and crate_id

These have emitted a deprecation warning since forever (https://github.com/rust-lang/rust/pull/64471) and they already don't do anything. In fact they [apparently](https://github.com/rust-lang/rust/pull/64471#issuecomment-531517332) have done nothing since pre-1.0, so... do we even need a crater run? Doesn't seem worth it.
2025-01-25 23:15:22 +01:00
bors
6fb03584cf Auto merge of - jyn514:linker-messages-2, r=bjorn3
Shorten linker output even more when `--verbose` is not present

- Don't show environment variables. Seeing PATH is almost never useful, and it can be extremely long.
- For .rlibs in the sysroot, replace crate hashes with a `"-*"` string. This will expand to the full crate name when pasted into the shell.
- Move `.rlib` to outside the glob.
- Abbreviate the sysroot path to `<sysroot>` wherever it appears in the arguments.

This also adds an example of the linker output as a run-make test. Currently it only runs on x86_64-unknown-linux-gnu, because each platform has its own linker arguments. So that it's stable across machines, pass BUILD_ROOT as an argument through compiletest through to run-make tests.

r? `@bjorn3`

try-job: aarch64-apple
2025-01-25 22:05:02 +00:00
jyn
c1b4ab0e73 Shorten linker output even more when --verbose is not present
- Don't show environment variables. Seeing PATH is almost never useful, and it can be extremely long.
- For .rlibs in the sysroot, replace crate hashes with a `"-*"` string. This will expand to the full crate name when pasted into the shell.
- Move `.rlib` to outside the glob.
- Abbreviate the sysroot path to `<sysroot>` wherever it appears in the arguments.

This also adds an example of the linker output as a run-make test. Currently it only runs on x86_64-unknown-linux-gnu, because each platform has its own linker arguments. So that it's stable across machines, pass BUILD_ROOT as an argument through compiletest through to run-make tests.

- Only use linker-flavor=gnu-cc if we're actually going to compare the output. It doesn't exist on MacOS.
2025-01-25 16:04:52 -05:00
Josh Triplett
687607c31e Improve and expand documentation of pipes
- Simplify some of the language
- Minor grammar fixes
- Don't imply that pipes *only* work across multiple processes; instead,
  *suggest* that they're typically used across two or more separate
  processes.
- Specify that portable applications cannot use multiple readers or
  multiple writers for messages larger than a byte, due to potential
  interleaving.
- Remove no-longer-referenced footnote URLs.
2025-01-25 22:15:54 +02:00
bors
f7cc13af82 Auto merge of - jyn514:linker-output, r=bjorn3
show linker output even if the linker succeeds

Show stderr and stderr by default, controlled by a new `linker_messages` lint.

fixes https://github.com/rust-lang/rust/issues/83436. fixes https://github.com/rust-lang/rust/issues/38206. cc https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/uplift.20some.20-Zverbose.20calls.20and.20rename.20to.E2.80.A6.20compiler-team.23706/near/408986134

<!-- try-job: dist-x86_64-msvc -->
try-job: aarch64-apple

r? `@bjorn3`
2025-01-25 17:16:33 +00:00
Deadbeef
626d3ba514 Fix typo in const stability error message 2025-01-25 21:43:22 +08:00
bors
203e6c127c Auto merge of - estebank:issue-133137, r=wesleywiser
Reword resolve errors caused by likely missing crate in dep tree

Reword label and add `help`:

```
error[E0432]: unresolved import `some_novel_crate`
 --> f704.rs:1:5
  |
1 | use some_novel_crate::Type;
  |     ^^^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `some_novel_crate`
  |
  = help: if you wanted to use a crate named `some_novel_crate`, use `cargo add some_novel_crate` to add it to your `Cargo.toml`
```

Fix .
2025-01-25 11:41:21 +00:00
Urgau
74223e4667 Refer to the well known names from Cargo check-cfg specifics doc 2025-01-25 12:37:29 +01:00
Urgau
c5ea75a5df Filter well known names from check-cfg diagnostics 2025-01-25 12:27:33 +01:00
bors
f94018810c Auto merge of - matthiaskrgr:rollup-5r1k45x, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 -  (Properly report error when object type param default references self)
 -  (Fix `FormattingOptions` instantiation with `Default`)
 -  (Rename test to `unresolvable-upvar-issue-87987.rs` and add some notes)
 -  (Fix set_name in thread mod for NuttX)
 -  (bootstrap: Handle bootstrap lockfile race condition better)
 -  (Use short ty string for move errors)
 -  (Skip suggestions in `derive`d code)
 -  (Bootstrap: Don't move ownership of job object)
 -  (fix(bootstrap): deserialize null as `f64::NAN`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-25 08:56:41 +00:00
Matthias Krüger
a330c7ee85
Rollup merge of - weihanglo:null-as-f64-nan, r=compiler-errors
fix(bootstrap): deserialize null as `f64::NAN`

When doing optimized build through opt-dist,
I've often run into errors like `invalid type: null, expected f64`.
This is likely because some f64 fields might actually bet set null.
Unfortunately, serde_json doesn't handle null <-> NaN well.

This commit addresses it by having a custom deserialize method, so null is always be deserialized to `f64:NAN`.

See:

* https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/opt-dist.3A.20.60invalid.20type.3A.20null.2C.20expect.20f64.60.20failure
* https://github.com/serde-rs/json/issues/202

r? `@Kobzol`
2025-01-25 08:03:38 +01:00
Matthias Krüger
7b16b4e4cb
Rollup merge of - ChrisDenton:py-job, r=jieyouxu
Bootstrap: Don't move ownership of job object

I've been thinking about this since the last time I looked at bootstrap's use of job objects. We currently pass ownership of the job object to Python. I feel this is unneeded complexity.

The rationale given (in a comment) is that it helps with `ctrl-c` on `x.py`. But using `ctrl-c` when running `x.py` will also cause `bootstrap.exe` to immediately exit so I don't find that convincing.
2025-01-25 08:03:38 +01:00
Matthias Krüger
06349ec2dd
Rollup merge of - estebank:issue-135989, r=compiler-errors
Skip suggestions in `derive`d code

Do not suggest

```
help: use parentheses to call these
  |
5 |     (callback: Rc<dyn Fn()>)(),
  |     +                      +++
```

Skip all "call function for this binop" suggestions when in a derive context.

Fix .
2025-01-25 08:03:37 +01:00
Matthias Krüger
2080d66a15
Rollup merge of - estebank:long-moved-type, r=jieyouxu
Use short ty string for move errors

```
error[E0382]: use of moved value: `x`
  --> bay.rs:14:14
   |
12 | fn foo(x: D) {
   |        - move occurs because `x` has type `(((..., ..., ..., ...), ..., ..., ...), ..., ..., ...)`, which does not implement the `Copy` trait
13 |     let _a = x;
   |              - value moved here
14 |     let _b = x; //~ ERROR use of moved value
   |              ^ value used here after move
   |
   = note: the full type name has been written to 'bay.long-type-14349227078439097973.txt'
   = note: consider using `--verbose` to print the full type name to the console
help: consider cloning the value if the performance cost is acceptable
   |
13 |     let _a = x.clone();
   |               ++++++++
```

Address 4th case in .
2025-01-25 08:03:37 +01:00
Matthias Krüger
6cb2820b7e
Rollup merge of - clubby789:pidfile-race, r=jieyouxu
bootstrap: Handle bootstrap lockfile race condition better

Fixes 

Tested by:
- Starting one build
- In another terminal, `echo -n '' > build/lock`
- Attempt to invoke bootstrap a second time
2025-01-25 08:03:36 +01:00
Matthias Krüger
7a79024ef4
Rollup merge of - no1wudi:master, r=thomcc
Fix set_name in thread mod for NuttX

Replace `pthread_set_name_np` with `pthread_setname_np` for NuttX in the `set_name` function, this change aligns the implementation with the correct API available on NuttX

This patch ensures thread naming works correctly on NuttX platforms.

See also:
0f9f8c91ad/src/unix/nuttx/mod.rs (L562)
8f3a2a6f76/include/pthread.h (L511-L514)
2025-01-25 08:03:35 +01:00
Matthias Krüger
eb3e1c9ee1
Rollup merge of - Zalathar:whats-upvar, r=lqd
Rename test to `unresolvable-upvar-issue-87987.rs` and add some notes

Extracted from . I had to figure out what this test was trying to test, so I might as well write it down for future reference.
2025-01-25 08:03:35 +01:00
Matthias Krüger
5c821ae4e8
Rollup merge of - nyurik:fix-fmt-options, r=joboet
Fix `FormattingOptions` instantiation with `Default`

The `fill` value by default should be set to `' '` (space), but the current implementation uses `#[derive(Default)]` which sets it to `\0`.

Note that `FormattingOptions` is being released as part of 1.85 (unstable) - so this might warrant a backport to that branch.

Tracking issue: https://github.com/rust-lang/rust/issues/118117

Follow up from https://github.com/rust-lang/rust/pull/118159

CC: ``@EliasHolzmann`` ``@programmerjake``

r? ``@m-ou-se``
2025-01-25 08:03:34 +01:00
Matthias Krüger
9ffe558455
Rollup merge of - compiler-errors:self-projection, r=fmease
Properly report error when object type param default references self

I accidentally broke this error for cases where a type parameter references `Self` via a projection (i.e. `trait Foo<Arg = Self::Bar> {}`). This PR fixes that, and also makes the error a bit easier to understand.

Fixes 
2025-01-25 08:03:33 +01:00
Nathan VanBenschoten
83c09ff3bd docs: fix typo in std::pin overview 2025-01-24 23:26:02 -07:00
bors
6365178a6b Auto merge of - clubby789:optimize-none, r=fee1-dead,WaffleLapkin
Add `#[optimize(none)]`

cc 

This extends the `optimize` attribute to add `none`, which corresponds to the LLVM `OptimizeNone` attribute.

Not sure if an MCP is required for this, happy to file one if so.
2025-01-25 05:50:36 +00:00
bors
1fc349192e Auto merge of - weihanglo:update-cargo, r=weihanglo
Update cargo

5 commits in 045bf21b36a2e1f3ed85e38278d1c3cc4305e134..cecde95c119a456c30e57d3e4b31fff5a7d83df4
2025-01-17 14:59:36 +0000 to 2025-01-24 17:15:24 +0000
- Remove unused `-C link-arg=-fuse-ld=lld` ()
- Remove `unsafe` by using `LazyLock` ()
- Print globs when workspace members can't be found ()
- Make --allow-dirty imply --allow-staged ()
- fix(config): When merging, replace rather than combining specific configuration keys ()
2025-01-25 02:43:32 +00:00
Weihang Lo
5f8bcec6c8
fix(bootstrap): deserialize null as f64::NAN
When doing optimized build through opt-dist,
I've often run into errors like `invalid type: null, expected f64`.
This is likely because some f64 fields might actually bet set null.
Unfortunately, serde_json doesn't handle null <-> NaN well.

This commit addresses it by having a custom deserialize method, so
null is always be deserialized to `f64:NAN`.

See:

* https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/opt-dist.3A.20.60invalid.20type.3A.20null.2C.20expect.20f64.60.20failure
* https://github.com/serde-rs/json/issues/202
2025-01-24 19:08:32 -05:00
bors
814ebca293 Auto merge of - matthiaskrgr:rollup-cbue0ng, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 -  (Add `File already exists` error doc to `hard_link` function)
 -  (Separate Builder methods from tcx)
 -  (document order of items in iterator from drain)
 -  (Do not assume const params are printed after type params)
 -  (Rustc dev guide subtree update)
 -  (Add memory layout documentation to generic NonZero<T>)
 -  (Use short type string in E0308 secondary span label)
 -  (Don't drop types with no drop glue when building drops for tailcalls)
 -  ([rustdoc] Fix indent of trait items on mobile)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-24 23:13:48 +00:00
Matthias Krüger
d15cf36f0c
Rollup merge of - GuillaumeGomez:fix-trait-items-mobile-indent, r=notriddle
[rustdoc] Fix indent of trait items on mobile

Before:

![Screenshot From 2025-01-24 15-38-53](https://github.com/user-attachments/assets/f7738ff8-92b6-4aca-8a66-2d3618c54572)

After:

![Screenshot From 2025-01-24 15-38-37](https://github.com/user-attachments/assets/0a19dc7e-dddd-4cd5-b087-1915e152d7c1)

Seems like we forgot them when we did . Can be tested [here](https://rustdoc.crud.net/imperio/fix-trait-items-mobile-indent/foo/trait.T.html).

r? `@notriddle`
2025-01-24 23:25:46 +01:00
Matthias Krüger
99e34a4ea0
Rollup merge of - WaffleLapkin:tailcall-nodrop, r=oli-obk
Don't drop types with no drop glue when building drops for tailcalls

this is required as otherwise drops of `&mut` refs count as a usage of a
'two-phase temporary' causing an ICE.

fixes 

The underlying issue is that the current code generates drops for `&mut` which are later counted as a second use of a two-phase temporary:

`bat t.rs -p`
```rust
#![expect(incomplete_features)]
#![feature(explicit_tail_calls)]

fn f(x: &mut ()) {
    let _y = String::new();
    become f(x);
}

fn main() {}
```
`rustc t.rs -Zdump_mir=f`
```text
error: internal compiler error: compiler/rustc_borrowck/src/borrow_set.rs:298:17: found two uses for 2-phase borrow temporary _4: bb2[1] and bb3[0]
 --> t.rs:6:5
  |
6 |     become f(x);
  |     ^^^^^^^^^^^

thread 'rustc' panicked at compiler/rustc_borrowck/src/borrow_set.rs:298:17:
Box<dyn Any>
stack backtrace:
[REDACTED]

error: aborting due to 1 previous error
```
`bat ./mir_dump/t.f.-------.renumber.0.mir -p -lrust`
```rust
// MIR for `f` 0 renumber

fn f(_1: &mut ()) -> () {
    debug x => _1;
    let mut _0: ();
    let mut _2: !;
    let _3: std::string::String;
    let mut _4: &mut ();
    scope 1 {
        debug _y => _3;
    }

    bb0: {
        StorageLive(_3);
        _3 = String::new() -> [return: bb1, unwind: bb4];
    }

    bb1: {
        FakeRead(ForLet(None), _3);
        StorageLive(_4);
        _4 = &mut (*_1);
        drop(_3) -> [return: bb2, unwind: bb3];
    }

    bb2: {
        StorageDead(_3);
        tailcall f(Spanned { node: move _4, span: t.rs:6:14: 6:15 () });
    }

    bb3 (cleanup): {
        drop(_4) -> [return: bb4, unwind terminate(cleanup)];
    }

    bb4 (cleanup): {
        resume;
    }
}
```

Note how `_4 is moved into the tail call in `bb2` and dropped in `bb3`.

This PR adds a check that the locals we drop need dropping.

r? `@oli-obk` (feel free to reassign, I'm not sure who would be a good reviewer, but thought you might have an idea)
cc `@beepster4096,` since you wrote the original drop implementation.
2025-01-24 23:25:46 +01:00
Matthias Krüger
8824ae6a6c
Rollup merge of - estebank:shorten-ty, r=davidtwco
Use short type string in E0308 secondary span label

We were previously printing the full type on the "this expression has type" label.

```
error[E0308]: mismatched types
  --> $DIR/secondary-label-with-long-type.rs:8:9
   |
LL |     let () = x;
   |         ^^   - this expression has type `((..., ..., ..., ...), ..., ..., ...)`
   |         |
   |         expected `((..., ..., ..., ...), ..., ..., ...)`, found `()`
   |
   = note:  expected tuple `((..., ..., ..., ...), ..., ..., ...)`
           found unit type `()`
   = note: the full type name has been written to '$TEST_BUILD_DIR/diagnostic-width/secondary-label-with-long-type/secondary-label-with-long-type.long-type-3987761834644699448.txt'
   = note: consider using `--verbose` to print the full type name to the console
```

Reported in a comment of .
2025-01-24 23:25:45 +01:00
Matthias Krüger
884ec6b4ab
Rollup merge of - carlsverre:master, r=joboet
Add memory layout documentation to generic NonZero<T>

The documentation I've added is based on the same Layout documentation that appears on the other `NonZero*` types. For example see [the Layout docs on `NonZeroI8`](https://doc.rust-lang.org/std/num/type.NonZeroI8.html#layout-1).
2025-01-24 23:25:44 +01:00
Matthias Krüger
dcd43d3896
Rollup merge of - Kobzol:rustc-push, r=jieyouxu
Rustc dev guide subtree update

r? ``@ghost``
2025-01-24 23:25:44 +01:00
Matthias Krüger
ca5fa664ae
Rollup merge of - compiler-errors:param-ordering, r=davidtwco
Do not assume const params are printed after type params

Fixes 
2025-01-24 23:25:43 +01:00
Matthias Krüger
575081564d
Rollup merge of - hkBst:patch-8, r=joboet
document order of items in iterator from drain

fixes 
2025-01-24 23:25:43 +01:00
Matthias Krüger
1e454fe725
Rollup merge of - EnzymeAD:refactor-codgencx, r=oli-obk
Separate Builder methods from tcx

As part of the autodiff upstreaming we noticed, that it would be nice to have various builder methods available without the TypeContext, which prevents the normal CodegenCx to be passed around between threads.
We introduce a SimpleCx which just owns the llvm module and llvm context, to encapsulate them.
The previous CodegenCx now implements deref and forwards access to the llvm module or context to it's SimpleCx sub-struct. This gives us a bit more flexibility, because now we can pass (or construct) the SimpleCx in locations where we don't have enough information to construct a CodegenCx, or are not able to pass it around due to the tcx lifetimes (and it not implementing send/sync).

This also introduces an SBuilder, similar to the SimpleCx. The SBuilder uses a SimpleCx, whereas the existing Builder uses the larger CodegenCx. I will push updates to make  implementations generic (where possible) to be implemented once and work for either of the two. I'll also clean up the leftover code.

`call` is a bit tricky, because it requires a tcx, I probably need to duplicate it after all.

Tracking:

- https://github.com/rust-lang/rust/issues/124509
2025-01-24 23:25:42 +01:00
Matthias Krüger
0741cc0ea7
Rollup merge of - Harshit933:hard-link-error, r=ChrisDenton
Add `File already exists` error doc to `hard_link` function

## Description
If the link path already exists, the error `AlreadyExists` is returned. This commit adds this error to the docs.

I tested it with the current rust master version, this error was returned when there is already a link for the file is present.
This was the error returned:
```
[harshit:../Desktop/rust_compiler_testing/hard_link (master|…5)] cargo +stage1 run
   Compiling hard_link v0.1.0 (/home/harshit/Desktop/rust_compiler_testing/hard_link)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.12s
     Running `target/debug/hard_link`
Err(Os { code: 17, kind: AlreadyExists, message: "File exists" })
```
This is my first PR on rust, any suggestions on which issue I can take next are most welcome 😄

Fixes 
2025-01-24 23:25:41 +01:00
Esteban Küber
8873c1871a Skip suggestions in derived code
Do not suggest

```
help: use parentheses to call these
  |
5 |     (callback: Rc<dyn Fn()>)(),
  |     +                      +++
```

Skip all "call function for this binop" suggestions when in a derive context.

Fix .
2025-01-24 22:08:39 +00:00
Chris Denton
ab7793d4d4
Don't move ownership of job object 2025-01-24 22:05:30 +00:00
Manuel Drehwald
386c233858 Make CodegenCx and Builder generic
Co-authored-by: Oli Scherer <github35764891676564198441@oli-obk.de>
2025-01-24 16:05:26 -05:00
Weihang Lo
06e9102ee1
Update cargo 2025-01-24 14:56:20 -05:00
clubby789
5ac95a5c47 Rename OptimizeAttr::None to Default 2025-01-24 19:34:01 +00:00
bors
1e9b0177da Auto merge of - matthiaskrgr:rollup-j6ge32r, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 -  (coverage: Prepare for upcoming changes to counter creation)
 -  (Implement `needs-subprocess` directive, and cleanup a bunch of tests to use `needs-{subprocess,threads}`)
 -  (Tidy Python improvements)
 -  (Make `Vec::pop_if` a bit more presentable)
 -  ([AIX] Allow different sized load and store in `tests/assembly/powerpc64-struct-abi.rs`)
 -  (Doc difference between extend and extend_from_slice)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-24 19:04:36 +00:00
Waffle Lapkin
9b82f20261
bless miri test
I'm not sure why the span improved but that's nice!
2025-01-24 19:37:40 +01:00
Esteban Küber
91b759354c Use short ty string for move errors
```
error[E0382]: use of moved value: `x`
  --> bay.rs:14:14
   |
12 | fn foo(x: D) {
   |        - move occurs because `x` has type `(((..., ..., ..., ...), ..., ..., ...), ..., ..., ...)`, which does not implement the `Copy` trait
13 |     let _a = x;
   |              - value moved here
14 |     let _b = x; //~ ERROR use of moved value
   |              ^ value used here after move
   |
   = note: the full type name has been written to 'bay.long-type-14349227078439097973.txt'
   = note: consider using `--verbose` to print the full type name to the console
help: consider cloning the value if the performance cost is acceptable
   |
13 |     let _a = x.clone();
   |               ++++++++
```
2025-01-24 18:12:56 +00:00