Skip to content

Commit 3ab48ba

Browse files
authored
Merge pull request RustPython#3317 from RustPython/fix-doc-links
Fix intra doc links
2 parents 8df1c57 + a6e2b10 commit 3ab48ba

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

vm/src/vm.rs

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -615,11 +615,9 @@ impl VirtualMachine {
615615

616616
/// Instantiate an exception with arguments.
617617
/// This function should only be used with builtin exception types; if a user-defined exception
618-
/// type is passed in, it may not be fully initialized; try using [`exceptions::invoke`]
619-
/// or [`exceptions::ExceptionCtor`] instead.
620-
///
621-
/// [exceptions::invoke]: rustpython_vm::exceptions::invoke
622-
/// [exceptions::ctor]: rustpython_vm::exceptions::ExceptionCtor
618+
/// type is passed in, it may not be fully initialized; try using
619+
/// [`vm.invoke_exception()`][Self::invoke_exception] or
620+
/// [`exceptions::ExceptionCtor`][crate::exceptions::ExceptionCtor] instead.
623621
pub fn new_exception(&self, exc_type: PyTypeRef, args: Vec<PyObjectRef>) -> PyBaseExceptionRef {
624622
// TODO: add repr of args into logging?
625623

@@ -635,22 +633,18 @@ impl VirtualMachine {
635633

636634
/// Instantiate an exception with no arguments.
637635
/// This function should only be used with builtin exception types; if a user-defined exception
638-
/// type is passed in, it may not be fully initialized; try using [`exceptions::invoke`]
639-
/// or [`exceptions::ExceptionCtor`] instead.
640-
///
641-
/// [exceptions::invoke]: rustpython_vm::exceptions::invoke
642-
/// [exceptions::ctor]: rustpython_vm::exceptions::ExceptionCtor
636+
/// type is passed in, it may not be fully initialized; try using
637+
/// [`vm.invoke_exception()`][Self::invoke_exception] or
638+
/// [`exceptions::ExceptionCtor`][crate::exceptions::ExceptionCtor] instead.
643639
pub fn new_exception_empty(&self, exc_type: PyTypeRef) -> PyBaseExceptionRef {
644640
self.new_exception(exc_type, vec![])
645641
}
646642

647643
/// Instantiate an exception with `msg` as the only argument.
648644
/// This function should only be used with builtin exception types; if a user-defined exception
649-
/// type is passed in, it may not be fully initialized; try using [`exceptions::invoke`]
650-
/// or [`exceptions::ExceptionCtor`] instead.
651-
///
652-
/// [exceptions::invoke]: rustpython_vm::exceptions::invoke
653-
/// [exceptions::ctor]: rustpython_vm::exceptions::ExceptionCtor
645+
/// type is passed in, it may not be fully initialized; try using
646+
/// [`vm.invoke_exception()`][Self::invoke_exception] or
647+
/// [`exceptions::ExceptionCtor`][crate::exceptions::ExceptionCtor] instead.
654648
pub fn new_exception_msg(&self, exc_type: PyTypeRef, msg: String) -> PyBaseExceptionRef {
655649
self.new_exception(exc_type, vec![self.ctx.new_str(msg).into()])
656650
}

0 commit comments

Comments
 (0)