diff --git a/src/lib.rs b/src/lib.rs index 598cf30..6d01c74 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -139,9 +139,9 @@ extern crate mlua_derive; /// This macro allows to write Lua code directly in Rust code. /// /// Rust variables can be referenced from Lua using `$` prefix, as shown in the example below. -/// User Rust types needs to implement [`UserData`] or [`ToLua`] traits. +/// User's Rust types needs to implement [`UserData`] or [`ToLua`] traits. /// -/// Captured variables are moved into the chunk. +/// Captured variables are **moved** into the chunk. /// /// ``` /// use mlua::{Lua, Result, chunk}; @@ -165,12 +165,19 @@ extern crate mlua_derive; /// (Single quoted strings only work if they contain a single character, since in Rust, /// `'a'` is a character literal). /// +/// - Using Lua comments `--` is not desirable in **stable** Rust and can have bad side effects. +/// +/// This is because procedural macros have Line/Column information available only in +/// **nightly** Rust. Instead, Lua chunks represented as a big single line of code in stable Rust. +/// +/// As workaround, Rust comments `//` can be used. +/// /// Other minor limitations: /// -/// - Certain escape codes in string literals. +/// - Certain escape codes in string literals don't work. /// (Specifically: `\a`, `\b`, `\f`, `\v`, `\123` (octal escape codes), `\u`, and `\U`). /// -/// These are accepted: : `\\`, `\n`, `\t`, `\r`, `\xAB` (hex escape codes), and `\0` +/// These are accepted: : `\\`, `\n`, `\t`, `\r`, `\xAB` (hex escape codes), and `\0`. /// /// - The `//` (floor division) operator is unusable, as its start a comment. ///