Skip to content
This repository was archived by the owner on Dec 27, 2022. It is now read-only.

Commit b447c18

Browse files
authored
Merge pull request #61 from dtolnay/note
Note that 1.45 proc macros support expr position natively
2 parents 6790ad4 + a3b681b commit b447c18

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,15 @@ Procedural macros in expression position
66
[<img alt="docs.rs" src="https://img.shields.io/badge/docs.rs-proc--macro--hack-66c2a5?style=for-the-badge&labelColor=555555&logoColor=white&logo=data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDUxMiA1MTIiPjxwYXRoIGZpbGw9IiNmNWY1ZjUiIGQ9Ik00ODguNiAyNTAuMkwzOTIgMjE0VjEwNS41YzAtMTUtOS4zLTI4LjQtMjMuNC0zMy43bC0xMDAtMzcuNWMtOC4xLTMuMS0xNy4xLTMuMS0yNS4zIDBsLTEwMCAzNy41Yy0xNC4xIDUuMy0yMy40IDE4LjctMjMuNCAzMy43VjIxNGwtOTYuNiAzNi4yQzkuMyAyNTUuNSAwIDI2OC45IDAgMjgzLjlWMzk0YzAgMTMuNiA3LjcgMjYuMSAxOS45IDMyLjJsMTAwIDUwYzEwLjEgNS4xIDIyLjEgNS4xIDMyLjIgMGwxMDMuOS01MiAxMDMuOSA1MmMxMC4xIDUuMSAyMi4xIDUuMSAzMi4yIDBsMTAwLTUwYzEyLjItNi4xIDE5LjktMTguNiAxOS45LTMyLjJWMjgzLjljMC0xNS05LjMtMjguNC0yMy40LTMzLjd6TTM1OCAyMTQuOGwtODUgMzEuOXYtNjguMmw4NS0zN3Y3My4zek0xNTQgMTA0LjFsMTAyLTM4LjIgMTAyIDM4LjJ2LjZsLTEwMiA0MS40LTEwMi00MS40di0uNnptODQgMjkxLjFsLTg1IDQyLjV2LTc5LjFsODUtMzguOHY3NS40em0wLTExMmwtMTAyIDQxLjQtMTAyLTQxLjR2LS42bDEwMi0zOC4yIDEwMiAzOC4ydi42em0yNDAgMTEybC04NSA0Mi41di03OS4xbDg1LTM4Ljh2NzUuNHptMC0xMTJsLTEwMiA0MS40LTEwMi00MS40di0uNmwxMDItMzguMiAxMDIgMzguMnYuNnoiPjwvcGF0aD48L3N2Zz4K" height="20">](https://docs.rs/proc-macro-hack)
77
[<img alt="build status" src="https://img.shields.io/github/workflow/status/dtolnay/proc-macro-hack/CI/master?style=for-the-badge" height="20">](https://github.com/dtolnay/proc-macro-hack/actions?query=branch%3Amaster)
88

9-
As of Rust 1.30, the language supports user-defined function-like procedural
10-
macros. However these can only be invoked in item position, not in
11-
statements or expressions.
9+
<table><tr><td><hr>
10+
<b>Note:</b> <i>As of Rust 1.45 this crate is superseded by native support for
11+
#[proc_macro] in expression position. Only consider using this crate if you care
12+
about supporting compilers between 1.31 and 1.45.</i>
13+
<hr></td></tr></table>
14+
15+
Since Rust 1.30, the language supports user-defined function-like procedural
16+
macros. However these can only be invoked in item position, not in statements or
17+
expressions.
1218

1319
This crate implements an alternative type of procedural macro that can be
1420
invoked in statement or expression position.

src/lib.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66
//!
77
//! <br>
88
//!
9-
//! As of Rust 1.30, the language supports user-defined function-like procedural
9+
//! <table><tr><td><hr>
10+
//! <b>Note:</b> <i>As of Rust 1.45 this crate is superseded by native support
11+
//! for #[proc_macro] in expression position. Only consider using this crate if
12+
//! you care about supporting compilers between 1.31 and 1.45.</i>
13+
//! <hr></td></tr></table>
14+
//!
15+
//! Since Rust 1.30, the language supports user-defined function-like procedural
1016
//! macros. However these can only be invoked in item position, not in
1117
//! statements or expressions.
1218
//!

0 commit comments

Comments
 (0)