Commit Graph

542 Commits

Author SHA1 Message Date
David Tolnay
f6753b8caa
Update ui tests to nightly-2020-02-08 2020-02-07 18:30:03 -08:00
David Tolnay
bf6f5f6c44
Merge pull request #141 from chills42/master
Adds an unsafe_code linting rule
2020-01-15 12:29:46 -08:00
Craig Hills
6d65b99550 Adds an unsafe_code linting rule
This marks the use of unsafe code within the library as an error.
2020-01-15 11:10:03 -05:00
David Tolnay
0791596df6
Update ui tests to nightly-2020-01-11 2020-01-10 22:00:31 -08:00
David Tolnay
0cee3d2bbf
Opt in to experimental trybuild diffs 2019-12-25 17:40:28 -05:00
David Tolnay
2a803f7299
Merge pull request #140 from mystor/quote_raw_id
Avoid panic when using quote! on raw identifiers
2019-12-22 23:54:53 -05:00
Nika Layzell
8daa9a825d Avoid panic when using quote! on raw identifiers
The `quote!` optimization added in 8d155b02f4
calls `Ident::new`, which does not handle identifiers containing the `r#` raw
prefix, panicing if they are passed in.

As `Ident::new_raw` is not stable, raw identifiers are parsed using the existing
`parse` codepath, with only non-raw identifiers being passed to `Ident::new`.
This mimics the logic from the `mk_ident` method created for `format_ident!`,
with some small optimizations due to relaxed requirements.

The previous `is_ident` optimization within `__rt::parse` has also been removed,
as it is now redundant.
2019-12-22 23:39:03 -05:00
David Tolnay
5c55eb7a8c
Remove unneeded explicit lifetimes from IdentFragment impls 2019-11-30 15:47:36 -08:00
David Tolnay
1d90e23716
Update ui tests to nightly-2019-11-25 2019-11-24 17:55:18 -08:00
David Tolnay
d760e4f200
Update ui tests to nightly-2019-11-22 2019-11-21 22:51:08 -08:00
David Tolnay
a346d2cb2d
Raise minimum tested version to rustc 1.36
Our dev-dependency on trybuild no longer supports 1.31 - 1.35.
2019-10-28 20:29:23 -07:00
David Tolnay
86f9985b72
Merge pull request #135 from dtolnay/opt
Recognize ident tokens instead of doing is_ident at runtime
2019-10-13 22:25:43 -07:00
David Tolnay
8407b03e4e
Upgrade to rustversion 1.0 2019-10-11 11:37:45 -07:00
David Tolnay
8d155b02f4
Recognize ident tokens instead of doing is_ident at runtime 2019-10-10 23:25:29 -07:00
David Tolnay
ed61aaeea1
Remove unneeded lib name from Cargo.toml
This is left over from the quote-next preview releases.
2019-10-04 23:01:33 -04:00
David Tolnay
55f5793d96 Update ui test to nightly-2019-09-10 2019-09-09 19:27:24 -07:00
David Tolnay
727436c6c1
Release 1.0.2 2019-08-17 19:57:26 -07:00
David Tolnay
53f65a5e5e
Merge pull request #131 from dtolnay/star
Fix missing star after repetition
2019-08-17 19:57:15 -07:00
David Tolnay
bce8f54e72
Fix potential skipped star after repetitions 2019-08-17 19:50:13 -07:00
David Tolnay
3179b09c0a
Add regression test for issue 130 2019-08-17 19:47:09 -07:00
David Tolnay
40b9852230
Merge pull request #128 from mystor/format_ident_examples
Encourage format_ident! over Ident::new in docs
2019-08-16 12:49:53 -07:00
Nika Layzell
35ec18343c Encourage format_ident over Ident::new() 2019-08-16 12:23:29 -07:00
Nika Layzell
c6a5958a87 Add format_ident example from lib.rs to the README 2019-08-16 12:10:17 -07:00
David Tolnay
78f551dd7c
Release 1.0.1 2019-08-16 09:11:42 -07:00
David Tolnay
40f0213ef1
Update to 1.0 in readme and links
Fixes #126.
2019-08-14 21:59:44 -07:00
David Tolnay
97d4571207
Release 1.0.0 2019-08-13 09:04:31 -07:00
David Tolnay
ab7241b6d3
Release 1.0.0-rc3 2019-08-10 20:35:59 -07:00
David Tolnay
1d757d4bda
Can assume Span::join exists 2019-08-10 20:34:38 -07:00
David Tolnay
640899aa86
Update to proc-macro2 rc2 2019-08-10 20:18:07 -07:00
David Tolnay
35c085d4ae
Space apart rustdoc sections 2019-08-10 17:51:58 -07:00
David Tolnay
dbe67ef8d9
Document tuple indexing
Fixes #101.
2019-08-10 17:24:05 -07:00
David Tolnay
353ecdcda8
Merge pull request #125 from dtolnay/doc
Document interpolating in doc comments
2019-08-10 16:42:38 -07:00
David Tolnay
96ec7e7f64
Document interpolating in doc comments 2019-08-10 16:33:42 -07:00
David Tolnay
5dd3812c1c
Remove outdated doc about def_site 2019-08-10 13:51:53 -07:00
David Tolnay
5218552d94
Em dashes 2019-08-10 13:51:22 -07:00
David Tolnay
6e16c8f3ba
Add format_ident to ident concatenation example 2019-08-10 13:46:54 -07:00
David Tolnay
b9e0394401
Clarify into-conversion to proc_macro::TokenStream 2019-08-10 13:35:39 -07:00
David Tolnay
bd7b579371
Remove unneeded type parameters from TokenStreamExt 2019-08-10 13:31:22 -07:00
David Tolnay
c480dc7dfb
Add a version of into_token_stream that takes &self 2019-08-10 13:28:26 -07:00
David Tolnay
682eea40f3
Remove excessive doc linking 2019-08-10 13:17:49 -07:00
David Tolnay
f8c0d7cdf9
Remove format_ident panic case from doc
Formatting trait implementations are specified to be infallible.

> Formatting implementations should ensure that they propagate errors
> from the Formatter (e.g., when calling write!). However, they should
> never return errors spuriously. That is, a formatting implementation
> must and may only return an error if the passed-in Formatter returns
> an error. This is because, contrary to what the function signature
> might suggest, string formatting is an infallible operation. This
> function only returns a result because writing to the underlying
> stream might fail and it must provide a way to propagate the fact that
> an error has occurred back up the stack.
2019-08-10 13:10:10 -07:00
David Tolnay
5a1a65ce6f
Make the description of formatting traits more recognizable 2019-08-10 13:08:34 -07:00
David Tolnay
7d0f1bc413
Update crate-level rustdoc for 1.0 2019-08-10 13:03:35 -07:00
David Tolnay
d41b84e453
Release 1.0.0-rc2 2019-08-10 12:45:55 -07:00
David Tolnay
6f736c2457
Allow ?Sized implementations of Spanned 2019-08-03 20:31:58 -07:00
David Tolnay
1fcea59c2c
Remove ```edition2018 now that whole crate is on 2018 2019-08-03 20:27:44 -07:00
David Tolnay
241e9c5c99
Call out that spanned module is not public 2019-08-03 20:20:36 -07:00
David Tolnay
1659244c6b
Rename method of Spanned to avoid conflict with syn Spanned 2019-08-03 20:20:06 -07:00
David Tolnay
71b1e6f4c5
Spanned trait that is implemented for ToTokens as well as Span 2019-08-03 20:07:26 -07:00
David Tolnay
fa7c30f422
Release 1.0.0-rc1 2019-07-29 09:48:38 -07:00