summaryrefslogtreecommitdiffstats
path: root/vendor/syn
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/syn')
-rw-r--r--vendor/syn/.cargo-checksum.json2
-rw-r--r--vendor/syn/Cargo.toml2
-rw-r--r--vendor/syn/src/custom_keyword.rs2
-rw-r--r--vendor/syn/src/custom_punctuation.rs2
-rw-r--r--vendor/syn/src/export.rs4
-rw-r--r--vendor/syn/src/expr.rs77
-rw-r--r--vendor/syn/src/lib.rs5
-rw-r--r--vendor/syn/src/parse.rs4
-rw-r--r--vendor/syn/src/token.rs22
-rw-r--r--vendor/syn/tests/common/eq.rs4
-rw-r--r--vendor/syn/tests/repo/mod.rs25
-rw-r--r--vendor/syn/tests/test_expr.rs33
12 files changed, 138 insertions, 44 deletions
diff --git a/vendor/syn/.cargo-checksum.json b/vendor/syn/.cargo-checksum.json
index 395cafc9d..ffbe76500 100644
--- a/vendor/syn/.cargo-checksum.json
+++ b/vendor/syn/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"Cargo.toml":"f56cb0ef622eddc84e2f801e2123e0e3728847d581d8597a6d5707339162e96b","LICENSE-APACHE":"62c7a1e35f56406896d7aa7ca52d0cc0d272ac022b5d2796e7d6905db8a3636a","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"f6904878f9082d7d267b6d0d737ef211ff165cfd039a4d45ad88e9861f3e217f","benches/file.rs":"0a0527c78d849148cbb6118b4d36f72da7d4add865ba1a410e0a1be9e8dbfe0e","benches/rust.rs":"c006f01aacf95f61e5d6f4064be4040896a37a9632fb3dcfd9bc2a7ab171741d","src/attr.rs":"bd5ffae18a363162f7d9c12a1b6c1d023070cbf1b060c98ebc38ef79f1de9c67","src/bigint.rs":"0299829b2f7a1a798fe2f7bc1680e4a10f9b6f4a852d09af4da2deab466c4242","src/buffer.rs":"3ef1c3302acc4f9976484fd11c28981a5ff245cf4f3b8b888b7f065c8614881e","src/custom_keyword.rs":"f2704d15a337def453bdb337359fffdd014d62ae875cd6dbd442691c932f89c9","src/custom_punctuation.rs":"2e688f6a7c3c0405f209a6aaa85a43fc34807fc280e4a71235642fc9333492dd","src/data.rs":"09ce487d27f7dd79031b390c8344fc6361d64b05064ee25dba1489cf3aa56128","src/derive.rs":"3132e7f064725c7ca43f26daee93ec78037d46a935c6b0758af905cff450c15c","src/discouraged.rs":"482970b03bdee3cbc30c034f644e3293b25387db46300da5d8d8efd97dad8507","src/drops.rs":"013385f1dd95663f1afab41abc1e2eea04181998644828935ca564c74d6462ae","src/error.rs":"8dbb17978f688e12bcce58232f05c0ca9ed9de1fe511440793fb958da2fc93b9","src/export.rs":"6b519b1c17967cdd1519f52f981022435fcf940834fc8a705923426b65f21eac","src/expr.rs":"388348e9404a53331fe84d670bc0da889e1e9471461a8dc0a2e010a377103ecf","src/ext.rs":"3cf2d869812e5be894aa1c48bf074da262143fb2df1c9ac1b5ee965bf2a96a1c","src/file.rs":"a4d510dd0e2756bd54983dfa747601918c801e987cbf92deab44cdca6a201aeb","src/gen/clone.rs":"46540509dc99bb849014948a0c5b02ea372d5feceae5ea391c29f226f06516eb","src/gen/debug.rs":"32b2076b755f021428a0fb268a94057e1bcb1cd400feb895946703d7919b843a","src/gen/eq.rs":"aa5455b2cc0d9846d119ce001e821872df911f65133b993e3801a42e8f635f2a","src/gen/fold.rs":"305fe1db2b5b7039e79104a6e8ead11b1ee3c009f31f2a2bbebca10e494188cd","src/gen/hash.rs":"4ca8239c681ea5fd7b16bb61bff9034bff09680c088f5a16e90e99013e55742f","src/gen/visit.rs":"cbd0ebe18da62614c66a7900ef67350a5efee261bcdfff6cffc1ea6c4e754e34","src/gen/visit_mut.rs":"1b2a260ab3a6465eed6164f6d2c0cec977f9c3ca912f6bed81f8599b4d8f5cb0","src/gen_helper.rs":"750caab67ba0ba11a95ea28cd38026485227bb4aa114cdb497472386f60fdb35","src/generics.rs":"cb1a0374c523a469d48b1db7316166559034d437fb4f6cc5661511edb8aba32c","src/group.rs":"f5911e9cf2dc2dffab546590167c48de30409cb7708aa3307d22be143df720e4","src/ident.rs":"1b2d86d2e380b1fa83aee6ed113c47f0b482a229c25be428dac921deec0b4852","src/item.rs":"00ae729a00854f15203dbcbf2251910658eb052130de243144dcbec68be37919","src/lib.rs":"723c0555b398e4efd39c3198b4fc264b2bab6051e6f81ea3af81865784fdf4ec","src/lifetime.rs":"64abfd72af5dd271b2de1a8304ca0899b90da7750df9dec2ee8102bceb08a426","src/lit.rs":"3a70ebbc81563b967d2cbf589b6980a5b202ee3379d5d401e01a4c2af124d7ae","src/lookahead.rs":"376092f91a1c32e1b277db0a6790fdda151c9ec51bd971fe6a6545b5b9e73b5d","src/mac.rs":"b1cf73f34a27a8f1429125e726623a524fb5dce875eb68ead3beaffa976442c3","src/macros.rs":"64fce3fda990306cfae5f0409918946ff7c9e98ecad963932e6c1436c0b0d4c2","src/meta.rs":"9df61ebaa405ef743ba1629b39ee5e806f9ead77694a1027f192da860270c83d","src/op.rs":"fe5db7c3373b956234ea8a1a7d129a06e5aef5db77c44c1c2fedb4aaa667ac56","src/parse.rs":"e57637899f8533da26e16d41575c3489fd1bf3560cea427ba57b3c966d891d8e","src/parse_macro_input.rs":"4a753b2a6dbfefd6dc93852d66b4f6d73ebd6b8b9be74019fc476f429b9a892d","src/parse_quote.rs":"08c8f4eaedeffaac73170b59921d140f63f4a01c243993dff050b4b848d0ac1f","src/pat.rs":"4d99c5ed6a08e6adfd0f6c31438befd3f03e48982a36bb2544962d9db7805a4a","src/path.rs":"8079943ec924ad5338e4bfa16b15b8ea0d6d27092396b62667eadcd0b98f20db","src/print.rs":"22910bf0521ab868ebd7c62601c55912d12cfb400c65723e08e5cfa3a2d111c0","src/punctuated.rs":"dffaab15b9215c70d7db416e8d4c44b78c43ba2f255485e6211363f0f0fea063","src/restriction.rs":"62efbc127d7e7316dd1070c0e976872de6238b2602bba1fb35df18511b4e7199","src/sealed.rs":"6ece3b3dcb30f6bb98b93d83759ca7712ee8592bef9c0511141039c38765db0e","src/span.rs":"0a48e375e5c9768f6f64174a91ba6a255f4b021e2fb3548d8494e617f142601b","src/spanned.rs":"1bba75d73dd4dc5be6c4e11fdd72686d340fb25b5808830bd603ddc840beabdc","src/stmt.rs":"321d445f681c46ac30644504df2a8afc333a1dde0371159e9e077a17eed16548","src/thread.rs":"1f1deb1272525ab2af9a36aac4bce8f65b0e315adb1656641fd7075662f49222","src/token.rs":"42c9c9d8a7145255abf0cb1af1f2fe56a0b428a8a5ea8ff08e58f894fb519fd5","src/tt.rs":"32490509abcc4a5a3c7eb5628337172b3b49d30697d2f7b7df4d8045255c13da","src/ty.rs":"1d11c614298f25a8fa42165a01d6545fc699a446d7f3f8630162c7f478b26886","src/verbatim.rs":"87cbe82a90f48efb57ffd09141042698b3e011a21d0d5412154d80324b0a5ef0","src/whitespace.rs":"718a80c12cdd145358e2690f0f68ff7779a91ec17ce9fde9bb755f635fce69ad","tests/common/eq.rs":"e51d7f102ec29eef1336e0aad451378d0191845f9b1617744b79d47ff557e6df","tests/common/mod.rs":"432ad35577f836a20b517d8c26ed994ac25fe73ef2f461c67688b61b99762015","tests/common/parse.rs":"246ddf1d303a9dbbc380e8d0689bd851cef3c3146d09d2627175deb9203b003d","tests/debug/gen.rs":"bc638d0fcb4a007d658535b60eec09cf4dc2c4907062832cb94fe6960a0d7e01","tests/debug/mod.rs":"dd87563bbd359401790a9c4185178539929ff9fa35a6998657af82a85731fe4c","tests/macros/mod.rs":"4c84bd9e82df255258671b6a57b0f2a3e4bef2127a2e8b842a4b6f3037b7fc5c","tests/regression.rs":"e9565ea0efecb4136f099164ffcfa26e1996b0a27fb9c6659e90ad9bdd42e7b6","tests/regression/issue1108.rs":"f32db35244a674e22ff824ca9e5bbec2184e287b59f022db68c418b5878a2edc","tests/regression/issue1235.rs":"a2266b10c3f7c7af5734817ab0a3e8b309b51e7d177b63f26e67e6b744d280b0","tests/repo/mod.rs":"ca9ca1d192aa25ffcfc12161edf4998f4c4e3160f8834f8f7259023a28981e5c","tests/repo/progress.rs":"c08d0314a7f3ecf760d471f27da3cd2a500aeb9f1c8331bffb2aa648f9fabf3f","tests/test_asyncness.rs":"3868181f25f7470476077f80a442a7804b6b9b371ad5917f4fd18b1002714c64","tests/test_attribute.rs":"b35550a43bbd187bb330997ba36f90c65d8fc489135b1d32ef4547f145cb7612","tests/test_derive_input.rs":"c215245c4d09052661ac5b65b34e950ea47622847bdffe648d380470f12db8f2","tests/test_expr.rs":"2de81f6171bcde3db8d36ce90b9c77ce672f93dcb1e03b6a44290b039246132b","tests/test_generics.rs":"b77741aa38e6ac7e1a9082faf168e7b7b92fbabf9f3fd07306676339a67394df","tests/test_grouping.rs":"ecbe3324878b2e2be42640a3dec198620cff18731fcb95ee7e94eacd11d2fec1","tests/test_ident.rs":"9eb53d1e21edf23e7c9e14dc74dcc2b2538e9221e19dbcc0a44e3acc2e90f3f6","tests/test_item.rs":"7f0255b61d0a6921313c09aaba470beefc55f1d4e66d1e24cfac7a3f63b035d8","tests/test_iterators.rs":"f4dacb5f3a8e0473dfb0d27f05270d41e79eddb4759b1fad3e88e379b4731e17","tests/test_lit.rs":"8e30c2d7837673a742d77aef01212788bbd099182dd5c1d10ee474cfeb786c39","tests/test_meta.rs":"3e1bb60b4bd56adb1e04b0e2d867404f0d81f7bf69caf7d8a70fc7090e079e84","tests/test_parse_buffer.rs":"3ed83ea2e50f84b80c0b543aac4bfbd379610d0911c0baa1eb94bb925bda7341","tests/test_parse_stream.rs":"a7e186272c89a239cae03053b5a039cdc073cdb46fad64b178fe76fde98405d5","tests/test_pat.rs":"fe94e084ee478d41cccea4eeb3e975386a70d36ff7cbb902ba0c767d536aab6e","tests/test_path.rs":"0033e1082b576bb3217ebd4546423d6f86fde7ee7ba3aba8c57bf137d2b42f47","tests/test_precedence.rs":"d3c34f2e5ffe22f7bdacff7ab6af71b24ba8150fdcc640f3c3e28db3491a556a","tests/test_receiver.rs":"af64117acd66fbf42edc476f731ecd20c88009d9cb641dbd7a1d6384ae99ae73","tests/test_round_trip.rs":"61183de56bf70c628659b9529f794b9f138904959f919f08f3b8176ba62c76ef","tests/test_shebang.rs":"06d3acabed004767d8b3a0389bde7485a6719cad6a0d0b4ac2c7439b03586651","tests/test_should_parse.rs":"1d3535698a446e2755bfc360676bdb161841a1f454cdef6e7556c6d06a95c89d","tests/test_size.rs":"78c14995718c2f8d5a7296c8f524601c30f91a5586e1402c0775977a4f814406","tests/test_stmt.rs":"42a3707056da0ce3a01f8fb13e8b7631f9be6066627ac376e1874742419ad2cc","tests/test_token_trees.rs":"d012da9c3c861073711b006bf6ffdc073821fb9fb0a08733628cdae57124d1f5","tests/test_ty.rs":"f7f21f76e9e798669f09a95c380e26ae5959ee8ac5f3b765b1a799cc9505d075","tests/test_visibility.rs":"cf4c93997cd88821ef7f8e2dd5d1586175cce4614407cd3bdf371ecc4d8abc44","tests/zzz_stable.rs":"2a862e59cb446235ed99aec0e6ada8e16d3ecc30229b29d825b7c0bbc2602989"},"package":"e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b"} \ No newline at end of file
+{"files":{"Cargo.toml":"f47dd3099b90161054b6b694a5e6307429c94e54f04df2683537a0cd1dfb4ee0","LICENSE-APACHE":"62c7a1e35f56406896d7aa7ca52d0cc0d272ac022b5d2796e7d6905db8a3636a","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"f6904878f9082d7d267b6d0d737ef211ff165cfd039a4d45ad88e9861f3e217f","benches/file.rs":"0a0527c78d849148cbb6118b4d36f72da7d4add865ba1a410e0a1be9e8dbfe0e","benches/rust.rs":"c006f01aacf95f61e5d6f4064be4040896a37a9632fb3dcfd9bc2a7ab171741d","src/attr.rs":"bd5ffae18a363162f7d9c12a1b6c1d023070cbf1b060c98ebc38ef79f1de9c67","src/bigint.rs":"0299829b2f7a1a798fe2f7bc1680e4a10f9b6f4a852d09af4da2deab466c4242","src/buffer.rs":"3ef1c3302acc4f9976484fd11c28981a5ff245cf4f3b8b888b7f065c8614881e","src/custom_keyword.rs":"b2e25cbe73d237b459140a38083ee21e4836ea444859b033f400652414630290","src/custom_punctuation.rs":"c2c344c9cdbebc66a5833eb0f9ded817ce9807dbb75b616283b2b60960d1ffb0","src/data.rs":"09ce487d27f7dd79031b390c8344fc6361d64b05064ee25dba1489cf3aa56128","src/derive.rs":"3132e7f064725c7ca43f26daee93ec78037d46a935c6b0758af905cff450c15c","src/discouraged.rs":"482970b03bdee3cbc30c034f644e3293b25387db46300da5d8d8efd97dad8507","src/drops.rs":"013385f1dd95663f1afab41abc1e2eea04181998644828935ca564c74d6462ae","src/error.rs":"8dbb17978f688e12bcce58232f05c0ca9ed9de1fe511440793fb958da2fc93b9","src/export.rs":"b260cc49da1da3489e7755832bc8015cfad79e84f6c74e237f65ae25a2385e56","src/expr.rs":"4260279c392b594e36cee9709f668ebccb9a7be69192e24734341e6b3189374c","src/ext.rs":"3cf2d869812e5be894aa1c48bf074da262143fb2df1c9ac1b5ee965bf2a96a1c","src/file.rs":"a4d510dd0e2756bd54983dfa747601918c801e987cbf92deab44cdca6a201aeb","src/gen/clone.rs":"46540509dc99bb849014948a0c5b02ea372d5feceae5ea391c29f226f06516eb","src/gen/debug.rs":"32b2076b755f021428a0fb268a94057e1bcb1cd400feb895946703d7919b843a","src/gen/eq.rs":"aa5455b2cc0d9846d119ce001e821872df911f65133b993e3801a42e8f635f2a","src/gen/fold.rs":"305fe1db2b5b7039e79104a6e8ead11b1ee3c009f31f2a2bbebca10e494188cd","src/gen/hash.rs":"4ca8239c681ea5fd7b16bb61bff9034bff09680c088f5a16e90e99013e55742f","src/gen/visit.rs":"cbd0ebe18da62614c66a7900ef67350a5efee261bcdfff6cffc1ea6c4e754e34","src/gen/visit_mut.rs":"1b2a260ab3a6465eed6164f6d2c0cec977f9c3ca912f6bed81f8599b4d8f5cb0","src/gen_helper.rs":"750caab67ba0ba11a95ea28cd38026485227bb4aa114cdb497472386f60fdb35","src/generics.rs":"cb1a0374c523a469d48b1db7316166559034d437fb4f6cc5661511edb8aba32c","src/group.rs":"f5911e9cf2dc2dffab546590167c48de30409cb7708aa3307d22be143df720e4","src/ident.rs":"1b2d86d2e380b1fa83aee6ed113c47f0b482a229c25be428dac921deec0b4852","src/item.rs":"00ae729a00854f15203dbcbf2251910658eb052130de243144dcbec68be37919","src/lib.rs":"254307de790ddbdad664bd7507b91443edb287f1245c09c3a550ccf8882ad92e","src/lifetime.rs":"64abfd72af5dd271b2de1a8304ca0899b90da7750df9dec2ee8102bceb08a426","src/lit.rs":"3a70ebbc81563b967d2cbf589b6980a5b202ee3379d5d401e01a4c2af124d7ae","src/lookahead.rs":"376092f91a1c32e1b277db0a6790fdda151c9ec51bd971fe6a6545b5b9e73b5d","src/mac.rs":"b1cf73f34a27a8f1429125e726623a524fb5dce875eb68ead3beaffa976442c3","src/macros.rs":"64fce3fda990306cfae5f0409918946ff7c9e98ecad963932e6c1436c0b0d4c2","src/meta.rs":"9df61ebaa405ef743ba1629b39ee5e806f9ead77694a1027f192da860270c83d","src/op.rs":"fe5db7c3373b956234ea8a1a7d129a06e5aef5db77c44c1c2fedb4aaa667ac56","src/parse.rs":"4d6c7935de1c2762ddb20ddf8e0b3de934e5ca26143aa8ba3a7fcc09f8c91893","src/parse_macro_input.rs":"4a753b2a6dbfefd6dc93852d66b4f6d73ebd6b8b9be74019fc476f429b9a892d","src/parse_quote.rs":"08c8f4eaedeffaac73170b59921d140f63f4a01c243993dff050b4b848d0ac1f","src/pat.rs":"4d99c5ed6a08e6adfd0f6c31438befd3f03e48982a36bb2544962d9db7805a4a","src/path.rs":"8079943ec924ad5338e4bfa16b15b8ea0d6d27092396b62667eadcd0b98f20db","src/print.rs":"22910bf0521ab868ebd7c62601c55912d12cfb400c65723e08e5cfa3a2d111c0","src/punctuated.rs":"dffaab15b9215c70d7db416e8d4c44b78c43ba2f255485e6211363f0f0fea063","src/restriction.rs":"62efbc127d7e7316dd1070c0e976872de6238b2602bba1fb35df18511b4e7199","src/sealed.rs":"6ece3b3dcb30f6bb98b93d83759ca7712ee8592bef9c0511141039c38765db0e","src/span.rs":"0a48e375e5c9768f6f64174a91ba6a255f4b021e2fb3548d8494e617f142601b","src/spanned.rs":"1bba75d73dd4dc5be6c4e11fdd72686d340fb25b5808830bd603ddc840beabdc","src/stmt.rs":"321d445f681c46ac30644504df2a8afc333a1dde0371159e9e077a17eed16548","src/thread.rs":"1f1deb1272525ab2af9a36aac4bce8f65b0e315adb1656641fd7075662f49222","src/token.rs":"e6b2373fb0465158d267bd25eac16266bd4b492d7dbe8ae4b5405a841a1ac57d","src/tt.rs":"32490509abcc4a5a3c7eb5628337172b3b49d30697d2f7b7df4d8045255c13da","src/ty.rs":"1d11c614298f25a8fa42165a01d6545fc699a446d7f3f8630162c7f478b26886","src/verbatim.rs":"87cbe82a90f48efb57ffd09141042698b3e011a21d0d5412154d80324b0a5ef0","src/whitespace.rs":"718a80c12cdd145358e2690f0f68ff7779a91ec17ce9fde9bb755f635fce69ad","tests/common/eq.rs":"147342055d118d8ec7c64ea6b0224e61c4ac058e7395058f379668b07fe99345","tests/common/mod.rs":"432ad35577f836a20b517d8c26ed994ac25fe73ef2f461c67688b61b99762015","tests/common/parse.rs":"246ddf1d303a9dbbc380e8d0689bd851cef3c3146d09d2627175deb9203b003d","tests/debug/gen.rs":"bc638d0fcb4a007d658535b60eec09cf4dc2c4907062832cb94fe6960a0d7e01","tests/debug/mod.rs":"dd87563bbd359401790a9c4185178539929ff9fa35a6998657af82a85731fe4c","tests/macros/mod.rs":"4c84bd9e82df255258671b6a57b0f2a3e4bef2127a2e8b842a4b6f3037b7fc5c","tests/regression.rs":"e9565ea0efecb4136f099164ffcfa26e1996b0a27fb9c6659e90ad9bdd42e7b6","tests/regression/issue1108.rs":"f32db35244a674e22ff824ca9e5bbec2184e287b59f022db68c418b5878a2edc","tests/regression/issue1235.rs":"a2266b10c3f7c7af5734817ab0a3e8b309b51e7d177b63f26e67e6b744d280b0","tests/repo/mod.rs":"9ab41309422dbf26543de6f67fa975239c33c9bfdd5ff772ee6b46b716ea60cf","tests/repo/progress.rs":"c08d0314a7f3ecf760d471f27da3cd2a500aeb9f1c8331bffb2aa648f9fabf3f","tests/test_asyncness.rs":"3868181f25f7470476077f80a442a7804b6b9b371ad5917f4fd18b1002714c64","tests/test_attribute.rs":"b35550a43bbd187bb330997ba36f90c65d8fc489135b1d32ef4547f145cb7612","tests/test_derive_input.rs":"c215245c4d09052661ac5b65b34e950ea47622847bdffe648d380470f12db8f2","tests/test_expr.rs":"96af622fa5dfba122a63bf68927ba7e5d818c233d85f5fb01765b3a1b5b67411","tests/test_generics.rs":"b77741aa38e6ac7e1a9082faf168e7b7b92fbabf9f3fd07306676339a67394df","tests/test_grouping.rs":"ecbe3324878b2e2be42640a3dec198620cff18731fcb95ee7e94eacd11d2fec1","tests/test_ident.rs":"9eb53d1e21edf23e7c9e14dc74dcc2b2538e9221e19dbcc0a44e3acc2e90f3f6","tests/test_item.rs":"7f0255b61d0a6921313c09aaba470beefc55f1d4e66d1e24cfac7a3f63b035d8","tests/test_iterators.rs":"f4dacb5f3a8e0473dfb0d27f05270d41e79eddb4759b1fad3e88e379b4731e17","tests/test_lit.rs":"8e30c2d7837673a742d77aef01212788bbd099182dd5c1d10ee474cfeb786c39","tests/test_meta.rs":"3e1bb60b4bd56adb1e04b0e2d867404f0d81f7bf69caf7d8a70fc7090e079e84","tests/test_parse_buffer.rs":"3ed83ea2e50f84b80c0b543aac4bfbd379610d0911c0baa1eb94bb925bda7341","tests/test_parse_stream.rs":"a7e186272c89a239cae03053b5a039cdc073cdb46fad64b178fe76fde98405d5","tests/test_pat.rs":"fe94e084ee478d41cccea4eeb3e975386a70d36ff7cbb902ba0c767d536aab6e","tests/test_path.rs":"0033e1082b576bb3217ebd4546423d6f86fde7ee7ba3aba8c57bf137d2b42f47","tests/test_precedence.rs":"d3c34f2e5ffe22f7bdacff7ab6af71b24ba8150fdcc640f3c3e28db3491a556a","tests/test_receiver.rs":"af64117acd66fbf42edc476f731ecd20c88009d9cb641dbd7a1d6384ae99ae73","tests/test_round_trip.rs":"61183de56bf70c628659b9529f794b9f138904959f919f08f3b8176ba62c76ef","tests/test_shebang.rs":"06d3acabed004767d8b3a0389bde7485a6719cad6a0d0b4ac2c7439b03586651","tests/test_should_parse.rs":"1d3535698a446e2755bfc360676bdb161841a1f454cdef6e7556c6d06a95c89d","tests/test_size.rs":"78c14995718c2f8d5a7296c8f524601c30f91a5586e1402c0775977a4f814406","tests/test_stmt.rs":"42a3707056da0ce3a01f8fb13e8b7631f9be6066627ac376e1874742419ad2cc","tests/test_token_trees.rs":"d012da9c3c861073711b006bf6ffdc073821fb9fb0a08733628cdae57124d1f5","tests/test_ty.rs":"f7f21f76e9e798669f09a95c380e26ae5959ee8ac5f3b765b1a799cc9505d075","tests/test_visibility.rs":"cf4c93997cd88821ef7f8e2dd5d1586175cce4614407cd3bdf371ecc4d8abc44","tests/zzz_stable.rs":"2a862e59cb446235ed99aec0e6ada8e16d3ecc30229b29d825b7c0bbc2602989"},"package":"23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a"} \ No newline at end of file
diff --git a/vendor/syn/Cargo.toml b/vendor/syn/Cargo.toml
index a0e56c526..56cf07e4f 100644
--- a/vendor/syn/Cargo.toml
+++ b/vendor/syn/Cargo.toml
@@ -13,7 +13,7 @@
edition = "2021"
rust-version = "1.56"
name = "syn"
-version = "2.0.38"
+version = "2.0.39"
authors = ["David Tolnay <dtolnay@gmail.com>"]
include = [
"/benches/**",
diff --git a/vendor/syn/src/custom_keyword.rs b/vendor/syn/src/custom_keyword.rs
index 9f3ad8702..6ce23db41 100644
--- a/vendor/syn/src/custom_keyword.rs
+++ b/vendor/syn/src/custom_keyword.rs
@@ -128,7 +128,7 @@ macro_rules! custom_keyword {
macro_rules! impl_parse_for_custom_keyword {
($ident:ident) => {
// For peek.
- impl $crate::token::CustomToken for $ident {
+ impl $crate::__private::CustomToken for $ident {
fn peek(cursor: $crate::buffer::Cursor) -> $crate::__private::bool {
if let $crate::__private::Some((ident, _rest)) = cursor.ident() {
ident == $crate::__private::stringify!($ident)
diff --git a/vendor/syn/src/custom_punctuation.rs b/vendor/syn/src/custom_punctuation.rs
index 062fe5169..1b2c768f4 100644
--- a/vendor/syn/src/custom_punctuation.rs
+++ b/vendor/syn/src/custom_punctuation.rs
@@ -113,7 +113,7 @@ macro_rules! custom_punctuation {
#[macro_export]
macro_rules! impl_parse_for_custom_punctuation {
($ident:ident, $($tt:tt)+) => {
- impl $crate::token::CustomToken for $ident {
+ impl $crate::__private::CustomToken for $ident {
fn peek(cursor: $crate::buffer::Cursor) -> $crate::__private::bool {
$crate::__private::peek_punct(cursor, $crate::stringify_punct!($($tt)+))
}
diff --git a/vendor/syn/src/export.rs b/vendor/syn/src/export.rs
index febd322e1..b9ea5c747 100644
--- a/vendor/syn/src/export.rs
+++ b/vendor/syn/src/export.rs
@@ -57,6 +57,10 @@ pub use crate::token::parsing::{peek_punct, punct as parse_punct};
#[doc(hidden)]
pub use crate::token::printing::punct as print_punct;
+#[cfg(feature = "parsing")]
+#[doc(hidden)]
+pub use crate::token::private::CustomToken;
+
#[cfg(feature = "proc-macro")]
#[doc(hidden)]
pub type TokenStream = proc_macro::TokenStream;
diff --git a/vendor/syn/src/expr.rs b/vendor/syn/src/expr.rs
index ae723242e..22400be32 100644
--- a/vendor/syn/src/expr.rs
+++ b/vendor/syn/src/expr.rs
@@ -957,6 +957,8 @@ pub(crate) fn requires_terminator(expr: &Expr) -> bool {
#[cfg(feature = "parsing")]
pub(crate) mod parsing {
use super::*;
+ #[cfg(feature = "full")]
+ use crate::ext::IdentExt;
use crate::parse::discouraged::Speculative;
#[cfg(feature = "full")]
use crate::parse::ParseBuffer;
@@ -1156,6 +1158,25 @@ pub(crate) mod parsing {
}
#[cfg(feature = "full")]
+ fn can_begin_expr(input: ParseStream) -> bool {
+ input.peek(Ident::peek_any) // value name or keyword
+ || input.peek(token::Paren) // tuple
+ || input.peek(token::Bracket) // array
+ || input.peek(token::Brace) // block
+ || input.peek(Lit) // literal
+ || input.peek(Token![!]) && !input.peek(Token![!=]) // operator not
+ || input.peek(Token![-]) && !input.peek(Token![-=]) && !input.peek(Token![->]) // unary minus
+ || input.peek(Token![*]) && !input.peek(Token![*=]) // dereference
+ || input.peek(Token![|]) && !input.peek(Token![|=]) // closure
+ || input.peek(Token![&]) && !input.peek(Token![&=]) // reference
+ || input.peek(Token![..]) // range notation
+ || input.peek(Token![<]) && !input.peek(Token![<=]) && !input.peek(Token![<<=]) // associated path
+ || input.peek(Token![::]) // global path
+ || input.peek(Lifetime) // labeled loop
+ || input.peek(Token![#]) // expression attributes
+ }
+
+ #[cfg(feature = "full")]
fn parse_expr(
input: ParseStream,
mut lhs: Expr,
@@ -1614,7 +1635,7 @@ pub(crate) mod parsing {
} else if input.peek(Token![continue]) {
input.parse().map(Expr::Continue)
} else if input.peek(Token![return]) {
- expr_ret(input, allow_struct).map(Expr::Return)
+ expr_return(input, allow_struct).map(Expr::Return)
} else if input.peek(token::Bracket) {
array_or_repeat(input)
} else if input.peek(Token![let]) {
@@ -2223,7 +2244,7 @@ pub(crate) mod parsing {
impl Parse for ExprReturn {
fn parse(input: ParseStream) -> Result<Self> {
let allow_struct = AllowStruct(true);
- expr_ret(input, allow_struct)
+ expr_return(input, allow_struct)
}
}
@@ -2247,7 +2268,7 @@ pub(crate) mod parsing {
attrs: Vec::new(),
yield_token: input.parse()?,
expr: {
- if !input.is_empty() && !input.peek(Token![,]) && !input.peek(Token![;]) {
+ if can_begin_expr(input) {
Some(input.parse()?)
} else {
None
@@ -2442,34 +2463,46 @@ pub(crate) mod parsing {
#[cfg(feature = "full")]
fn expr_break(input: ParseStream, allow_struct: AllowStruct) -> Result<ExprBreak> {
+ let break_token: Token![break] = input.parse()?;
+
+ let ahead = input.fork();
+ let label: Option<Lifetime> = ahead.parse()?;
+ if label.is_some() && ahead.peek(Token![:]) {
+ // Not allowed: `break 'label: loop {...}`
+ // Parentheses are required. `break ('label: loop {...})`
+ let _ = ambiguous_expr(input, allow_struct)?;
+ let start_span = label.unwrap().apostrophe;
+ let end_span = input.cursor().prev_span();
+ return Err(crate::error::new2(
+ start_span,
+ end_span,
+ "parentheses required",
+ ));
+ }
+
+ input.advance_to(&ahead);
+ let expr = if can_begin_expr(input) && (allow_struct.0 || !input.peek(token::Brace)) {
+ let expr = ambiguous_expr(input, allow_struct)?;
+ Some(Box::new(expr))
+ } else {
+ None
+ };
+
Ok(ExprBreak {
attrs: Vec::new(),
- break_token: input.parse()?,
- label: input.parse()?,
- expr: {
- if input.is_empty()
- || input.peek(Token![,])
- || input.peek(Token![;])
- || !allow_struct.0 && input.peek(token::Brace)
- {
- None
- } else {
- let expr = ambiguous_expr(input, allow_struct)?;
- Some(Box::new(expr))
- }
- },
+ break_token,
+ label,
+ expr,
})
}
#[cfg(feature = "full")]
- fn expr_ret(input: ParseStream, allow_struct: AllowStruct) -> Result<ExprReturn> {
+ fn expr_return(input: ParseStream, allow_struct: AllowStruct) -> Result<ExprReturn> {
Ok(ExprReturn {
attrs: Vec::new(),
return_token: input.parse()?,
expr: {
- if input.is_empty() || input.peek(Token![,]) || input.peek(Token![;]) {
- None
- } else {
+ if can_begin_expr(input) {
// NOTE: return is greedy and eats blocks after it even when in a
// position where structs are not allowed, such as in if statement
// conditions. For example:
@@ -2477,6 +2510,8 @@ pub(crate) mod parsing {
// if return { println!("A") } {} // Prints "A"
let expr = ambiguous_expr(input, allow_struct)?;
Some(Box::new(expr))
+ } else {
+ None
}
},
})
diff --git a/vendor/syn/src/lib.rs b/vendor/syn/src/lib.rs
index a74d4b117..a3df727a9 100644
--- a/vendor/syn/src/lib.rs
+++ b/vendor/syn/src/lib.rs
@@ -249,7 +249,7 @@
//! dynamic library libproc_macro from rustc toolchain.
// Syn types in rustdoc of other crates get linked to here.
-#![doc(html_root_url = "https://docs.rs/syn/2.0.38")]
+#![doc(html_root_url = "https://docs.rs/syn/2.0.39")]
#![cfg_attr(doc_cfg, feature(doc_cfg))]
#![allow(non_camel_case_types)]
#![allow(
@@ -265,6 +265,7 @@
clippy::explicit_auto_deref,
clippy::if_not_else,
clippy::inherent_to_string,
+ clippy::into_iter_without_iter,
clippy::items_after_statements,
clippy::large_enum_variant,
clippy::let_underscore_untyped, // https://github.com/rust-lang/rust-clippy/issues/10410
@@ -811,6 +812,8 @@ mod gen {
#[path = "../gen_helper.rs"]
mod helper;
}
+
+#[cfg(any(feature = "fold", feature = "visit", feature = "visit-mut"))]
pub use crate::gen::*;
// Not public API.
diff --git a/vendor/syn/src/parse.rs b/vendor/syn/src/parse.rs
index 5a2aeb628..50fe110b5 100644
--- a/vendor/syn/src/parse.rs
+++ b/vendor/syn/src/parse.rs
@@ -513,8 +513,8 @@ impl<'a> ParseBuffer<'a> {
///
/// - `input.peek(Token![struct])`
/// - `input.peek(Token![==])`
- /// - `input.peek(Ident)`&emsp;*(does not accept keywords)*
- /// - `input.peek(Ident::peek_any)`
+ /// - `input.peek(syn::Ident)`&emsp;*(does not accept keywords)*
+ /// - `input.peek(syn::Ident::peek_any)`
/// - `input.peek(Lifetime)`
/// - `input.peek(token::Brace)`
///
diff --git a/vendor/syn/src/token.rs b/vendor/syn/src/token.rs
index af7f25c42..05d8f5601 100644
--- a/vendor/syn/src/token.rs
+++ b/vendor/syn/src/token.rs
@@ -88,6 +88,8 @@
//! [Printing]: https://docs.rs/quote/1.0/quote/trait.ToTokens.html
//! [`Span`]: https://docs.rs/proc-macro2/1.0/proc_macro2/struct.Span.html
+#[cfg(feature = "parsing")]
+pub(crate) use self::private::CustomToken;
use self::private::WithSpan;
#[cfg(feature = "parsing")]
use crate::buffer::Cursor;
@@ -134,7 +136,9 @@ pub trait Token: private::Sealed {
fn display() -> &'static str;
}
-mod private {
+pub(crate) mod private {
+ #[cfg(feature = "parsing")]
+ use crate::buffer::Cursor;
use proc_macro2::Span;
#[cfg(feature = "parsing")]
@@ -147,6 +151,14 @@ mod private {
pub struct WithSpan {
pub span: Span,
}
+
+ // Not public API.
+ #[doc(hidden)]
+ #[cfg(feature = "parsing")]
+ pub trait CustomToken {
+ fn peek(cursor: Cursor) -> bool;
+ fn display() -> &'static str;
+ }
}
#[cfg(feature = "parsing")]
@@ -218,14 +230,6 @@ impl_low_level_token!("punctuation token" Punct punct);
impl_low_level_token!("literal" Literal literal);
impl_low_level_token!("token" TokenTree token_tree);
-// Not public API.
-#[doc(hidden)]
-#[cfg(feature = "parsing")]
-pub trait CustomToken {
- fn peek(cursor: Cursor) -> bool;
- fn display() -> &'static str;
-}
-
#[cfg(feature = "parsing")]
impl<T: CustomToken> private::Sealed for T {}
diff --git a/vendor/syn/tests/common/eq.rs b/vendor/syn/tests/common/eq.rs
index 3c2b1c124..8e334c330 100644
--- a/vendor/syn/tests/common/eq.rs
+++ b/vendor/syn/tests/common/eq.rs
@@ -65,6 +65,7 @@ use rustc_ast::ast::FormatOptions;
use rustc_ast::ast::FormatPlaceholder;
use rustc_ast::ast::FormatSign;
use rustc_ast::ast::FormatTrait;
+use rustc_ast::ast::GenBlockKind;
use rustc_ast::ast::GenericArg;
use rustc_ast::ast::GenericArgs;
use rustc_ast::ast::GenericBound;
@@ -545,6 +546,7 @@ spanless_eq_enum!(FormatCount; Literal(0) Argument(0));
spanless_eq_enum!(FormatDebugHex; Lower Upper);
spanless_eq_enum!(FormatSign; Plus Minus);
spanless_eq_enum!(FormatTrait; Display Debug LowerExp UpperExp Octal Pointer Binary LowerHex UpperHex);
+spanless_eq_enum!(GenBlockKind; Async Gen);
spanless_eq_enum!(GenericArg; Lifetime(0) Type(0) Const(0));
spanless_eq_enum!(GenericArgs; AngleBracketed(0) Parenthesized(0));
spanless_eq_enum!(GenericBound; Trait(0 1) Outlives(0));
@@ -582,7 +584,7 @@ spanless_eq_enum!(WherePredicate; BoundPredicate(0) RegionPredicate(0) EqPredica
spanless_eq_enum!(ExprKind; Array(0) ConstBlock(0) Call(0 1) MethodCall(0)
Tup(0) Binary(0 1 2) Unary(0 1) Lit(0) Cast(0 1) Type(0 1) Let(0 1 2 3)
If(0 1 2) While(0 1 2) ForLoop(0 1 2 3) Loop(0 1 2) Match(0 1) Closure(0)
- Block(0 1) Async(0 1) Await(0 1) TryBlock(0) Assign(0 1 2) AssignOp(0 1 2)
+ Block(0 1) Gen(0 1 2) Await(0 1) TryBlock(0) Assign(0 1 2) AssignOp(0 1 2)
Field(0 1) Index(0 1 2) Underscore Range(0 1 2) Path(0 1) AddrOf(0 1 2)
Break(0 1) Continue(0) Ret(0) InlineAsm(0) OffsetOf(0 1) MacCall(0)
Struct(0) Repeat(0 1) Paren(0) Try(0) Yield(0) Yeet(0) Become(0)
diff --git a/vendor/syn/tests/repo/mod.rs b/vendor/syn/tests/repo/mod.rs
index 61d5ff35f..9d5dfa2f7 100644
--- a/vendor/syn/tests/repo/mod.rs
+++ b/vendor/syn/tests/repo/mod.rs
@@ -13,12 +13,14 @@ use std::path::{Path, PathBuf};
use tar::Archive;
use walkdir::{DirEntry, WalkDir};
-const REVISION: &str = "9f5fc1bd443f59583e7af0d94d289f95fe1e20c4";
+const REVISION: &str = "a2f5f9691b6ce64c1703feaf9363710dfd7a56cf";
#[rustfmt::skip]
static EXCLUDE_FILES: &[&str] = &[
// TODO: CStr literals: c"…", cr"…"
// https://github.com/dtolnay/syn/issues/1502
+ "src/tools/clippy/tests/ui/needless_raw_string.rs",
+ "src/tools/clippy/tests/ui/needless_raw_string_hashes.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0085_expr_literals.rs",
// TODO: explicit tail calls: `become _g()`
@@ -27,7 +29,12 @@ static EXCLUDE_FILES: &[&str] = &[
// TODO: non-lifetime binders: `where for<'a, T> &'a Struct<T>: Trait`
// https://github.com/dtolnay/syn/issues/1435
+ "src/tools/rustfmt/tests/source/issue_5721.rs",
+ "src/tools/rustfmt/tests/source/non-lifetime-binders.rs",
+ "src/tools/rustfmt/tests/target/issue_5721.rs",
+ "src/tools/rustfmt/tests/target/non-lifetime-binders.rs",
"tests/rustdoc-json/non_lifetime_binders.rs",
+ "tests/rustdoc/inline_cross/auxiliary/non_lifetime_binders.rs",
"tests/rustdoc/non_lifetime_binders.rs",
// TODO: return type notation: `where T: Trait<method(): Send>`
@@ -36,6 +43,19 @@ static EXCLUDE_FILES: &[&str] = &[
"tests/ui/associated-type-bounds/return-type-notation/basic.rs",
"tests/ui/feature-gates/feature-gate-return_type_notation.rs",
+ // TODO: lazy type alias syntax with where-clause in trailing position
+ // https://github.com/dtolnay/syn/issues/1525
+ "tests/rustdoc/typedef-inner-variants-lazy_type_alias.rs",
+
+ // TODO: gen blocks and functions
+ // https://github.com/dtolnay/syn/issues/1526
+ "tests/ui/coroutine/gen_block_is_iter.rs",
+ "tests/ui/coroutine/gen_block_iterate.rs",
+
+ // TODO: struct literal in match guard
+ // https://github.com/dtolnay/syn/issues/1527
+ "tests/ui/parser/struct-literal-in-match-guard.rs",
+
// Compile-fail expr parameter in const generic position: f::<1 + 2>()
"tests/ui/const-generics/early/closing-args-token.rs",
"tests/ui/const-generics/early/const-expression-parameter.rs",
@@ -108,9 +128,6 @@ static EXCLUDE_FILES: &[&str] = &[
"tests/ui/lifetimes/bare-trait-object.rs",
"tests/ui/parser/bounds-obj-parens.rs",
- // Obsolete box syntax
- "src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0132_box_expr.rs",
-
// Invalid unparenthesized range pattern inside slice pattern: `[1..]`
"tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs",
diff --git a/vendor/syn/tests/test_expr.rs b/vendor/syn/tests/test_expr.rs
index 5d529bf14..2574ea548 100644
--- a/vendor/syn/tests/test_expr.rs
+++ b/vendor/syn/tests/test_expr.rs
@@ -1,11 +1,11 @@
-#![allow(clippy::uninlined_format_args)]
+#![allow(clippy::single_element_loop, clippy::uninlined_format_args)]
#[macro_use]
mod macros;
use proc_macro2::{Delimiter, Group, Ident, Punct, Spacing, Span, TokenStream, TokenTree};
use quote::quote;
-use syn::{Expr, ExprRange};
+use syn::{Expr, ExprRange, Stmt};
#[test]
fn test_expr_parse() {
@@ -310,3 +310,32 @@ fn test_ranges() {
syn::parse_str::<Expr>("lo...").unwrap_err();
syn::parse_str::<Expr>("lo...hi").unwrap_err();
}
+
+#[test]
+fn test_ambiguous_label() {
+ for stmt in [
+ quote! {
+ return 'label: loop { break 'label 42; };
+ },
+ quote! {
+ break ('label: loop { break 'label 42; });
+ },
+ quote! {
+ break 1 + 'label: loop { break 'label 42; };
+ },
+ quote! {
+ break 'outer 'inner: loop { break 'inner 42; };
+ },
+ ] {
+ syn::parse2::<Stmt>(stmt).unwrap();
+ }
+
+ for stmt in [
+ // Parentheses required. See https://github.com/rust-lang/rust/pull/87026.
+ quote! {
+ break 'label: loop { break 'label 42; };
+ },
+ ] {
+ syn::parse2::<Stmt>(stmt).unwrap_err();
+ }
+}