diff options
| author | bors <bors@rust-lang.org> | 2023-04-24 19:56:43 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-04-24 19:56:43 +0000 |
| commit | 15ef5f552374e52ca3b578757880938e354b6cc0 (patch) | |
| tree | 0bee996e82440681d68b09e10e303d213f112308 /tests/mir-opt/lower_array_len.array_len.NormalizeArrayLen.panic-unwind.diff | |
| parent | 65ac9f4602b87e69bf17298f4cd72dc813d5554b (diff) | |
| parent | 12ba5cab112a863e63e51d56e0660d999c86b679 (diff) | |
| download | rust-15ef5f552374e52ca3b578757880938e354b6cc0.tar.gz rust-15ef5f552374e52ca3b578757880938e354b6cc0.zip | |
Auto merge of #14641 - lowr:fix/obligation-for-value-path, r=Veykril
Register obligations during path inference Fixes #14635 When we infer path expressions that resolve to some generic item, we need to consider their generic bounds. For example, when we resolve a path `Into::into` to `fn into<?0, ?1>` (note that `?0` is the self type of trait ref), we should register an obligation `?0: Into<?1>` or else their relationship would be lost. Relevant part in rustc is [`add_required_obligations_with_code()`] that's called in [`instantiate_value_path()`]. [`instantiate_value_path()`]: https://github.com/rust-lang/rust/blob/3462f79e94f466a56ddaccfcdd3a3d44dd1dda9f/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs#L1052 [`add_required_obligations_with_code()`]: https://github.com/rust-lang/rust/blob/3462f79e94f466a56ddaccfcdd3a3d44dd1dda9f/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs#L1411
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_len.NormalizeArrayLen.panic-unwind.diff')
0 files changed, 0 insertions, 0 deletions
