privacy: visibility: Assert on module stack instead
Co-authored-by: philberty <philip.herron@embecosm.com>
This commit is contained in:
parent
3e3c0660cb
commit
c3a81139f7
|
@ -69,8 +69,7 @@ VisibilityResolver::peek_module ()
|
|||
{
|
||||
// We're always inserting a top module - the crate
|
||||
// But we have to check otherwise `.back()` is UB
|
||||
if (module_stack.empty ())
|
||||
gcc_unreachable ();
|
||||
rust_assert (!module_stack.empty ());
|
||||
|
||||
return module_stack.back ();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue