rust/tests
许杰友 Jieyou Xu (Joe) bf841c4773
Rollup merge of #126558 - jieyouxu:caller-chooses-ty, r=fmease
hir_typeck: be more conservative in making "note caller chooses ty param" note

In https://github.com/rust-lang/rust/pull/122195 I added a "caller chooses ty for type param" note for when the return expression type a.k.a. found type does not match the expected return type.

#126547 found that this note was confusing when the found return type *contains* the expected type, e.g.

```rs
fn f<T>(t: &T) -> T {
    t
}
```

because the found return type `&T` will *always* be different from the expected return type `T`, so the note was needlessly redundant and confusing.

This PR addresses that by not making the note if the found return type contains the expected return type.

r? ``@fmease`` (since you reviewed the original PR)

Fixes https://github.com/rust-lang/rust/issues/126547
2024-06-19 01:51:41 +01:00
..
assembly Add i686-unknown-redox target 2024-06-16 12:56:48 +00:00
auxiliary Clean up users of rust_dbg_call 2024-04-17 15:08:08 -04:00
codegen Apply suggestion. 2024-06-16 17:19:25 +08:00
codegen-units Detect pub structs never constructed and unused associated constants in traits 2024-06-05 23:20:09 +08:00
coverage Rollup merge of #126621 - Zalathar:test-coverage-attr, r=petrochenkov 2024-06-18 15:30:47 +02:00
coverage-run-rustdoc
crashes Auto merge of #126593 - matthiaskrgr:rollup-a5jfg7w, r=matthiaskrgr 2024-06-17 14:22:10 +00:00
debuginfo Add debuginfo tests for collapse_debuginfo for statics. 2024-06-13 16:04:31 +02:00
incremental Update tests/incremental/foreign.rs 2024-05-20 11:13:10 -04:00
mir-opt Redo SliceIndex implementations 2024-06-15 17:39:25 -07:00
pretty Auto merge of #125918 - oli-obk:const_block_ice, r=compiler-errors 2024-06-07 09:08:59 +00:00
run-make Auto merge of #126630 - GuillaumeGomez:rollup-hlwbpa2, r=GuillaumeGomez 2024-06-18 14:20:38 +00:00
run-pass-valgrind rustfmt tests/run-pass-valgrind/. 2024-06-04 09:53:02 +10:00
rustdoc Update code format and tests 2024-06-04 13:49:39 +02:00
rustdoc-gui Remove failing GUI test to stop blocking CI until it is fixed 2024-06-14 00:49:05 +02:00
rustdoc-js rustdoc-search: use lowercase, non-normalized name for type search 2024-06-09 11:56:52 -07:00
rustdoc-js-std Update tests 2024-06-07 11:55:52 +08:00
rustdoc-json rustfmt tests/rustdoc-json/. 2024-06-04 14:15:19 +10:00
rustdoc-ui Suggest standalone doctest for non-local impl defs 2024-06-15 13:00:53 +02:00
ui Rollup merge of #126558 - jieyouxu:caller-chooses-ty, r=fmease 2024-06-19 01:51:41 +01:00
ui-fulldeps Use a dedicated type instead of a reference for the diagnostic context 2024-06-18 15:42:11 +00:00
COMPILER_TESTS.md