@@ -139,9 +139,9 @@ extern crate mlua_derive;
139
139
/// This macro allows to write Lua code directly in Rust code.
140
140
///
141
141
/// Rust variables can be referenced from Lua using `$` prefix, as shown in the example below.
142
- /// User Rust types needs to implement [`UserData`] or [`ToLua`] traits.
142
+ /// User's Rust types needs to implement [`UserData`] or [`ToLua`] traits.
143
143
///
144
- /// Captured variables are moved into the chunk.
144
+ /// Captured variables are ** moved** into the chunk.
145
145
///
146
146
/// ```
147
147
/// use mlua::{Lua, Result, chunk};
@@ -165,12 +165,19 @@ extern crate mlua_derive;
165
165
/// (Single quoted strings only work if they contain a single character, since in Rust,
166
166
/// `'a'` is a character literal).
167
167
///
168
+ /// - Using Lua comments `--` is not desirable in **stable** Rust and can have bad side effects.
169
+ ///
170
+ /// This is because procedural macros have Line/Column information available only in
171
+ /// **nightly** Rust. Instead, Lua chunks represented as a big single line of code in stable Rust.
172
+ ///
173
+ /// As workaround, Rust comments `//` can be used.
174
+ ///
168
175
/// Other minor limitations:
169
176
///
170
- /// - Certain escape codes in string literals.
177
+ /// - Certain escape codes in string literals don't work .
171
178
/// (Specifically: `\a`, `\b`, `\f`, `\v`, `\123` (octal escape codes), `\u`, and `\U`).
172
179
///
173
- /// These are accepted: : `\\`, `\n`, `\t`, `\r`, `\xAB` (hex escape codes), and `\0`
180
+ /// These are accepted: : `\\`, `\n`, `\t`, `\r`, `\xAB` (hex escape codes), and `\0`.
174
181
///
175
182
/// - The `//` (floor division) operator is unusable, as its start a comment.
176
183
///
0 commit comments