rust/tests
Matthias Krüger 48a0d038fa
Rollup merge of #113005 - compiler-errors:dont-query-normalize, r=cjgillot
Don't call `query_normalize` when reporting similar impls

Firstly, It's sketchy to be using `query_normalize` at all during HIR typeck -- it's asking for an ICE 😅. Secondly, we're normalizing an impl trait ref that potentially has parameter types in `ty::ParamEnv::empty()`, which is kinda sketchy as well.

The only UI test change from removing this normalization is that we don't evaluate anonymous constants in impls, which end up giving us really ugly suggestions:

```
error[E0277]: the trait bound `[X; 35]: Default` is not satisfied
 --> /home/gh-compiler-errors/test.rs:4:5
  |
4 |     <[X; 35] as Default>::default();
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Default` is not implemented for `[X; 35]`
  |
  = help: the following other types implement trait `Default`:
            &[T]
            &mut [T]
            [T; 32]
            [T; core::::array::{impl#30}::{constant#0}]
            [T; core::::array::{impl#31}::{constant#0}]
            [T; core::::array::{impl#32}::{constant#0}]
            [T; core::::array::{impl#33}::{constant#0}]
            [T; core::::array::{impl#34}::{constant#0}]
          and 27 others
```

So just fold the impls with a `BottomUpFolder` that calls `ty::Const::eval`. This doesn't work totally correctly with generic-const-exprs, but it's fine for stable code, and this is error reporting after all.
2023-07-08 20:53:27 +02:00
..
assembly remove box_free and replace with drop impl 2023-06-16 13:41:06 -07:00
auxiliary
codegen Auto merge of #112516 - erikdesjardins:loop, r=davidtwco 2023-06-27 15:01:56 +00:00
codegen-units
debuginfo Add multiple borrow test. 2023-05-13 10:32:32 +00:00
incremental Implement custom diagnostic for ConstParamTy 2023-06-01 18:21:42 +00:00
mir-opt Rename adjustment::PointerCast and variants using it to PointerCoercion 2023-07-07 18:17:16 +02:00
pretty Rollup merge of #111042 - Zalathar:no-coverage, r=wesleywiser 2023-05-01 17:10:24 +02:00
run-coverage Re-bless the newly-migrated tests 2023-06-28 11:09:19 +10:00
run-coverage-rustdoc Re-bless the newly-migrated tests 2023-06-28 11:09:19 +10:00
run-make Auto merge of #113040 - Kobzol:llvm-remark-streamer, r=tmiasko 2023-07-02 12:48:44 +00:00
run-make-fulldeps Provide more context for rustc +nightly -Zunstable-options on stable 2023-06-27 23:23:33 +08:00
run-pass-valgrind
rustdoc Rollup merge of #113058 - GuillaumeGomez:improve-code-comments, r=notriddle 2023-06-27 07:01:32 +02:00
rustdoc-gui Rollup merge of #113285 - GuillaumeGomez:display-long-inline-cfg, r=notriddle 2023-07-03 18:46:14 +02:00
rustdoc-js Auto merge of #112233 - notriddle:notriddle/search-unify, r=GuillaumeGomez 2023-06-15 03:04:46 +00:00
rustdoc-js-std Auto merge of #108537 - GuillaumeGomez:rustdoc-search-whitespace-as-separator, r=notriddle 2023-07-02 18:49:29 +00:00
rustdoc-json Serialize all enums as externally tagged to guarantee compatibility with binary formats such as bincode or postcard 2023-05-22 18:22:08 +01:00
rustdoc-ui rustdoc: get unnormalized link destination for suggestions 2023-05-26 18:38:46 -07:00
ui Rollup merge of #113005 - compiler-errors:dont-query-normalize, r=cjgillot 2023-07-08 20:53:27 +02:00
ui-fulldeps Bless ui-fulldeps/missing-rustc-driver-error 2023-07-03 14:27:23 -07:00
COMPILER_TESTS.md