Only implement Fn* traits for extern "Rust" safe function pointers.

This commit is contained in:
Oli Scherer
2023-03-21 11:11:32 +00:00
parent 84c47b8279
commit fb9e171ab7
4 changed files with 98 additions and 2 deletions

View File

@@ -291,6 +291,9 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
return;
}
// Keep this funtion in sync with extract_tupled_inputs_and_output_from_callable
// until the old solver (and thus this function) is removed.
// Okay to skip binder because what we are inspecting doesn't involve bound regions.
let self_ty = obligation.self_ty().skip_binder();
match *self_ty.kind() {