You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gccrs: check for invalid const calls during code-gen
Closure calls are not const so this is invalid. This patch fixes two bugs
1. Make the look at the parent context optional for generics
2. Ensure we look for non const calls during call expr code-gen
Fixes#3551
gcc/rust/ChangeLog:
* backend/rust-compile-expr.cc (CompileExpr::visit): add const call check
* backend/rust-compile-item.cc (CompileItem::visit): ensure we upfront compile types where
possible
* backend/rust-compile-item.h: update header
* typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): make parent ctx optional
gcc/testsuite/ChangeLog:
* rust/compile/issue-3551.rs: New test.
Signed-off-by: Philip Herron <herron.philip@googlemail.com>
0 commit comments