Skip to content

Commit 29749a3

Browse files
committed
Update a note on using function like macro in expression
Since Rust 1.45.0, the limitation has been lifted.
1 parent 3d83e77 commit 29749a3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

macros/src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,9 @@ pub fn cast_to(args: TokenStream, input: TokenStream) -> TokenStream {
8383
/// This macro is for registering both a concrete type and its traits to be targets for casting.
8484
/// Useful when the type definition and the trait implementations are in an external crate.
8585
///
86-
/// **Note**: this macro cannot be used in an expression or statement due to
87-
/// [the current limitation](https://github.com/rust-lang/rust/pull/68717) in the stable Rust.
86+
/// **Note**: this macro cannot be used in an expression or statement prior to Rust 1.45.0,
87+
/// due to [a previous limitation](https://github.com/rust-lang/rust/pull/68717).
88+
/// If you want to use it in an expression or statement, use Rust 1.45.0 or later.
8889
///
8990
/// # Examples
9091
/// ```

0 commit comments

Comments
 (0)