Commit Graph

20 Commits

Author SHA1 Message Date
Matthew Jasper cbcef3effc Rework `rustc_serialize`
- Move the type parameter from `encode` and `decode` methods to
  the trait.
- Remove `UseSpecialized(En|De)codable` traits.
- Remove blanket impls for references.
- Add `RefDecodable` trait to allow deserializing to arena-allocated
  references safely.
- Remove ability to (de)serialize HIR.
- Create proc-macros `(Ty)?(En|De)codable` to help implement these new
  traits.
2020-08-14 17:34:30 +01:00
Mark Rousskov dbc9894095 Drop unused extern crates 2020-02-04 08:14:08 -05:00
Mark Rousskov a06baa56b9 Format the world 2019-12-22 17:42:47 -05:00
bors 083b5a0a1b Auto merge of #66460 - cjgillot:hashstable_generic, r=Zoxc
Add a proc-macro to derive HashStable in librustc dependencies

A second proc-macro is added to derive HashStable for crates librustc depends on.
This proc-macro HashStable_Generic (to bikeshed) allows to decouple code and some librustc's boilerplate.

Not everything is migrated, because `Span` and `TokenKind` require to be placed inside librustc.
Types using them stay there too.

Split out of #66279
r? @Zoxc
2019-11-22 13:54:41 +00:00
Camille GILLOT 2add2075de Create derive proc-macro for Lift trait. 2019-11-18 08:41:28 +01:00
Camille GILLOT 5b0e702f6c Create a generic HashStable derive. 2019-11-17 22:37:01 +01:00
Camille GILLOT 9e28e9c545 Create TypeFoldable derive proc-macro. 2019-11-13 20:49:04 +01:00
Vadim Petrochenkov 5ae38bbc7c Stabilize proc macros in type positions 2019-09-30 21:59:35 +03:00
Mark Rousskov 2601c86487 Handle cfg(bootstrap) throughout 2019-08-14 05:39:53 -04:00
Vadim Petrochenkov 434152157f Remove lint annotations in specific crates that are already enforced by rustbuild
Remove some random unnecessary lint `allow`s
2019-07-28 18:46:24 +03:00
Mazdak Farrokhzad 485a084b45
Rollup merge of #61545 - flip1995:internal_lints, r=oli-obk
Implement another internal lints

cc #49509

This adds ~~two~~ one internal lint~~s~~:
1. LINT_PASS_IMPL_WITHOUT_MACRO: Make sure, that the `{declare,impl}_lint_pass` macro is used to implement lint passes. cc #59669
2. ~~USAGE_OF_TYCTXT_AND_SPAN_ARGS: item 2 on the list in #49509~~

~~With 2. I wasn't sure, if this lint should be applied everywhere. That means a careful review of 0955835 would be great. Also 73fb9b4 allows this lint on some functions. Should I also apply this lint there?~~

TODO (not directly relevant for review):
- [ ] https://github.com/rust-lang/rust/pull/59316#discussion_r280186517 (not sure yet, if this works or how to query for `rustc_private`, since it's not in [`Features`](https://doc.rust-lang.org/nightly/nightly-rustc/syntax/feature_gate/struct.Features.html) 🤔 cc @eddyb)
- [x] https://github.com/rust-lang/rust/pull/61735#discussion_r292389870
- [x] Check explicitly for the `{declare,impl}_lint_pass!` macros

r? @oli-obk
2019-07-05 20:26:51 +02:00
John Kåre Alsaker 930ad86e3d Clean up query cache code 2019-06-30 11:18:44 +02:00
flip1995 7de6f54728
Turn internal lints into tool lints 2019-06-24 10:45:21 +02:00
flip1995 65c81dee75
Allow default_hash_types in some crates 2019-06-24 10:45:20 +02:00
John Kåre Alsaker 10855a36b5 Use a proc macro to declare preallocated symbols 2019-04-15 07:23:01 +02:00
John Kåre Alsaker 4f49fff019 Clean up parsing code and split out codegen for the QueryDescription impl 2019-03-18 08:20:10 +01:00
John Kåre Alsaker 7d90547532 Define queries using a proc macro 2019-03-18 08:20:06 +01:00
John Kåre Alsaker 12a491fbe2 Make rustc_macro a Rust 2018 crate 2019-03-05 20:46:45 +01:00
John Kåre Alsaker 10d2008c51 Add ignore and project attributes 2019-03-05 00:36:25 +01:00
John Kåre Alsaker 97431a4090 Create a derive macro for HashStable 2019-03-05 00:36:20 +01:00