David Tolnay
6004b0aa0d
Merge pull request #354 from dtolnay/bom
...
Handle parsing input that starts with byte order mark
2022-09-28 18:58:41 -07:00
David Tolnay
1d068c8f1a
Test that byte order mark can only go at beginning of input
2022-09-28 18:53:26 -07:00
David Tolnay
e2327f0854
Strip a byte order mark if present
2022-09-28 18:52:07 -07:00
David Tolnay
eeb2e5b922
Add a test involving byte order mark
...
Currently fails with:
thread 'byte_order_mark' panicked at 'called `Result::unwrap()` on
an `Err` value: LexError { span: Span }', tests/test.rs:637:48
2022-09-28 18:42:24 -07:00
David Tolnay
f26128d5d6
Release 1.0.45
2022-09-28 13:39:20 -07:00
David Tolnay
4784921da6
Merge pull request #352 from dtolnay/fuzz
...
Add fuzz target for fallback TokenStream parser
2022-09-28 13:38:57 -07:00
David Tolnay
4f0ade51b1
Check for outdated deps in fuzz target
2022-09-28 13:35:30 -07:00
David Tolnay
84fd957bd7
Add CI build to cover fuzz target
2022-09-28 13:32:25 -07:00
David Tolnay
4a8ad4d901
Add fuzz target for fallback TokenStream parser
2022-09-28 13:31:00 -07:00
David Tolnay
164a5fdee6
Merge pull request #351 from dtolnay/badraw
...
Fix panic on parsing disallowed raw identifier in fallback mode
2022-09-28 13:28:56 -07:00
David Tolnay
1eda96aace
Fix panic on parsing disallowed raw identifier in fallback mode
2022-09-28 13:24:58 -07:00
David Tolnay
8f4fd2c7ac
Release 1.0.44
2022-09-24 15:10:08 -07:00
David Tolnay
d531452a0e
Add a sponsors link
2022-09-24 15:09:32 -07:00
David Tolnay
c0592e32eb
Merge pull request #348 from dtolnay/beforeafter
...
Expose proc_macro's before() and after() methods on Span
2022-09-24 15:08:36 -07:00
David Tolnay
cc97264f9f
Expose proc_macro's before() and after() methods on Span
2022-09-24 15:03:15 -07:00
David Tolnay
648e2d8890
Remove default package.readme metadata from Cargo.toml
...
Since cargo 1.46.0, README.md is recognized by default.
2022-09-14 09:16:00 -07:00
David Tolnay
a9fcdc0682
GitHub Workflows security hardening
2022-09-02 15:09:30 -07:00
David Tolnay
c946dfecdc
Update ui test suite to nightly-2022-08-23
2022-08-22 23:05:51 -07:00
David Tolnay
774a265804
Release 1.0.43
2022-08-02 20:52:05 -07:00
David Tolnay
95f5e5aa2f
Update keywords in crates.io metadata
2022-08-02 10:38:56 -07:00
David Tolnay
971948ad69
Change std imports to core where possible
...
Useful for seeing what are the gaps toward being compatible with
no-std. Useful for copying chunks of code into a no-std crate.
2022-07-31 23:06:27 -07:00
David Tolnay
40c2cef7e7
Add authors to Cargo.toml
2022-07-31 19:27:22 -07:00
David Tolnay
efac9137d3
Unwrap description to one line in toml
2022-07-31 19:21:45 -07:00
David Tolnay
793cf1c616
Sort package entries in Cargo.toml
2022-07-31 19:19:04 -07:00
David Tolnay
e9a734c1b1
Ignore assertions_on_result_states clippy lint
...
error: called `assert!` with `Result::is_err`
--> tests/comments.rs:68:5
|
68 | assert!("/*/".parse::<TokenStream>().is_err());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `"/*/".parse::<TokenStream>().unwrap_err()`
|
= note: `-D clippy::assertions-on-result-states` implied by `-D clippy::all`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_result_states
error: called `assert!` with `Result::is_ok`
--> tests/test.rs:224:5
|
224 | assert!("1".parse::<Literal>().is_ok());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `"1".parse::<Literal>().unwrap()`
|
= note: `-D clippy::assertions-on-result-states` implied by `-D clippy::all`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_result_states
error: called `assert!` with `Result::is_ok`
--> tests/test.rs:225:5
|
225 | assert!("-1".parse::<Literal>().is_ok());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `"-1".parse::<Literal>().unwrap()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_result_states
error: called `assert!` with `Result::is_ok`
--> tests/test.rs:226:5
|
226 | assert!("-1u12".parse::<Literal>().is_ok());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `"-1u12".parse::<Literal>().unwrap()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_result_states
error: called `assert!` with `Result::is_ok`
--> tests/test.rs:227:5
|
227 | assert!("1.0".parse::<Literal>().is_ok());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `"1.0".parse::<Literal>().unwrap()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_result_states
error: called `assert!` with `Result::is_ok`
--> tests/test.rs:228:5
|
228 | assert!("-1.0".parse::<Literal>().is_ok());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `"-1.0".parse::<Literal>().unwrap()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_result_states
error: called `assert!` with `Result::is_ok`
--> tests/test.rs:229:5
|
229 | assert!("-1.0f12".parse::<Literal>().is_ok());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `"-1.0f12".parse::<Literal>().unwrap()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_result_states
error: called `assert!` with `Result::is_ok`
--> tests/test.rs:230:5
|
230 | assert!("'a'".parse::<Literal>().is_ok());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `"'a'".parse::<Literal>().unwrap()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_result_states
error: called `assert!` with `Result::is_ok`
--> tests/test.rs:231:5
|
231 | assert!("\"\n\"".parse::<Literal>().is_ok());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `"\"\n\"".parse::<Literal>().unwrap()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_result_states
error: called `assert!` with `Result::is_err`
--> tests/test.rs:232:5
|
232 | assert!("0 1".parse::<Literal>().is_err());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `"0 1".parse::<Literal>().unwrap_err()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_result_states
error: called `assert!` with `Result::is_err`
--> tests/test.rs:233:5
|
233 | assert!(" 0".parse::<Literal>().is_err());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `" 0".parse::<Literal>().unwrap_err()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_result_states
error: called `assert!` with `Result::is_err`
--> tests/test.rs:234:5
|
234 | assert!("0 ".parse::<Literal>().is_err());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `"0 ".parse::<Literal>().unwrap_err()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_result_states
error: called `assert!` with `Result::is_err`
--> tests/test.rs:235:5
|
235 | assert!("/* comment */0".parse::<Literal>().is_err());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `"/* comment */0".parse::<Literal>().unwrap_err()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_result_states
error: called `assert!` with `Result::is_err`
--> tests/test.rs:236:5
|
236 | assert!("0/* comment */".parse::<Literal>().is_err());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `"0/* comment */".parse::<Literal>().unwrap_err()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_result_states
error: called `assert!` with `Result::is_err`
--> tests/test.rs:237:5
|
237 | assert!("0// comment".parse::<Literal>().is_err());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `"0// comment".parse::<Literal>().unwrap_err()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_result_states
error: called `assert!` with `Result::is_err`
--> tests/test.rs:238:5
|
238 | assert!("- 1".parse::<Literal>().is_err());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `"- 1".parse::<Literal>().unwrap_err()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_result_states
error: called `assert!` with `Result::is_err`
--> tests/test.rs:239:5
|
239 | assert!("- 1.0".parse::<Literal>().is_err());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `"- 1.0".parse::<Literal>().unwrap_err()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_result_states
error: called `assert!` with `Result::is_err`
--> tests/test.rs:240:5
|
240 | assert!("-\"\"".parse::<Literal>().is_err());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `"-\"\"".parse::<Literal>().unwrap_err()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_result_states
error: called `assert!` with `Result::is_err`
--> tests/test.rs:385:5
|
385 | assert!(s.parse::<TokenStream>().is_err());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `s.parse::<TokenStream>().unwrap_err()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_result_states
2022-07-29 22:06:04 -07:00
David Tolnay
a77588be7e
Release 1.0.42
2022-07-25 16:21:29 -07:00
David Tolnay
a2b46f9c3b
Remove allocation from RcVec -> RcVecBuilder conversion
2022-07-25 13:55:03 -07:00
David Tolnay
d8c056b7e7
Clean up RcVec::get_mut
2022-07-25 13:25:09 -07:00
David Tolnay
0fbcf3bc6c
Eliminate redundant RcVec::new
2022-07-25 13:24:42 -07:00
David Tolnay
20eb5ed1d7
Merge pull request #341 from dtolnay/rcvec
...
Replace Rc<Vec<T>> with RcVec<T>
2022-07-25 12:24:24 -07:00
David Tolnay
275aaeb76b
Replace Rc<Vec<T>> with RcVec<T>
2022-07-25 12:16:46 -07:00
David Tolnay
e338234ead
Merge pull request #342 from dtolnay/debug
...
Improve Debug representation of token_stream::IntoIter
2022-07-25 12:16:36 -07:00
David Tolnay
9d91c4979f
Improve Debug representation of token_stream::IntoIter
2022-07-25 12:08:52 -07:00
David Tolnay
ee0e583d46
Merge pull request #340 from dtolnay/extend
...
Reduce make_mut calls in FromIterator and Extend impls
2022-07-25 11:10:00 -07:00
David Tolnay
c5db3d6da6
Reduce make_mut calls in FromIterator and Extend impls
2022-07-25 11:06:47 -07:00
David Tolnay
f66898b7da
Merge pull request #339 from dtolnay/push
...
Rename the two different token push methods
2022-07-25 11:05:53 -07:00
David Tolnay
c39fd4c3c9
Rename the two different token push methods
2022-07-25 10:58:53 -07:00
David Tolnay
682d119f4e
Merge pull request #338 from dtolnay/builder
...
Remove Vec from API of fallback::TokenStream
2022-07-25 10:52:12 -07:00
David Tolnay
535675e13c
Remove Vec from API of fallback::TokenStream
2022-07-25 10:46:33 -07:00
David Tolnay
3b8d972bab
Merge pull request #337 from dtolnay/doccomment
...
Eliminate a Vec alloc from doc comment parsing
2022-07-25 10:46:24 -07:00
David Tolnay
25eb2fbdce
Eliminate a Vec alloc from doc comment parsing
2022-07-25 10:42:22 -07:00
David Tolnay
09947f2e7f
Merge pull request #335 from dtolnay/rc
...
Reference count TokenStream in fallback mode
2022-07-25 00:05:12 -07:00
David Tolnay
6c66d8acd6
Reference count TokenStream in fallback mode
2022-07-24 23:47:00 -07:00
David Tolnay
67778bc3d2
Release 1.0.41
2022-07-24 21:45:15 -07:00
David Tolnay
6a3515559b
Merge pull request #334 from dtolnay/sizehint
...
Expose size_hint() for TokenStream's iterator
2022-07-24 21:44:31 -07:00
David Tolnay
25a20e0671
Expose size_hint() for TokenStream's iterator
2022-07-24 21:34:18 -07:00
David Tolnay
f4273659a2
Add test of ineffective TokenStream size_hint
2022-07-24 21:34:03 -07:00
David Tolnay
6ed82b0b83
Fix typo in nika XXX comment
2022-07-20 13:54:48 -07:00
David Tolnay
e4ed201c04
Fix rountrips typo in several places
2022-07-20 13:52:59 -07:00
David Tolnay
e6bc873948
Release 1.0.40
2022-06-19 18:40:49 -07:00