Skip to content

Commit b57dde1

Browse files
CreepySkeletonTeXitoi
authored andcommitted
Update dependencies (#227)
1 parent 8830771 commit b57dde1

File tree

74 files changed

+142
-14
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+142
-14
lines changed

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ matrix:
66
- rust: stable
77
- rust: beta
88
- rust: nightly
9-
- rust: nightly
10-
env: FEATURES="--features nightly"
119
- rust: stable
1210
env: RUN=FMT
1311
before_script: rustup component add rustfmt-preview

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ readme = "README.md"
1313

1414
[features]
1515
default = ["clap/default"]
16-
nightly = ["structopt-derive/nightly"]
1716
suggestions = ["clap/suggestions"]
1817
color = ["clap/color"]
1918
wrap_help = ["clap/wrap_help"]
@@ -33,5 +32,6 @@ structopt-derive = { path = "structopt-derive", version = "0.3.0" }
3332

3433
[dev-dependencies]
3534
trybuild = "1.0.5"
35+
version_check = "0.9"
3636

3737
[workspace]

structopt-derive/Cargo.toml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,13 @@ license = "Apache-2.0/MIT"
1414
travis-ci = { repository = "TeXitoi/structopt" }
1515

1616
[dependencies]
17-
syn = { version = "0.15.10", features = ["full"] }
18-
quote = "0.6"
19-
proc-macro2 = "0.4"
20-
heck = "^0.3.0"
21-
proc-macro-error = "0.1"
17+
syn = { version = "1", features = ["full"] }
18+
quote = "1"
19+
proc-macro2 = "1"
20+
heck = "0.3.0"
21+
proc-macro-error = "0.2"
2222

2323
[features]
24-
nightly = ["proc-macro2/nightly"]
2524
paw = []
2625

2726
[lib]

structopt-derive/src/attrs.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ impl Attrs {
295295
.iter()
296296
.filter_map(|attr| {
297297
if attr.path.is_ident("doc") {
298-
attr.interpret_meta()
298+
attr.parse_meta().ok()
299299
} else {
300300
None
301301
}
@@ -304,10 +304,10 @@ impl Attrs {
304304
use crate::Lit::*;
305305
use crate::Meta::*;
306306
if let NameValue(MetaNameValue {
307-
ident, lit: Str(s), ..
307+
path, lit: Str(s), ..
308308
}) = attr
309309
{
310-
if ident != "doc" {
310+
if !path.is_ident("doc") {
311311
return None;
312312
}
313313
let value = s.value();

structopt-derive/src/parse.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ pub fn parse_structopt_attributes(all_attrs: &[Attribute]) -> Vec<StructOptAttr>
193193
.iter()
194194
.filter(|attr| attr.path.is_ident("structopt"))
195195
.flat_map(|attr| {
196-
let attrs: StructOptAttributes = parse2(attr.tts.clone())
196+
let attrs: StructOptAttributes = parse2(attr.tokens.clone())
197197
.map_err(|e| match &*e.to_string() {
198198
// this error message is misleading and points to Span::call_site()
199199
// so we patch it with something meaningful

tests/macro-errors.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,19 @@
55
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
66
// option. This file may not be copied, modified, or distributed
77

8+
extern crate version_check;
9+
use version_check::Version;
10+
811
#[test]
912
fn ui() {
1013
let t = trybuild::TestCases::new();
11-
t.compile_fail("tests/ui/*.rs");
14+
15+
t.compile_fail("tests/ui-common/*.rs");
16+
17+
let version = Version::read().unwrap();
18+
if version.at_least("1.39.0") {
19+
t.compile_fail("tests/ui-1.39_post/*.rs");
20+
} else {
21+
t.compile_fail("tests/ui-pre_1.39/*.rs");
22+
}
1223
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
error: Option<Option<T>> type is meaningless for positional argument
2+
--> $DIR/opt_opt_nonpositional.rs:14:8
3+
|
4+
14 | n: Option<Option<u32>>,
5+
| ^^^^^^^^^^^^^^^^^^^
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
error: Option<Vec<T>> type is meaningless for positional argument
2+
--> $DIR/opt_vec_nonpositional.rs:14:8
3+
|
4+
14 | n: Option<Vec<u32>>,
5+
| ^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)