]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: refactor default infer vars to be its own function
authorPhilip Herron <herron.philip@googlemail.com>
Mon, 19 May 2025 16:55:53 +0000 (17:55 +0100)
committerPhilip Herron <philip.herron@embecosm.com>
Mon, 26 May 2025 18:09:16 +0000 (18:09 +0000)
commit457b3d1e29ce72bda6ac74a7c761decd657aab12
treec8f8b1dcff02aa919c220bbe14c2a3986e227b2f
parentc087dd8bb06038248917ec1968a5acfac1d1a88c
gccrs: refactor default infer vars to be its own function

This is just a simple refactor to pull all the logic outside of the
closure which makes it more readable.

gcc/rust/ChangeLog:

* typecheck/rust-hir-type-check.h: new function
* typecheck/rust-typecheck-context.cc (TypeCheckContext::compute_inference_variables):
call the new helper
(TypeCheckContext::compute_infer_var): refactored code

Signed-off-by: Philip Herron <herron.philip@googlemail.com>
gcc/rust/typecheck/rust-hir-type-check.h
gcc/rust/typecheck/rust-typecheck-context.cc