Without handling the default case in the switch statement gcc 10.2.1 will warn:
rust-hir-path-probe.h:75:40: warning: ‘candidate_type’ may be used uninitialized in this function [-Wmaybe-uninitialized] --- gcc/rust/typecheck/rust-hir-path-probe.h | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/rust/typecheck/rust-hir-path-probe.h b/gcc/rust/typecheck/rust-hir-path-probe.h index 87c96628118..22b10741094 100644 --- a/gcc/rust/typecheck/rust-hir-path-probe.h +++ b/gcc/rust/typecheck/rust-hir-path-probe.h @@ -260,6 +260,7 @@ private: break; case TraitItemReference::TraitItemType::ERROR: + default: gcc_unreachable (); break; } -- 2.32.0 -- Gcc-rust mailing list Gcc-rust@gcc.gnu.org https://gcc.gnu.org/mailman/listinfo/gcc-rust