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
David Tolnay
8dd9b01c58
Touch up PR 1236
2022-10-20 13:41:59 -07:00
David Tolnay
2b3f742696
Merge pull request #1236 from CAD97/cursor-cmp
...
Implement `PartialOrd` for `Cursor`
2022-10-20 13:34:34 -07:00
Christopher Durham
f6a43aa4d6
Handle the case where verbatim enters a None group
...
Fixes #1235 . As seen in that issue, a syntax node can actually cross the
border of a None-delimited group, due to such groups being transparent
to the parser in most cases. In the cases that this can occur, the
presence of the group is known to be semantically irrelevant, so we just
explicitly ignore the presence of the group.
It's important that we only ignore None-delimited groups when the
verbatim end requires entering the group, as such groups can have semantic
impact (such as grouping binary operator chains) in other positions.
2022-10-20 15:14:33 -05:00
Christopher Durham
e9fb6a9ea5
Implement PartialOrd for Cursor
2022-10-20 15:14:33 -05:00
Christopher Durham
26a605e565
Add test for Item::Verbatim splitting a None group
...
(see issue #1235 )
2022-10-20 15:13:52 -05:00
David Tolnay
a807b16011
Update test suite to nightly-2022-10-13
2022-10-13 09:13:00 -07:00
David Tolnay
711cd8c3d4
Update test suite to nightly-2022-10-11
2022-10-10 22:11:03 -07:00
David Tolnay
e4127c706c
Release 1.0.102
2022-10-06 17:43:35 -07:00
David Tolnay
691fc0676c
Merge pull request #1230 from dtolnay/groupgeneric
...
Fix left shift after macro metavariable in type position
2022-10-06 17:42:47 -07:00
David Tolnay
61ece4ca3c
Fix left shift after macro metavariable in type position
2022-10-06 17:36:06 -07:00
David Tolnay
7909596ae8
Rename TokenBuffer's recursive construction logic
2022-09-29 09:15:43 -07:00
David Tolnay
f169b98e29
Delete TokenBuffer's empty Drop impl
...
See https://github.com/dtolnay/syn/pull/1223#pullrequestreview-1124705030
2022-09-29 09:13:28 -07:00
David Tolnay
65ee83a0ad
Simplify Cursor::lifetime using a question mark
2022-09-28 22:47:08 -07:00
David Tolnay
502968cc68
Implement skip and token_tree using the 'len' of entries being stepped over
2022-09-28 22:12:55 -07:00
David Tolnay
f895b8aa3f
Inline some of the logic for entering a Group
2022-09-28 21:58:17 -07:00
David Tolnay
71260defc6
Touch up PR 1223
2022-09-28 21:41:37 -07:00
David Tolnay
296e0469b8
Merge pull request #1226 from dtolnay/bom
...
Pull in proc-macro2 1.0.46 for byte order mark fix
2022-09-28 19:10:14 -07:00
David Tolnay
5f8ddfb5a8
Pull in proc-macro2 1.0.46 for byte order mark fix
...
Without this, our benchmarks fail against the current contents of the
rust-lang/rust repo.
$ cargo test --release --bench rust --features full,test
871050 lines in 12914 files
read_from_disk: elapsed=0.170s
tokenstream_parse: FAIL tests/rust/src/test/ui/json/json-bom-plus-crlf-multifile-aux.rs
thread 'main' panicked at 'assertion failed: `(left == right)`
left: `12913`,
right: `12914`', benches/rust.rs:122:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2022-09-28 19:02:05 -07:00
David Tolnay
ce00ab0755
Merge pull request #1225 from dtolnay/benchtest
...
Fix instruction for running benchmarks
2022-09-28 18:56:41 -07:00
David Tolnay
b0fcbabe5b
Fix instruction for running benchmarks
2022-09-28 18:24:19 -07:00
David Tolnay
91f01419b7
Merge pull request #1223 from CAD97/flat-tokenbuffer
...
Use a flat layout for TokenBuffer
2022-09-28 16:55:27 -07:00
David Tolnay
b74703d9d5
Merge pull request #1224 from dtolnay/fuzz
...
Add fuzz target for TokenBuffer and file parse
2022-09-28 14:04:16 -07:00
David Tolnay
f199b225f0
Check for outdated deps in fuzz target
2022-09-28 13:55:48 -07:00
David Tolnay
93497ba9e2
Add CI build to cover fuzz target
2022-09-28 13:55:48 -07:00
David Tolnay
01f198f601
Add fuzz targets for TokenBuffer and file parse
2022-09-28 13:55:48 -07:00
Christopher Durham
65cc34a4a3
Use a flat layout for TokenBuffer
2022-09-27 19:49:10 -05:00
David Tolnay
96beb3bdd6
Release 1.0.101
2022-09-26 10:59:31 -07:00
David Tolnay
8f0368e1bd
Merge pull request #1221 from dtolnay/litparse
...
Bypass a round trip through TokenBuffer in LitStr::parse
2022-09-24 14:16:53 -07:00
David Tolnay
ea637b2bf6
Bypass a round trip through ParseBuffer in LitStr::parse
2022-09-24 14:05:08 -07:00
David Tolnay
638e96751d
Merge pull request #1220 from dtolnay/rustdoclink
...
Remove workaround for mod@crate::parse rustdoc links
2022-09-24 13:58:23 -07:00
David Tolnay
620852b739
Link to parse module using an intra rustdoc link
2022-09-24 13:49:54 -07:00
David Tolnay
c1d6739182
Revert "Work around rustdoc ambiguity bug"
...
This reverts commit ae1983c87a
.
2022-09-24 13:47:07 -07:00
David Tolnay
3c49303bed
Combine tests gitignore into single top level gitignore
2022-09-24 10:54:50 -07:00
David Tolnay
3d01fc3fea
Release 1.0.100
2022-09-18 17:18:53 -07:00
David Tolnay
308d77b768
Merge pull request #1218 from dtolnay/variadiccomma
...
Fix printing of variadic extern fn with trailing comma
2022-09-18 17:18:31 -07:00
David Tolnay
9b589ba216
Fix printing of variadic extern fn with trailing comma
2022-09-18 17:11:28 -07:00
David Tolnay
42e9942cc6
Allow multiple parenthesized path argument segments in the same path
2022-09-18 17:07:40 -07:00
David Tolnay
ba6cd8ef49
Merge pull request #1217 from dtolnay/typepathfnwithcoloncolon
...
Parse associated type on path with parenthesized generic arguments
2022-09-18 17:05:46 -07:00
David Tolnay
194c3d4011
Insane syntax on feature="full" only
2022-09-18 16:56:59 -07:00
David Tolnay
6e09f2d9eb
Parse associated type on path with parenthesized generic arguments
2022-09-18 16:55:07 -07:00
David Tolnay
15c00753ec
Skip traversing into const params for precedence test
2022-09-18 16:45:34 -07:00
David Tolnay
e3d6e7b66c
Reorder GenericArgument::Const next to Type
...
Now that const generics were stabilized.
2022-09-18 16:16:53 -07:00
David Tolnay
be1b7585a5
Merge pull request #1216 from dtolnay/anglebracketedorder
...
Preserve ordering of associated type constraints relative to types
2022-09-18 16:16:41 -07:00
David Tolnay
f8558311c0
Preserve ordering of associated type constraints relative to types
...
Rustc appears to have settled on no ordering restriction beyond
lifetimes going first.
2022-09-18 16:09:58 -07:00
David Tolnay
3e09e3ba89
Merge pull request #1215 from dtolnay/staticasync
...
Parse 'static async' closures
2022-09-18 16:07:50 -07:00
David Tolnay
aa4fa7001a
Parse 'static async' closures
2022-09-18 16:00:31 -07:00