about summary refs log tree commit diff
path: root/tests/codegen
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2024-11-28 03:14:46 +0100
committerGitHub <noreply@github.com>2024-11-28 03:14:46 +0100
commitacf48fcb9d69e7c612efbca37dc4fbf4eb8ac2a9 (patch)
treea2455ec44d83a5f07096ffc265a03a4ea4b935b9 /tests/codegen
parent09734ac3aff28e1089a1790567d25341c985af69 (diff)
parent50fb40a987746e8847091ce354b649be4a44cde1 (diff)
downloadrust-acf48fcb9d69e7c612efbca37dc4fbf4eb8ac2a9.tar.gz
rust-acf48fcb9d69e7c612efbca37dc4fbf4eb8ac2a9.zip
Rollup merge of #133368 - compiler-errors:codegen-select-unconstrained-params, r=lcnr
Delay a bug when encountering an impl with unconstrained generics in `codegen_select`

Despite its name, `codegen_select` is what powers `Instance::try_resolve`, which is used in pre-codegen contexts to try to resolve a method where possible. One place that it's used is in the "recursion MIR lint" that detects recursive MIR bodies.

If we encounter an impl in `codegen_select` that contains unconstrained generic parameters, we expect that impl to caused an error to be reported; however, there's no temporal guarantee that this error is reported *before* we call `codegen_select`. This is what a delayed bug is *for*, and this PR makes us use a delayed bug rather than asserting something about errors already having been emitted.

Fixes  #126646
Diffstat (limited to 'tests/codegen')
0 files changed, 0 insertions, 0 deletions