Commit graph

66 commits

Author SHA1 Message Date
Aleksey Kladov
8d8c26e6f5 internal: a bit more of cwd safety for flycheck 2021-07-17 18:13:35 +03:00
Alex Good
e240eb67a8 Introduce proc_macro_srv::abis, impl 1.47 and 1.55
Rather than a "Stable" and "Nightly" ABI we instead name ABIs based on
the version of the rust compiler in which they were introduced. We place
these ABIs in a new module - `proc_macro_srv::abis` - where we also add
some mchinery to abstract over ABIs. This should make it easy to add new
ABIs at a later date as the rust compiler evolves.
2021-07-12 16:05:45 +01:00
alexjg
14a51d28b5 check rustc major version == 1 not < 1
Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
2021-07-12 16:05:45 +01:00
Alex Good
39b8d10b93 Use rustc version of dylib to choose which proc macro ABI to use 2021-07-12 16:05:45 +01:00
Alex Good
a8b0a91011 copy proc_maco to proc_macro_nightly and modify for nightly ABI compatibility 2021-07-12 16:05:45 +01:00
kjeremy
35016c772c cargo_metadata 0.14
Removes the following dependent crates:
* semver-parser
* pest
* ucd-trie

Removes project_model's dependency on itertools
2021-07-09 11:01:55 -04:00
Manas
f5c9407a8f This patch shortens the spawned threads' names, as threads on Linux
have an upper limit of 16 characters for their names.
2021-07-08 18:27:54 +05:30
Manas
5e6eee5f63 Explicitly name all spawned threads
The thread name is shown in debugger as well as panic messages and this
patch makes it easier to follow a thread instead of looking through
full backtrace, by naming all spawned threads according to their
functioning.
2021-07-08 01:23:57 +05:30
Aleksey Kladov
86720f2953 minor: drop dummy authors field 2021-07-05 14:19:41 +03:00
Aleksey Kladov
c27fdc75fa internal: add cloning macro fixture
Macro that deep clone the tokens but otherwise preserves source
locations and hygiene info is an interesting case for IDE support. Lets
have this, although we don't actively use it at the moment.
2021-06-25 23:37:55 +03:00
kjeremy
5b6e168928 Update crates 2021-06-22 13:18:48 -04:00
Clemens Wasser
47747cd412 Apply some clippy suggestions 2021-06-21 16:40:21 +02:00
bors[bot]
5a8ddb4b2d
Merge #9260
9260: tree-wide: make rustdoc links spiky so they are clickable r=matklad a=lf-

Rustdoc was complaining about these while I was running with --document-private-items and I figure they should be fixed.

Co-authored-by: Jade <software@lfcode.ca>
2021-06-14 07:16:48 +00:00
Jade
20b325c7d5 tree-wide: make rustdoc links spiky so they are clickable 2021-06-13 21:58:05 -07:00
Maan2003
5ac6804bb3
cargo fmt 2021-06-13 09:48:15 +05:30
Maan2003
aabd41cafc
clippy::redundant_field_names 2021-06-13 09:40:22 +05:30
Maan2003
c50b4579ec
clippy::useless_return 2021-06-13 09:35:29 +05:30
Jonas Schievink
d236fc6abe Try to fix unique file names on Windows 2021-06-09 18:02:04 +02:00
Jonas Schievink
05b3a4bc93 Build test-macros in a build script 2021-06-09 17:16:52 +02:00
Jonas Schievink
b5fe4c6ef0 Use cargo check again 2021-05-31 18:58:36 +02:00
Jonas Schievink
cfcadcb295 Simplify proc_macro_srv tests 2021-05-31 17:32:56 +02:00
Laurențiu Nicola
741f47f208 Update test fixtures 2021-05-24 18:18:05 +03:00
Laurențiu Nicola
d525cfc85a Bump object 2021-05-24 16:35:23 +03:00
Edwin Cheng
55a3364e35 Fix parse u128 bug in proc-macro 2021-03-31 19:50:36 +08:00
Edwin Cheng
79f583ed66 Improve message usage in proc-macro
Reuse storage for the buffer send to child process of proc-macro.
2021-03-24 03:51:06 +08:00
Kevin Mehall
0a0e22235b Make bare underscore token an Ident rather than Punct in proc-macro 2021-03-20 12:28:44 -06:00
Edwin Cheng
a8c9c88292 Add test for proc-macro meta info retrieval 2021-03-15 23:38:22 +08:00
Aleksey Kladov
842d8ad9c8 Compilation speed 2021-03-09 22:30:58 +03:00
Laurențiu Nicola
fc9eed4836 Use upstream cov-mark 2021-03-08 22:19:44 +02:00
Kevin Mehall
aea9749390 Move TokenStream::to_string helpers inside the method 2021-03-06 12:30:43 -07:00
Kevin Mehall
93c9b34635 Make a placeholder panic message explain its purpose 2021-03-06 09:51:13 -07:00
Kevin Mehall
62f594b390 Refactor TokenStream to hold Vec<TokenTree> instead of tt::Subtree
`TokenStream` assumes that its subtree's delimeter is `None`, and this
should be encoded in the type system instead of having a delimiter field
that is mostly ignored.

