Commit Graph

3545 Commits

Author SHA1 Message Date
openharmony_ci
fad3a1d3f5
!8 syn 1.0.107升级至2.0.48
Merge pull request !8 from Future/new4
2024-04-08 15:02:37 +00:00
徐未来
76b407eb79 syn 1.0.107升级至2.0.48
Signed-off-by: 徐未来 <xuweilai2@huawei.com>
2024-04-02 16:51:27 +08:00
openharmony_ci
8a43a55e67
!7 回退 'Pull Request !6 : syn 1.0.107升级至2.0.48'
Merge pull request !7 from openharmony_ci/revert-merge-6-master
2024-04-02 03:39:29 +00:00
openharmony_ci
e4c68997d9
回退 'Pull Request !6 : syn 1.0.107升级至2.0.48' 2024-04-02 03:27:54 +00:00
openharmony_ci
e009bb939f
!6 syn 1.0.107升级至2.0.48
Merge pull request !6 from Future/new1
2024-04-02 01:45:08 +00:00
徐未来
20f0300a69 syn 1.0.107升级至2.0.48
Signed-off-by: 徐未来 <xuweilai2@huawei.com>
2024-04-01 20:47:12 +08:00
openharmony_ci
b762ffaa9c
!5 回退 'Pull Request !4 : syn 1.0.107升级至2.0.48'
Merge pull request !5 from openharmony_ci/revert-merge-4-master
2024-04-01 12:17:24 +00:00
openharmony_ci
cf68197ecf
回退 'Pull Request !4 : syn 1.0.107升级至2.0.48' 2024-04-01 12:11:54 +00:00
hhj
b931b0ae2a
!4 syn 1.0.107升级至2.0.48
Merge pull request !4 from Future/master
2024-04-01 11:31:37 +00:00
徐未来
f138b90acb syn 1.0.107升级至2.0.48
Signed-off-by: 徐未来 <xuweilai2@huawei.com>
2024-03-08 17:26:00 +08:00
openharmony_ci
295076b475
!2 Add OAT.xml and README.OpenSource
Merge pull request !2 from fangting/master
2023-04-14 08:10:45 +00:00
fangting
50ca1e86cb Add OAT.xml and README.OpenSource
Signed-off-by: fangting <fangting12@huawei.com>
2023-04-14 14:15:27 +08:00
openharmony_ci
9abdaddb10
!1 [syn]Add GN Build Files and Custom Modifications to Rust Third-party Libraries
Merge pull request !1 from lubinglun/master
2023-04-13 11:34:21 +00:00
lubinglun
ae9e8d79a3 Add GN Build Files and Custom Modifications
Issue:https://gitee.com/openharmony/build/issues/I6UFTP
Signed-off-by: lubinglun <lubinglun@huawei.com>
2023-04-12 17:27:08 +08:00
David Tolnay
4168f6bbdf
Release 1.0.107 2022-12-18 08:56:42 -08:00
David Tolnay
d8690f212e
Opt out -Zrustdoc-scrape-examples on docs.rs
I'd like a chance to audit all the code that rustdoc is inserting into
the docs. Currently I am skeptical that showing syn's internal usages of
APIs is a net benefit to the public documentation. I am also skeptical
that quite so many examples are needed, and that they should be featured
so prominently in comparison to handwritten docs. Lastly I wish there
were a way to turn this behavior off on a more granular basis.
2022-12-18 08:49:21 -08:00
David Tolnay
5306cdeb5f
Release 1.0.106 2022-12-17 12:03:30 -08:00
David Tolnay
6db337ce63
Update build status badge 2022-12-17 12:02:54 -08:00
David Tolnay
876a605f75
Merge pull request #1251 from dtolnay/instaloop
Fix invalid use of insta snapshot inside a loop
2022-12-03 13:28:05 -08:00
David Tolnay
65e0e4248e
Fix invalid use of insta snapshot inside a loop 2022-12-03 13:16:17 -08:00
David Tolnay
1d0902414b
Update test suite to nightly-2022-12-03 2022-12-02 18:51:37 -08:00
David Tolnay
998e86375b
Release 1.0.105 2022-11-30 23:51:49 -08:00
David Tolnay
02e2a2190b
Merge pull request #1247 from dtolnay/punctdrop
Infer may_dangle on type parameters of Punctuated iterator Drop impls
2022-11-30 23:44:48 -08:00
David Tolnay
9113ad0887
Help infer may_dangle on type parameter of Punctuated iterator Drop impls 2022-11-30 23:30:51 -08:00
David Tolnay
3eaa443c3a
Add regression test for issue 1246
error[E0505]: cannot move out of `p` because it is borrowed
      --> tests/test_iterators.rs:56:18
       |
    54 |     for element in &p {
       |                    --
       |                    |
       |                    borrow of `p` occurs here
       |                    a temporary with access to the borrow is created here ...
    55 |         if *element == 2 {
    56 |             drop(p);
       |                  ^ move out of `p` occurs here
    ...
    59 |     }
       |     - ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `syn::punctuated::Iter<'_, i32>`

    error[E0505]: cannot move out of `p` because it is borrowed
      --> tests/test_iterators.rs:64:18
       |
    62 |     for element in &mut p {
       |                    ------
       |                    |
       |                    borrow of `p` occurs here
       |                    a temporary with access to the borrow is created here ...
    63 |         if *element == 2 {
    64 |             drop(p);
       |                  ^ move out of `p` occurs here
    ...
    67 |     }
       |     - ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `syn::punctuated::IterMut<'_, i32>`
2022-11-30 22:37:38 -08:00
David Tolnay
17f9a5c566
Merge pull request #1245 from dtolnay/bounds
Improve dyn/impl-related parse errors
2022-11-30 22:11:53 -08:00
David Tolnay
db874ddf9b
Improve dyn/impl-related parse errors 2022-11-30 22:01:54 -08:00
David Tolnay
b8b0761cb8
Move TypeParamBound parse loop to associated function 2022-11-30 21:50:15 -08:00
David Tolnay
3e915e5c98
Clean up naming in rustc syntax tree manipulation 2022-11-28 19:15:42 -08:00
David Tolnay
ecacc475dd
Import token::Lit now there's no conflict with MetaItemLit 2022-11-28 19:11:45 -08:00
David Tolnay
2647b2a189
Update test suite to nightly-2022-11-29 2022-11-28 19:10:13 -08:00
David Tolnay
78fa618e96
Release 1.0.104 2022-11-27 17:42:18 -08:00
David Tolnay
e054b03a3b
Merge pull request #1244 from dtolnay/isnone
Make PathArguments::is_none() public
2022-11-27 17:41:41 -08:00
David Tolnay
3a0406db04
Make PathArguments::is_none() public 2022-11-27 17:32:31 -08:00
David Tolnay
ac1dbf5d85
Time out workflows after 45 minutes
GitHub's default timeout is 6 hours. Recently some of my GitHub Actions
jobs have started randomly stalling for that long, which is inconvenient
because it ties up a chunk of my runner quota. It apepars to be very
rare for a job to recover after stalling. It's better to time out
quicker and retry on a different runner.
2022-11-25 18:56:19 -08:00
David Tolnay
f510eb0ba9
Update test suite to nightly-2022-11-25 2022-11-24 18:53:32 -08:00
David Tolnay
20087fc51c
Update test suite to nightly-2022-11-24 2022-11-23 19:49:39 -08:00
David Tolnay
dbc86fe1ed
Suppress "emit":"dep-info" json from syn-test-suite-feature-check
Previously:

    NOTE:  use --release
      Syn's test suite has some tests that run on every source file
      and test case in the rust-lang/rust repo, which can be pretty
      slow in debug mode. Consider running cargo test with `--release`
      to speed things up.
    {"artifact":"/git/syn/target/debug/deps/syn_test_suite-695bcafef2321389.d","emit":"dep-info"}
2022-11-22 22:47:28 -08:00
David Tolnay
1e8227295e
Fix renamed let_underscore_drop lint
warning: lint `clippy::let_underscore_drop` has been renamed to `let_underscore_drop`
       --> src/lib.rs:270:5
        |
    270 |     clippy::let_underscore_drop,
        |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `let_underscore_drop`
        |
        = note: `#[warn(renamed_and_removed_lints)]` on by default

    warning: lint `clippy::let_underscore_drop` has been renamed to `let_underscore_drop`
      --> tests/crates/main.rs:13:10
       |
    13 | #![allow(clippy::let_underscore_drop)]
       |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `let_underscore_drop`
       |
       = note: `#[warn(renamed_and_removed_lints)]` on by default

    warning: lint `clippy::let_underscore_drop` has been renamed to `let_underscore_drop`
     --> tests/features/macro/lib.rs:1:10
      |
    1 | #![allow(clippy::let_underscore_drop, clippy::toplevel_ref_arg)]
      |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `let_underscore_drop`
      |
      = note: `#[warn(renamed_and_removed_lints)]` on by default

    warning: lint `clippy::let_underscore_drop` has been renamed to `let_underscore_drop`
     --> tests/regression.rs:1:10
      |
    1 | #![allow(clippy::let_underscore_drop)]
      |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `let_underscore_drop`
      |
      = note: `#[warn(renamed_and_removed_lints)]` on by default
2022-11-22 22:38:08 -08:00
David Tolnay
754236dbe6
Update test suite to nightly-2022-11-23 2022-11-22 22:36:23 -08:00
David Tolnay
4245c41f22
Update test suite to nightly-2022-11-19 2022-11-18 22:11:00 -08:00
David Tolnay
1043106dc8
Update test suite to nightly-2022-11-18 2022-11-17 23:10:59 -08:00
David Tolnay
df8b10aa64
Update test suite to nightly-2022-11-13 2022-11-12 21:32:46 -08:00
David Tolnay
4c0ddcc84c
Ignore items_after_statements pedantic clippy lint
error: adding items after statements is confusing, since items exist from the start of the scope
       --> src/error.rs:139:9
        |
    139 | /         fn new(span: Span, message: String) -> Error {
    140 | |             Error {
    141 | |                 messages: vec![ErrorMessage {
    142 | |                     start_span: ThreadBound::new(span),
    ...   |
    146 | |             }
    147 | |         }
        | |_________^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements
        = note: `-D clippy::items-after-statements` implied by `-D clippy::pedantic`

    error: adding items after statements is confusing, since items exist from the start of the scope
       --> src/error.rs:167:9
        |
    167 | /         fn new_spanned(tokens: TokenStream, message: String) -> Error {
    168 | |             let mut iter = tokens.into_iter();
    169 | |             let start = iter.next().map_or_else(Span::call_site, |t| t.span());
    170 | |             let end = iter.last().map_or(start, |t| t.span());
    ...   |
    177 | |             }
    178 | |         }
        | |_________^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements

    error: adding items after statements is confusing, since items exist from the start of the scope
       --> src/error.rs:301:5
        |
    301 | /     fn new2(start: Span, end: Span, message: String) -> Error {
    302 | |         Error {
    303 | |             messages: vec![ErrorMessage {
    304 | |                 start_span: ThreadBound::new(start),
    ...   |
    308 | |         }
    309 | |     }
        | |_____^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements
2022-10-24 21:54:47 -07:00
David Tolnay
f4c1822b93
Move code of Error functions to non-generic functions 2022-10-24 21:52:01 -07:00
David Tolnay
4510c1b1ef
Resolve needless_borrow pedantic clippy lint
error: the borrowed expression implements the required traits
       --> tests/repo/mod.rs:191:43
        |
    191 |     let response = reqwest::blocking::get(&url)?.error_for_status()?;
        |                                           ^^^^ help: change this to: `url`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
        = note: `-D clippy::needless-borrow` implied by `-D clippy::all`
2022-10-24 21:25:53 -07:00
David Tolnay
c29c2abf1b
Release 1.0.103 2022-10-20 14:38:12 -07:00
David Tolnay
8e81cad736
Merge pull request #1237 from dtolnay/partialord
Restrict PartialOrd comparison to only tokens in the same buffer
2022-10-20 14:36:53 -07:00
David Tolnay
8db5adbb2b
Ignore cast_possible_wrap pedantic clippy lint
error: casting `usize` to `isize` may wrap around the value
      --> src/buffer.rs:56:46
       |
    56 |                     entries.push(Entry::End(-(group_end_index as isize)));
       |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap
       = note: `-D clippy::cast-possible-wrap` implied by `-D clippy::pedantic`

    error: casting `usize` to `isize` may wrap around the value
      --> src/buffer.rs:82:34
       |
    82 |         entries.push(Entry::End(-(entries.len() as isize)));
       |                                  ^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap
2022-10-20 14:17:08 -07:00
David Tolnay
f6f7d8a6b3
Restrict PartialOrd comparison to only tokens in the same buffer 2022-10-20 14:07:35 -07:00