bug! instead of panic!
This commit is contained in:
parent
a18a2900f3
commit
db7da0e476
2 changed files with 2 additions and 2 deletions
|
|
@ -344,7 +344,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M> {
|
|||
if let ConstValue::ByRef(_, allocation, _) = const_val.val {
|
||||
allocation
|
||||
} else {
|
||||
panic!("Matching on non-ByRef static")
|
||||
bug!("Matching on non-ByRef static")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1378,7 +1378,7 @@ fn maybe_check_static_with_link_section(tcx: TyCtxt, id: DefId, span: Span) {
|
|||
let alloc = if let ConstValue::ByRef(_, allocation, _) = static_.val {
|
||||
allocation
|
||||
} else {
|
||||
panic!("Matching on non-ByRef static")
|
||||
bug!("Matching on non-ByRef static")
|
||||
};
|
||||
if alloc.relocations.len() != 0 {
|
||||
let msg = "statics with a custom `#[link_section]` must be a \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue