From a6e2b10296aeb83858001e05e78c341c326cd0ab Mon Sep 17 00:00:00 2001 From: Noa <33094578+coolreader18@users.noreply.github.com> Date: Fri, 15 Oct 2021 14:25:38 -0500 Subject: [PATCH] Fix intra doc links --- vm/src/vm.rs | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/vm/src/vm.rs b/vm/src/vm.rs index 3997d9f3c1..d9fd3f754f 100644 --- a/vm/src/vm.rs +++ b/vm/src/vm.rs @@ -614,11 +614,9 @@ impl VirtualMachine { /// Instantiate an exception with arguments. /// This function should only be used with builtin exception types; if a user-defined exception - /// type is passed in, it may not be fully initialized; try using [`exceptions::invoke`] - /// or [`exceptions::ExceptionCtor`] instead. - /// - /// [exceptions::invoke]: rustpython_vm::exceptions::invoke - /// [exceptions::ctor]: rustpython_vm::exceptions::ExceptionCtor + /// type is passed in, it may not be fully initialized; try using + /// [`vm.invoke_exception()`][Self::invoke_exception] or + /// [`exceptions::ExceptionCtor`][crate::exceptions::ExceptionCtor] instead. pub fn new_exception(&self, exc_type: PyTypeRef, args: Vec) -> PyBaseExceptionRef { // TODO: add repr of args into logging? @@ -634,22 +632,18 @@ impl VirtualMachine { /// Instantiate an exception with no arguments. /// This function should only be used with builtin exception types; if a user-defined exception - /// type is passed in, it may not be fully initialized; try using [`exceptions::invoke`] - /// or [`exceptions::ExceptionCtor`] instead. - /// - /// [exceptions::invoke]: rustpython_vm::exceptions::invoke - /// [exceptions::ctor]: rustpython_vm::exceptions::ExceptionCtor + /// type is passed in, it may not be fully initialized; try using + /// [`vm.invoke_exception()`][Self::invoke_exception] or + /// [`exceptions::ExceptionCtor`][crate::exceptions::ExceptionCtor] instead. pub fn new_exception_empty(&self, exc_type: PyTypeRef) -> PyBaseExceptionRef { self.new_exception(exc_type, vec![]) } /// Instantiate an exception with `msg` as the only argument. /// This function should only be used with builtin exception types; if a user-defined exception - /// type is passed in, it may not be fully initialized; try using [`exceptions::invoke`] - /// or [`exceptions::ExceptionCtor`] instead. - /// - /// [exceptions::invoke]: rustpython_vm::exceptions::invoke - /// [exceptions::ctor]: rustpython_vm::exceptions::ExceptionCtor + /// type is passed in, it may not be fully initialized; try using + /// [`vm.invoke_exception()`][Self::invoke_exception] or + /// [`exceptions::ExceptionCtor`][crate::exceptions::ExceptionCtor] instead. pub fn new_exception_msg(&self, exc_type: PyTypeRef, msg: String) -> PyBaseExceptionRef { self.new_exception(exc_type, vec![self.ctx.new_str(msg).into()]) }