Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error messages #244

Merged
merged 1 commit into from
Aug 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# v0.3.1 (2019-08-31)
* Fix error messages ([#241](https://github.com/TeXitoi/structopt/issues/241))

# v0.3.0 (2019-08-30)

## Breaking changes
Expand Down
6 changes: 3 additions & 3 deletions structopt-derive/src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl Parse for StructOptAttr {

let check_empty_lit = |s| {
if lit_str.is_empty() {
span_error!(lit.span(), "`#[structopt({} = \"\") is deprecated in structopt 3.0, now it's default behavior", s);
span_error!(lit.span(), "`#[structopt({} = \"\") is deprecated in structopt 0.3, now it's default behavior", s);
}
};

Expand Down Expand Up @@ -130,7 +130,7 @@ impl Parse for StructOptAttr {
}

Err(_) => span_error!(name.span(),
"`#[structopt(raw(...))` attributes are deprecated in structopt 3.0, only `raw(true)` and `raw(false)` are allowed")
"`#[structopt(raw(...))` attributes are deprecated in structopt 0.3, only `raw(true)` and `raw(false)` are allowed")
}
}

Expand All @@ -154,7 +154,7 @@ impl Parse for StructOptAttr {

"version" => {
span_error!(name.span(),
"#[structopt(version)] is invalid attribute, structopt 3.0 inherits version from Cargo.toml by default, no attribute needed")
"#[structopt(version)] is invalid attribute, structopt 0.3 inherits version from Cargo.toml by default, no attribute needed")
},

_ => span_error!(name.span(), "unexpected attribute: {}", name_str),
Expand Down