Commit Graph

93 Commits

Author SHA1 Message Date
Jonas Schievink
3dd5e273b6 Shrink diagnostic spans for errors inside macros 2022-01-08 15:40:42 +01:00
Laurențiu Nicola
c934a99fd3 Rename and use the 1.55 ABI for 1.54 2022-01-04 14:06:26 +02:00
bors[bot]
f46731a230
Merge #11028
11028: Bump MSRV (1.57) r=Veykril a=iDawer

This bumps MSRV on all crates to 1.57 except `la-arena`

#10986 requires >=1.57 

Co-authored-by: iDawer <ilnur.iskhakov.oss@outlook.com>
2021-12-20 13:45:35 +00:00
Laurențiu Nicola
c9ca77f641 Bump object 2021-12-19 19:00:42 +02:00
iDawer
676744be6e Bump MSRV (1.57) 2021-12-16 01:56:12 +05:00
Laurențiu Nicola
6196b928a4 Fix proc macro ABI version checks 2021-11-18 10:24:24 +02:00
Alex Good
abdb2acbe5
Add proc macro ABI for rustc 1.58 2021-11-16 14:14:08 +00:00
bors[bot]
9ee855bcc5
Merge #10680
10680: implement Literal::from_str r=jonas-schievink a=spookyvision

this apparently fixes RTIC 0.6's 
```rust
#[rtic::app]
mod app {}
```

Co-authored-by: Anatol Ulrich <anatol.ulrich@ferrous-systems.com>
2021-11-03 16:19:42 +00:00
Anatol Ulrich
a6df2b16df implement Literal::from_str 2021-11-03 16:50:43 +01:00
Laurențiu Nicola
80f9afa1ec Bump object avoid a duplicate dependency 2021-10-30 09:02:45 +03:00
Lukas Wirth
d2b8ca9b52 fix: Implement most proc_macro span handling for other ABIs 2021-10-25 16:43:49 +02:00
Laurențiu Nicola
8457ae34bd Set MSRV 2021-10-23 15:07:11 +03:00
Laurențiu Nicola
ca44b6892e Use array IntoIter 2021-10-22 09:23:29 +03:00
Lukas Wirth
1294bfce86 Migrate to edition 2021 2021-10-21 20:10:40 +02:00
Aleksey Kladov
afacdd612d internal: update expect 2021-10-09 17:17:16 +03:00
Aramis Razzaghipour
9583dd5725
Replace if let with match where appropriate 2021-10-05 09:00:21 +11:00
Laurențiu Nicola
ffa8270f6a Bump memmap2 2021-10-01 18:55:52 +03:00
bors[bot]
533ca584c3
Merge #10378
10378: fix: Implement most proc_macro span handling methods r=jonas-schievink a=jonas-schievink

This closes https://github.com/rust-analyzer/rust-analyzer/issues/10368 – some APIs are still missing, but they are either for unstable features or require https://github.com/rust-analyzer/rust-analyzer/issues/9403

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-09-27 18:00:08 +00:00
Jonas Schievink
577aedb8cf Implement most proc_macro span handling methods 2021-09-27 19:58:07 +02:00
Jonas Schievink
9641bc7369 Implement save_span / recover_proc_macro_span 2021-09-27 19:42:39 +02:00
Jonas Schievink
d05eae6ada Make stringify! prettify its input
This will insert whitespace if the invocation is inside another macro
2021-09-27 19:02:03 +02:00
Giles Cope
15312aab58
removing seemingly unused dev deps. 2021-09-11 16:26:36 +01:00
Aleksey Kladov
d8a3d6f378 internal: cleanup proc macro server error handlig
When dealing with proc macros, there are two very different kinds of
errors:

* first, usual errors of "proc macro panicked on this particular input"
* second, the proc macro server might day if the user, eg, kills it

First kind of errors are expected and are a normal output, while the
second kind are genuine IO-errors.

For this reason, we use a curious nested result here: `Result<Result<T,
E1>, E2>` pattern, which is 100% inspired by http://sled.rs/errors.html
2021-08-31 19:01:39 +03:00
Aleksey Kladov
c639fe333f internal: improve compilation critical path a bit 2021-08-28 22:43:37 +03:00
Aleksey Kladov
55e9476e4b internal: more production-ready proc-macro RPC deserialization
* avoid arbitrary nested JSON tree (danger of stack overflow)
* use more compact representation.
2021-08-28 22:43:37 +03:00
Alex Good
b111357b54
Copy the proc_macro crate for the 1.56 ABI 2021-08-07 16:34:59 +01:00
Laurențiu Nicola
90e05ba57e Bump deps 2021-07-31 11:25:03 +03:00
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