Skip to content

Commit 0849d05

Browse files
committed
mlua_derive: Update docs
1 parent 38c05b8 commit 0849d05

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

docs/UserData.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Named fields are exposed as readable and writable fields in Lua by default.
88
Use `#[lua(...)]` on individual fields or methods to control how they are
99
registered.
1010

11-
```rust
11+
```rust,ignore
1212
use mlua::{Lua, Result, UserData};
1313
1414
#[derive(UserData)]
@@ -92,7 +92,7 @@ At most one of `getter`, `setter`, `field` may be specified on a method.
9292
Constants in an `#[mlua::userdata_impl]` block are registered as static
9393
fields:
9494

95-
```rust
95+
```rust,ignore
9696
#[mlua::userdata_impl]
9797
impl MyType {
9898
const VERSION: &str = "1.0";
@@ -108,7 +108,7 @@ Annotate a method with `#[lua(meta)]` to register it as a Lua metamethod.
108108
The metamethod name is inferred from the function name when it starts with
109109
`__`. Use `name = "..."` to specify the name explicitly.
110110

111-
```rust
111+
```rust,ignore
112112
#[mlua::userdata_impl]
113113
impl MyType {
114114
#[lua(meta, infallible)]

docs/chunk.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ User's Rust types needs to implement [`UserData`] or [`IntoLua`] traits.
77

88
Captured variables are **moved** into the chunk.
99

10-
```
10+
```rust
1111
use mlua::{Lua, Result, chunk};
1212

1313
fn main() -> Result<()> {

docs/lua_module.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Registers Lua module entrypoint.
22

33
You can register multiple entrypoints as required.
44

5-
```ignore
5+
```rust,ignore
66
use mlua::{Lua, Result, Table};
77
88
#[mlua::lua_module]
@@ -19,7 +19,7 @@ You can also pass options to the attribute:
1919

2020
* name - name of the module, defaults to the name of the function
2121

22-
```ignore
22+
```rust,ignore
2323
#[mlua::lua_module(name = "alt_module")]
2424
fn my_module(lua: &Lua) -> Result<Table> {
2525
...
@@ -33,7 +33,7 @@ limits or not. As a result, some operations that require memory allocation run i
3333
mode. Setting this attribute will improve performance of such operations with risk of having
3434
uncaught exceptions and memory leaks.
3535

36-
```ignore
36+
```rust,ignore
3737
#[mlua::lua_module(skip_memory_check)]
3838
fn my_module(lua: &Lua) -> Result<Table> {
3939
...

0 commit comments

Comments
 (0)