Skip to content

Commit

Permalink
Macro doesn't play well with doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
udoprog committed May 6, 2023
1 parent c4c359b commit e1ebf4e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion crates/rune/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
//! Ok(quote!(#string).into_token_stream(ctx))
//! }
//!
//! # fn main() -> rune::Result<()> {
//! let mut m = Module::new();
//! m.macro_meta(ident_to_string)?;
//!
Expand Down Expand Up @@ -50,7 +51,8 @@
//! let value: String = rune::from_value(value)?;
//!
//! assert_eq!(value, "hello");
//! # Ok::<_, rune::Error>(())
//! # Ok(())
//! # }
//! ```
use crate::macros::{MacroContext, ToTokens, TokenStream};
Expand Down
1 change: 1 addition & 0 deletions crates/rune/src/compile/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,7 @@ impl Module {
///
/// let mut m = Module::new();
/// m.macro_meta(ident_to_string)?;
/// Ok::<_, rune::Error>(())
/// ```
#[inline]
pub fn macro_meta(&mut self, meta: MacroMeta) -> Result<(), ContextError> {
Expand Down
4 changes: 3 additions & 1 deletion crates/rune/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
//! Ok(quote!(#output).into_token_stream(ctx))
//! }
//!
//! # fn main() -> rune::Result<()> {
//! let mut m = Module::new();
//! m.macro_meta(concat_idents)?;
//!
Expand Down Expand Up @@ -67,7 +68,8 @@
//! let value: u32 = rune::from_value(value)?;
//!
//! assert_eq!(value, 42);
//! # Ok::<_, rune::Error>(())
//! # Ok(())
//! # }
//! ```
mod format_args;
Expand Down

0 comments on commit e1ebf4e

Please sign in to comment.