bors cb93c24bf3 Auto merge of #124157 - wutchzone:partial_eq, r=estebank
Do not add leading asterisk in the `PartialEq`

I think we should address this issue, however I am not exactly sure, if this is the right way to do it. It is related to the #123056.

Imagine the simplified code:

```rust
trait MyTrait {}

impl PartialEq for dyn MyTrait {
    fn eq(&self, _other: &Self) -> bool {
        true
    }
}

#[derive(PartialEq)]
enum Bar {
    Foo(Box<dyn MyTrait>),
}
```

On the nightly compiler, the `derive` produces invalid code with the weird error message:
```
error[E0507]: cannot move out of `*__arg1_0` which is behind a shared reference
  --> src/main.rs:11:9
   |
9  | #[derive(PartialEq)]
   |          --------- in this derive macro expansion
10 | enum Things {
11 |     Foo(Box<dyn MyTrait>),
   |         ^^^^^^^^^^^^^^^^ move occurs because `*__arg1_0` has type `Box<dyn MyTrait>`, which does not implement the `Copy` trait
   |
   = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
```

It may be related to the perfect derive problem, although requiring the _type_ to be `Copy` seems unfortunate because it is not necessary. Besides, we are adding the extra dereference only for the diagnostics?
2024-05-09 08:34:14 +00:00
..
2024-04-22 18:48:47 +02:00
2024-05-07 16:56:54 -04:00
2024-05-02 19:42:31 -04:00
2024-04-24 13:12:33 +01:00
2024-05-02 19:42:31 -04:00
2024-05-07 16:56:54 -04:00
2024-04-21 15:43:43 -03:00
2024-04-21 15:43:43 -03:00
2024-04-21 15:43:43 -03:00
2024-04-14 21:34:14 +05:30
2024-04-12 20:57:07 +00:00
2024-05-02 19:42:31 -04:00
2024-04-12 17:45:15 +01:00
2024-04-24 13:12:33 +01:00
2024-04-24 13:12:33 +01:00
2024-04-29 14:53:38 +02:00
2024-04-25 10:47:24 +08:00
2024-05-02 19:42:31 -04:00
2024-05-02 19:42:31 -04:00
2024-05-08 21:37:54 +02:00
2024-05-02 19:42:31 -04:00
2024-04-11 17:53:27 -04:00
2024-05-02 19:42:31 -04:00
2024-04-21 15:43:43 -03:00
2024-04-14 09:42:53 -04:00
2024-04-24 13:12:33 +01:00
2024-04-27 10:54:31 +03:00
2024-04-25 10:51:54 -04:00
2024-05-08 21:37:55 +02:00
2024-04-27 10:54:31 +03:00

UI Tests

This folder contains rustc's UI tests.

Test Directives (Headers)

Typically, a UI test will have some test directives / headers which are special comments that tell compiletest how to build and intepret a test.

As part of an on-going effort to rewrite compiletest (see https://github.com/rust-lang/compiler-team/issues/536), a major change proposal to change legacy compiletest-style headers // <directive> to ui_test-style headers //@ <directive> was accepted (see https://github.com/rust-lang/compiler-team/issues/512.

An example directive is ignore-test. In legacy compiletest style, the header would be written as

// ignore-test

but in ui_test style, the header would be written as

//@ ignore-test

compiletest is changed to accept only //@ directives for UI tests (currently), and will reject and report an error if it encounters any comments // <content> that may be parsed as an legacy compiletest-style test header. To fix this, you should migrate to the ui_test-style header //@ <content>.