Files
rust/tests/ui
Matthias Krüger 893a5d2b32 Rollup merge of #113353 - compiler-errors:select-better, r=lcnr
Implement selection for `Unsize` for better coercion behavior

In order for much of coercion to succeed, we need to be able to deal with partial ambiguity of `Unsize` traits during selection. However, I pessimistically implemented selection in the new trait solver to just bail out with ambiguity if it was a built-in impl:
https://github.com/rust-lang/rust/blob/9227ff28aff55b252314076fcf21c9a66f10ac1e/compiler/rustc_trait_selection/src/solve/eval_ctxt/select.rs#L126

This implements a proper "rematch" procedure for dealing with built-in `Unsize` goals, so that even if the goal is ambiguous, we are able to get nested obligations which are used in the coercion selection-like loop:
https://github.com/rust-lang/rust/blob/9227ff28aff55b252314076fcf21c9a66f10ac1e/compiler/rustc_hir_typeck/src/coercion.rs#L702

Second commit just moves a `resolve_vars_if_possible` call to fix a bug where we weren't detecting a trait upcasting to occur.

r? ``@lcnr``
2023-07-13 12:19:22 +02:00
..
2023-01-30 20:12:19 +00:00
2023-01-15 19:46:20 +00:00
2023-05-24 19:35:59 -03:00
2023-05-30 12:40:35 +02:00
2023-05-30 13:03:40 +02:00
2023-04-03 09:24:11 +02:00
2023-05-08 17:58:01 -03:00
2023-05-08 17:58:01 -03:00
2023-07-03 09:12:15 +02:00
2023-01-30 20:12:19 +00:00
2023-06-19 20:00:41 +00:00
2023-06-10 14:46:11 -04:00
2023-05-25 17:40:46 +00:00
2023-07-10 20:09:28 +00:00
2023-04-29 13:01:46 +01:00
2023-07-01 02:28:15 -04:00
2023-06-29 16:24:07 +03:00
2023-06-26 08:56:32 +00:00
2023-04-03 09:24:11 +02:00
2023-05-05 14:58:52 -07:00
2023-06-06 18:43:20 +00:00
2023-04-19 19:13:45 +00:00
2023-04-13 22:10:26 -05:00
2023-06-20 19:46:01 -04:00
2023-05-08 03:36:30 +00:00
2023-05-29 12:07:41 -03:00
2023-03-29 18:04:44 -04:00
2023-07-01 15:15:22 -04:00
2023-04-26 21:02:56 +02:00
2023-06-12 20:24:48 +08:00
2023-04-29 13:01:46 +01:00
2023-05-12 00:10:52 +00:00
2023-01-15 19:46:20 +00:00
2023-01-15 19:46:20 +00:00
2023-03-08 00:00:18 +00:00
2023-04-13 22:10:26 -05:00
2023-04-13 22:10:26 -05:00
2023-03-08 00:00:18 +00:00
2023-03-08 00:00:18 +00:00