rust/tests
Matthias Krüger 3432d1b087
Rollup merge of #121739 - jieyouxu:loooong-typename, r=estebank
Display short types for unimplemented trait

Shortens unimplemented trait diagnostics. Now shows:

```
error[E0277]: `Option<Option<Option<...>>>` doesn't implement `std::fmt::Display`
  --> $DIR/on_unimplemented_long_types.rs:4:17
   |
LL |   pub fn foo() -> impl std::fmt::Display {
   |                   ^^^^^^^^^^^^^^^^^^^^^^ `Option<Option<Option<...>>>` cannot be formatted with the default formatter
LL |
LL | /     Some(Some(Some(Some(Some(Some(Some(Some(Some(S...
LL | |         Some(Some(Some(Some(Some(Some(Some(Some(So...
LL | |             Some(Some(Some(Some(Some(Some(Some(Som...
LL | |                 Some(Some(Some(Some(Some(Some(Some...
...  |
LL | |         ))))))))))),
LL | |     )))))))))))
   | |_______________- return type was inferred to be `Option<Option<Option<...>>>` here
   |
   = help: the trait `std::fmt::Display` is not implemented for `Option<Option<Option<...>>>`
   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.
```

I'm not 100% sure if this is desirable, or if we should just let the long types remain long. This is also kinda a short-term bandaid solution. The real long term solution is to properly migrate `rustc_trait_selection`'s error reporting to use translatable diagnostics and then properly handle type name printing.

Fixes #121687.
2024-03-02 10:09:36 +01:00
..
assembly Rename wasm32-wasi-preview2 to wasm32-wasip2 2024-02-27 10:14:45 -05:00
auxiliary
codegen Rollup merge of #120820 - CKingX:cpu-base-minimum, r=petrochenkov,ChrisDenton 2024-02-29 17:08:36 +01:00
codegen-units [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
coverage [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
coverage-run-rustdoc [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
debuginfo Use generic NonZero in tests. 2024-02-25 12:03:48 +01:00
incremental fix use of platform_intrinsics in tests 2024-02-25 08:15:44 +01:00
mir-opt Rollup merge of #121750 - Nadrieril:switchkind-if, r=matthewjasper 2024-03-01 22:38:49 +01:00
pretty Re-bless tests/pretty 2024-02-22 16:04:05 +00:00
run-make Auto merge of #113026 - jieyouxu:run-make-v2, r=bjorn3 2024-03-01 16:43:57 +00:00
run-make-fulldeps Make CodegenBackend::join_codegen infallible. 2024-02-17 10:51:35 +11:00
run-pass-valgrind [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
rustdoc Rollup merge of #121689 - GuillaumeGomez:rustdoc-highlighting-whitespace, r=notriddle 2024-02-29 00:16:59 +01:00
rustdoc-gui [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
rustdoc-js [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
rustdoc-js-std
rustdoc-json [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
rustdoc-ui Update ui tests 2024-02-29 14:43:43 +01:00
ui Rollup merge of #121739 - jieyouxu:loooong-typename, r=estebank 2024-03-02 10:09:36 +01:00
ui-fulldeps Implement missing ABI structures in StableMIR 2024-03-01 11:02:05 -08:00
COMPILER_TESTS.md