Skip to content

Commit

Permalink
bug! instead of panic!
Browse files Browse the repository at this point in the history
  • Loading branch information
csmoe committed Sep 1, 2018
1 parent a18a290 commit db7da0e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/librustc_mir/interpret/memory.rs
Expand Up @@ -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")
}
})
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/check/mod.rs
Expand Up @@ -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 \
Expand Down

0 comments on commit db7da0e

Please sign in to comment.