mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
Don't unwrap but report a fatal error for TargetDataLayout::parse.
This commit is contained in:
parent
db74e1f1e3
commit
9e3f94dabc
@ -749,7 +749,9 @@ pub fn default_configuration(sess: &Session) -> CrateConfig {
|
||||
let min_atomic_width = sess.target.target.min_atomic_width();
|
||||
let max_atomic_width = sess.target.target.max_atomic_width();
|
||||
let atomic_cas = sess.target.target.options.atomic_cas;
|
||||
let layout = TargetDataLayout::parse(&sess.target.target).unwrap();
|
||||
let layout = TargetDataLayout::parse(&sess.target.target).unwrap_or_else(|err| {
|
||||
sess.fatal(&err);
|
||||
});
|
||||
|
||||
let mut ret = FxHashSet::default();
|
||||
ret.reserve(6); // the minimum number of insertions
|
||||
|
Loading…
Reference in New Issue
Block a user