rust/tests
Matthias Krüger dd49c39e02
Rollup merge of #117959 - estebank:issue-76086, r=compiler-errors
Better handle type errors involving `Self` literals

When encountering a type error involving a `Self` literal, point at the self type of the enclosing `impl` and suggest using the actual type name instead.

```
error[E0308]: mismatched types
  --> $DIR/struct-path-self-type-mismatch.rs:13:9
   |
LL |   impl<T> Foo<T> {
   |        -  ------ this is the type of the `Self` literal
   |        |
   |        found type parameter
LL |       fn new<U>(u: U) -> Foo<U> {
   |              -           ------ expected `Foo<U>` because of return type
   |              |
   |              expected type parameter
LL | /         Self {
LL | |
LL | |             inner: u
LL | |
LL | |         }
   | |_________^ expected `Foo<U>`, found `Foo<T>`
   |
   = note: expected struct `Foo<U>`
              found struct `Foo<T>`
   = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound
   = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
help: use the type name directly
   |
LL |         Foo::<U> {
   |         ~~~~~~~~
```
Fix #76086.
2023-11-17 00:41:23 +01:00
..
assembly Fix closure-inherit-target-feature test for SGX platform 2023-10-23 14:39:01 +02:00
auxiliary
codegen Auto merge of #116555 - paulmenage:llvm-module-flag, r=wesleywiser 2023-11-15 16:54:31 +00:00
codegen-units Automatically enable cross-crate inlining for small functions 2023-10-17 19:53:51 -04:00
coverage coverage: Regression test for #117788 2023-11-13 12:31:44 +11:00
coverage-run-rustdoc coverage: Rename the run-coverage test mode to coverage-run 2023-11-08 16:41:24 +11:00
debuginfo Check alignment of pointers only when read/written through 2023-11-04 13:01:32 -04:00
incremental Bless incremental tests. 2023-10-06 15:46:11 +00:00
mir-opt Auto merge of #117330 - tmiasko:custom-mir-cleanup-blocks, r=cjgillot 2023-11-14 08:53:25 +00:00
pretty Remove unnecessary CVarArgs name skipping logic 2023-10-25 17:44:17 +02:00
run-make Remove support for compiler plugins. 2023-11-04 08:50:46 +11:00
run-make-fulldeps Minimize pub usage in source_map.rs. 2023-11-02 19:35:00 +11:00
run-pass-valgrind
rustdoc Rollup merge of #117531 - fmease:rustdoc-effects-properly-elide-x-crate-host-args, r=GuillaumeGomez 2023-11-08 11:25:54 +01:00
rustdoc-gui Add GUI test to ensure that implementations on foreign types are in the expected order 2023-11-02 18:02:14 +01:00
rustdoc-js Add regression test for #115480 2023-10-11 11:41:39 +02:00
rustdoc-js-std rustdoc: update test cases for changes to the printing style 2023-09-21 15:16:44 -07:00
rustdoc-json rustdoc-json: Fix test so it actuall checks things 2023-11-09 12:13:16 +00:00
rustdoc-ui Mark Rustdoc test as Linux-only 2023-11-08 08:53:58 -05:00
ui Rollup merge of #117959 - estebank:issue-76086, r=compiler-errors 2023-11-17 00:41:23 +01:00
ui-fulldeps Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
COMPILER_TESTS.md