Skip to content

Commit 11a821b

Browse files
bjacotgcopybara-github
authored andcommitted
Update syn to v2.
This is a copy of #103, but copying the CL seems to not work properly, hence I reexported it. PiperOrigin-RevId: 521440221
1 parent 4b86b0c commit 11a821b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

googletest_macro/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ authors = [
2727

2828
[dependencies]
2929
quote = "1.0.21"
30-
syn = {version = "1.0.103", features = ["full"]}
30+
syn = {version = "2.0.10", features = ["full"]}
3131

3232
[lib]
3333
name = "googletest_macro"

googletest_macro/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ pub fn google_test(
8686
}
8787

8888
fn is_test_attribute(attr: &Attribute) -> bool {
89-
let Some(first_segment) = attr.path.segments.first() else {
89+
let Some(first_segment) = attr.path().segments.first() else {
9090
return false;
9191
};
92-
let Some(last_segment) = attr.path.segments.last() else {
92+
let Some(last_segment) = attr.path().segments.last() else {
9393
return false;
9494
};
9595
first_segment.ident == "rstest"
9696
&& last_segment.ident == "rstest"
97-
&& attr.path.segments.len() <= 2
97+
&& attr.path().segments.len() <= 2
9898
}

0 commit comments

Comments
 (0)