`tt::Subtree` is just `pub delimiter: Option<Delimiter>, pub
token_trees: Vec<TokenTree>`, so a Subtree that is statically guaranteed
not to have a delimiter is just Vec<TokenTree>.
2021-03-06 09:48:30 -07:00
Kevin Mehall
632fa8ef4a Fix TokenStream::from_str for input consisting of a single Group
TokenStream holds a `tt::Subtree` but assumes its `delimiter` is always
`None`. In particular, the iterator implementation iterates over the
inner `token_trees` and ignores the `delimiter`.

However, `TokenStream::from_str` violated this assumption when the input
consists of a single Group by producing a Subtree with an outer
delimiter, which was ignored as seen by a procedural macro.

In this case, wrap an extra level of Subtree around it.

Fixes #7810
Fixes #7875
2021-03-06 09:48:08 -07:00
Edwin Cheng
83230b2704 Fix test 2021-03-06 03:30:22 +08:00
Edwin Cheng
0405d758a5 Simplify TokenStream FromStr 2021-03-06 03:17:36 +08:00
bors[bot]
8eee9149e8
Merge #7848
7848: Bump cargo_metadata r=matklad a=lnicola



Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-03-02 12:31:15 +00:00
Laurențiu Nicola
b20708f6ee Bump cargo_metadata 2021-03-02 14:27:29 +02:00
vlad20012
a157f19bf5
Fix proc macro TokenStream::from_str token ids 2021-03-01 19:55:30 +03:00
Jonas Bushart
bd525c9d20 Add isize to the list of suffixed integers in typed_integer
The missing `isize` in `typed_integers` seems to just be an oversight.

Might fix: #7751
2021-02-22 14:48:56 +01:00
bstrie
3c922072ae Remove use of deprecated std::collections::Bound 2021-02-16 18:22:14 -05:00
kjeremy
61092bd900 libloading 0.7
See https://docs.rs/libloading/0.7.0/libloading/changelog/r0_7_0/index.html
2021-02-11 10:07:49 -05:00
kjeremy
953883ca54 Use non-deprecated memmap2 crate
`cargo audit` complains that `memmap` is unmaintained so switch to
RazrFalcon's maintained version.

Removes yet another edge on winapi
2021-02-02 10:25:17 -05:00
kjeremy
a8b984185b cargo update
Update test_serialize_proc_macro for new serde version
2021-01-18 13:13:24 -05:00
yugo-horie
f273995a25 Swap assert_eq_text\!(expected, actual) 2021-01-16 13:30:26 +09:00
kjeremy
1da68e87af Unfreeze cargo_metadata
It now pulls in a newer version of semver-parser.
2021-01-11 08:27:16 -05:00
Vincent Esche
21f8239ac8 Fixed typos in code comments 2021-01-09 15:41:29 +01:00
Jesse Bakker
974313eb87 Replace last usages of difference with dissimilar 2021-01-06 18:13:29 +01:00
Edwin Cheng
1bd1830f50 Fix spacing in proc-macro tokens to_string 2020-12-31 13:36:19 +08:00
Jonas Schievink
70877428a8 Pass crate environment to proc macros 2020-12-27 15:29:47 +01:00
bors[bot]
0fd75c98ac
Merge #7047
7047: Add force_show_panics flag for proc-macro bridge r=jonas-schievink a=edwin0cheng

https://github.com/rust-lang/rust/pull/75082 and https://github.com/rust-lang/rust/pull/76292 added a new flag in `proc_macro::Bridge` such that the ABI was changed. These ABI changing are the reason of some weird panics which caused #6880 and maybe related to the panic mentioned in #6820.

These changes are landed on rust stable 1.48 so I think it is okay to apply it now.

fixes #6880

r @jonas-schievink 


Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2020-12-27 13:30:06 +00:00