Skip to content

Commit a6e2b10

Browse files
committed
Fix intra doc links
1 parent 9c6eaa5 commit a6e2b10

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
@@ -614,11 +614,9 @@ impl VirtualMachine {
614614

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

@@ -634,22 +632,18 @@ impl VirtualMachine {
634632

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

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

0 commit comments

Comments
 (0)