The call_func_with_field! macro uses dead code willingly to infer
the appropriate type. This has started adding a new warning:
error: unused variable: `value__`
79 | break phantom__(&{ let value__: $typ; value__.$($field).+ })
So shut it up together with the existing unreachable_code warning.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
($func:expr, $typ:ty, $($field:tt).+) => {
$func(loop {
#![allow(unreachable_code)]
+ #![allow(unused_variables)]
const fn phantom__<T>(_: &T) -> ::core::marker::PhantomData<T> { ::core::marker::PhantomData }
// Unreachable code is exempt from checks on uninitialized values.
// Use that trick to infer the type of this PhantomData.