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
The `debug_assert!` family of macros are guarded by an
`if cfg!(debug_assertions)`, _not_ a `#[cfg(debug_assertions)]`
attribute. This means that the code in the assertion is still type
checked in release mode, and using code that only exists in debug mode
will thus fail in release mode. See rust-lang/rust#62527.
Therefore, since the `shard.tid` field has a `#[cfg(debug_assertions)]`
attribute on it, it's necessary to also put that attribute on the
assertions that use that field.
cc @kleimkuhler, since you had previously asked why putting the cfg
attribute on these assertions was necessary
(#1625 (comment)). I
thought you might nbe interested in seeing the answer. :)
Signed-off-by: Eliza Weisman <[email protected]>
0 commit comments