@@ -210,7 +210,7 @@ impl Lua {
210
210
///
211
211
/// See [`StdLib`] documentation for a list of unsafe modules that cannot be loaded.
212
212
///
213
- /// [`StdLib`]: struct. StdLib.html
213
+ /// [`StdLib`]: crate:: StdLib
214
214
#[ allow( clippy:: new_without_default) ]
215
215
pub fn new ( ) -> Lua {
216
216
mlua_expect ! (
@@ -237,7 +237,7 @@ impl Lua {
237
237
///
238
238
/// See [`StdLib`] documentation for a list of unsafe modules that cannot be loaded.
239
239
///
240
- /// [`StdLib`]: struct. StdLib.html
240
+ /// [`StdLib`]: crate:: StdLib
241
241
pub fn new_with ( libs : StdLib , options : LuaOptions ) -> Result < Lua > {
242
242
if libs. contains ( StdLib :: DEBUG ) {
243
243
return Err ( Error :: SafetyError (
@@ -271,7 +271,7 @@ impl Lua {
271
271
/// # Safety
272
272
/// The created Lua state will not have safety guarantees and allow to load C modules.
273
273
///
274
- /// [`StdLib`]: struct. StdLib.html
274
+ /// [`StdLib`]: crate:: StdLib
275
275
pub unsafe fn unsafe_new_with ( libs : StdLib , options : LuaOptions ) -> Lua {
276
276
ffi:: keep_lua_symbols ( ) ;
277
277
Self :: inner_new ( libs, options)
@@ -513,7 +513,7 @@ impl Lua {
513
513
///
514
514
/// Use the [`StdLib`] flags to specify the libraries you want to load.
515
515
///
516
- /// [`StdLib`]: struct. StdLib.html
516
+ /// [`StdLib`]: crate:: StdLib
517
517
pub fn load_from_std_lib ( & self , libs : StdLib ) -> Result < ( ) > {
518
518
if self . safe && libs. contains ( StdLib :: DEBUG ) {
519
519
return Err ( Error :: SafetyError (
@@ -700,8 +700,8 @@ impl Lua {
700
700
/// # }
701
701
/// ```
702
702
///
703
- /// [`HookTriggers`]: struct. HookTriggers.html
704
- /// [`HookTriggers.every_nth_instruction`]: struct. HookTriggers.html#field. every_nth_instruction
703
+ /// [`HookTriggers`]: crate:: HookTriggers
704
+ /// [`HookTriggers.every_nth_instruction`]: crate:: HookTriggers:: every_nth_instruction
705
705
pub fn set_hook < F > ( & self , triggers : HookTriggers , callback : F ) -> Result < ( ) >
706
706
where
707
707
F : ' static + MaybeSend + FnMut ( & Lua , Debug ) -> Result < ( ) > ,
@@ -906,10 +906,11 @@ impl Lua {
906
906
/// similar on the returned builder. Code is not even parsed until one of these methods is
907
907
/// called.
908
908
///
909
- /// If this `Lua` was created with `unsafe_new`, `load` will automatically detect and load
909
+ /// If this `Lua` was created with [ `unsafe_new`] , `load` will automatically detect and load
910
910
/// chunks of either text or binary type, as if passing `bt` mode to `luaL_loadbufferx`.
911
911
///
912
- /// [`Chunk::exec`]: struct.Chunk.html#method.exec
912
+ /// [`Chunk::exec`]: crate::Chunk::exec
913
+ /// [`unsafe_new`]: #method.unsafe_new
913
914
#[ track_caller]
914
915
pub fn load < ' lua , ' a , S > ( & ' lua self , source : & ' a S ) -> Chunk < ' lua , ' a >
915
916
where
@@ -1105,8 +1106,8 @@ impl Lua {
1105
1106
/// # }
1106
1107
/// ```
1107
1108
///
1108
- /// [`ToLua`]: trait. ToLua.html
1109
- /// [`ToLuaMulti`]: trait. ToLuaMulti.html
1109
+ /// [`ToLua`]: crate:: ToLua
1110
+ /// [`ToLuaMulti`]: crate:: ToLuaMulti
1110
1111
pub fn create_function < ' lua , ' callback , A , R , F > ( & ' lua self , func : F ) -> Result < Function < ' lua > >
1111
1112
where
1112
1113
' lua : ' callback ,
@@ -1191,8 +1192,8 @@ impl Lua {
1191
1192
/// }
1192
1193
/// ```
1193
1194
///
1194
- /// [`Thread`]: struct. Thread.html
1195
- /// [`AsyncThread`]: struct. AsyncThread.html
1195
+ /// [`Thread`]: crate:: Thread
1196
+ /// [`AsyncThread`]: crate:: AsyncThread
1196
1197
#[ cfg( feature = "async" ) ]
1197
1198
#[ cfg_attr( docsrs, doc( cfg( feature = "async" ) ) ) ]
1198
1199
pub fn create_async_function < ' lua , ' callback , A , R , F , FR > (
@@ -1484,7 +1485,7 @@ impl Lua {
1484
1485
/// Be warned, garbage collection of values held inside the registry is not automatic, see
1485
1486
/// [`RegistryKey`] for more details.
1486
1487
///
1487
- /// [`RegistryKey`]: struct. RegistryKey.html
1488
+ /// [`RegistryKey`]: crate:: RegistryKey
1488
1489
pub fn create_registry_value < ' lua , T : ToLua < ' lua > > ( & ' lua self , t : T ) -> Result < RegistryKey > {
1489
1490
let t = t. to_lua ( self ) ?;
1490
1491
unsafe {
@@ -2206,7 +2207,7 @@ impl Lua {
2206
2207
2207
2208
/// Returned from [`Lua::load`] and is used to finalize loading and executing Lua main chunks.
2208
2209
///
2209
- /// [`Lua::load`]: struct. Lua.html#method. load
2210
+ /// [`Lua::load`]: crate:: Lua:: load
2210
2211
#[ must_use = "`Chunk`s do nothing unless one of `exec`, `eval`, `call`, or `into_function` are called on them" ]
2211
2212
pub struct Chunk < ' lua , ' a > {
2212
2213
lua : & ' lua Lua ,
@@ -2226,7 +2227,7 @@ pub enum ChunkMode {
2226
2227
/// Trait for types [loadable by Lua] and convertible to a [`Chunk`]
2227
2228
///
2228
2229
/// [loadable by Lua]: https://www.lua.org/manual/5.3/manual.html#3.3.2
2229
- /// [`Chunk`]: struct. Chunk.html
2230
+ /// [`Chunk`]: crate:: Chunk
2230
2231
pub trait AsChunk < ' lua > {
2231
2232
/// Returns chunk data (can be text or binary)
2232
2233
fn source ( & self ) -> & [ u8 ] ;
@@ -2284,7 +2285,7 @@ impl<'lua, 'a> Chunk<'lua, 'a> {
2284
2285
/// Lua does not check the consistency of binary chunks, therefore this mode is allowed only
2285
2286
/// for instances created with [`Lua::unsafe_new`].
2286
2287
///
2287
- /// [`Lua::unsafe_new`]: struct. Lua.html#method. unsafe_new
2288
+ /// [`Lua::unsafe_new`]: crate:: Lua:: unsafe_new
2288
2289
pub fn set_mode ( mut self , mode : ChunkMode ) -> Chunk < ' lua , ' a > {
2289
2290
self . mode = Some ( mode) ;
2290
2291
self
@@ -2300,11 +2301,11 @@ impl<'lua, 'a> Chunk<'lua, 'a> {
2300
2301
2301
2302
/// Asynchronously execute this chunk of code.
2302
2303
///
2303
- /// See [`Chunk:: exec`] for more details.
2304
+ /// See [`exec`] for more details.
2304
2305
///
2305
2306
/// Requires `feature = "async"`
2306
2307
///
2307
- /// [`Chunk:: exec`]: struct.Chunk.html #method.exec
2308
+ /// [`exec`]: #method.exec
2308
2309
#[ cfg( feature = "async" ) ]
2309
2310
#[ cfg_attr( docsrs, doc( cfg( feature = "async" ) ) ) ]
2310
2311
pub fn exec_async < ' fut > ( self ) -> LocalBoxFuture < ' fut , Result < ( ) > >
@@ -2340,11 +2341,11 @@ impl<'lua, 'a> Chunk<'lua, 'a> {
2340
2341
2341
2342
/// Asynchronously evaluate the chunk as either an expression or block.
2342
2343
///
2343
- /// See [`Chunk:: eval`] for more details.
2344
+ /// See [`eval`] for more details.
2344
2345
///
2345
2346
/// Requires `feature = "async"`
2346
2347
///
2347
- /// [`Chunk:: eval`]: struct.Chunk.html #method.eval
2348
+ /// [`eval`]: #method.eval
2348
2349
#[ cfg( feature = "async" ) ]
2349
2350
#[ cfg_attr( docsrs, doc( cfg( feature = "async" ) ) ) ]
2350
2351
pub fn eval_async < ' fut , R > ( self ) -> LocalBoxFuture < ' fut , Result < R > >
@@ -2378,11 +2379,11 @@ impl<'lua, 'a> Chunk<'lua, 'a> {
2378
2379
2379
2380
/// Load the chunk function and asynchronously call it with the given arguments.
2380
2381
///
2381
- /// See [`Chunk:: call`] for more details.
2382
+ /// See [`call`] for more details.
2382
2383
///
2383
2384
/// Requires `feature = "async"`
2384
2385
///
2385
- /// [`Chunk:: call`]: struct.Chunk.html #method.call
2386
+ /// [`call`]: #method.call
2386
2387
#[ cfg( feature = "async" ) ]
2387
2388
#[ cfg_attr( docsrs, doc( cfg( feature = "async" ) ) ) ]
2388
2389
pub fn call_async < ' fut , A , R > ( self , args : A ) -> LocalBoxFuture < ' fut , Result < R > >
0 commit comments