rust/tests
Matthias Krüger 194d52cc18
Rollup merge of #108254 - Nathan-Fenner:nathanf/error-span-ref-trait-refine, r=WaffleLapkin
Refine error span for trait error into borrowed expression

Extends the error span refinement in #106477 to drill into borrowed expressions just like tuples/struct/enum literals. For example,

```rs
trait Fancy {}
trait Good {}
impl <'a, T> Fancy for &'a T where T: Good {}
impl <S> Good for Option<S> where S: Iterator {}

fn want_fancy<F>(f: F) where F: Fancy {}

fn example() {
    want_fancy(&Some(5));
//  (BEFORE)   ^^^^^^^^ `{integer}` is not an iterator
//  (AFTER)          ^  `{integer}` is not an iterator
}
```

Existing heuristics try to find the right part of the expression to "point at"; current heuristics look at e.g. struct constructors and tuples. This PR adds a new check for borrowed expressions when looking into a borrowed type.
2023-02-20 22:12:18 +01:00
..
assembly Update the minimum external LLVM to 14 2023-02-10 16:06:25 -08:00
auxiliary
codegen Auto merge of #107921 - cjgillot:codegen-overflow-check, r=tmiasko 2023-02-19 18:17:26 +00:00
codegen-units
debuginfo Upgrade mingw-w64 on CI 2023-01-29 13:01:06 +01:00
incremental
mir-opt Replace _with_overflow instrinsics in LowerIntrinsics. 2023-02-18 21:45:10 +00:00
pretty Update tests. 2023-01-29 20:19:26 +01:00
run-make Auto merge of #105601 - BelovDV:change-rlib-with-not-stable, r=petrochenkov 2023-02-12 07:15:27 +00:00
run-make-fulldeps Remove save-analysis. 2023-02-16 15:14:45 +11:00
run-pass-valgrind
rustdoc Rollup merge of #108241 - GuillaumeGomez:fix-reexported-macro-handling, r=notriddle 2023-02-20 22:12:17 +01:00
rustdoc-gui Rollup merge of #107783 - notriddle:notriddle/item-table-ul, r=GuillaumeGomez 2023-02-19 13:03:41 +05:30
rustdoc-js rustdoc: update test cases to match with stricter match criteria 2023-01-21 00:11:39 -07:00
rustdoc-js-std rustdoc: hide reference methods in search index 2023-02-16 17:21:57 -07:00
rustdoc-json Add regression test for #107677 2023-02-18 18:28:17 +01:00
rustdoc-ui Only include stable lints in rustdoc::all group 2023-02-19 22:05:58 -08:00
ui Rollup merge of #108254 - Nathan-Fenner:nathanf/error-span-ref-trait-refine, r=WaffleLapkin 2023-02-20 22:12:18 +01:00
ui-fulldeps Forbid #[suggestion_*(...)] on Vecs 2023-02-01 21:49:45 +01:00
COMPILER_TESTS.md