Skip to content

Commit

Permalink
Rollup merge of rust-lang#56078 - ehuss:fix-panic-opt-msg, r=alexcric…
Browse files Browse the repository at this point in the history
…hton

Fix error message for `-C panic=xxx`.

Fixes rust-lang/cargo#6334
  • Loading branch information
GuillaumeGomez authored Nov 22, 2018
2 parents b473157 + b8da719 commit 1bc9708
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/librustc/session/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ macro_rules! options {
pub const parse_opt_uint: Option<&'static str> =
Some("a number");
pub const parse_panic_strategy: Option<&'static str> =
Some("either `panic` or `abort`");
Some("either `unwind` or `abort`");
pub const parse_relro_level: Option<&'static str> =
Some("one of: `full`, `partial`, or `off`");
pub const parse_sanitizer: Option<&'static str> =
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/panic-runtime/bad-panic-flag1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
// except according to those terms.

// compile-flags:-C panic=foo
// error-pattern:either `panic` or `abort` was expected
// error-pattern:either `unwind` or `abort` was expected

fn main() {}
2 changes: 1 addition & 1 deletion src/test/ui/panic-runtime/bad-panic-flag1.stderr
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
error: incorrect value `foo` for codegen option `panic` - either `panic` or `abort` was expected
error: incorrect value `foo` for codegen option `panic` - either `unwind` or `abort` was expected

2 changes: 1 addition & 1 deletion src/test/ui/panic-runtime/bad-panic-flag2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
// except according to those terms.

// compile-flags:-C panic
// error-pattern:requires either `panic` or `abort`
// error-pattern:requires either `unwind` or `abort`

fn main() {}
2 changes: 1 addition & 1 deletion src/test/ui/panic-runtime/bad-panic-flag2.stderr
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
error: codegen option `panic` requires either `panic` or `abort` (C panic=<value>)
error: codegen option `panic` requires either `unwind` or `abort` (C panic=<value>)

0 comments on commit 1bc9708

Please sign in to comment.