From 2be3a72df688293eee21641315a4e7c66e3f7fd2 Mon Sep 17 00:00:00 2001 From: Ben-Fields <33070053+Ben-Fields@users.noreply.github.com> Date: Mon, 1 Mar 2021 14:36:37 -0600 Subject: [PATCH] doc: add`[unsafe]` and `[manualfree]` (#9038) --- doc/docs.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/docs.md b/doc/docs.md index 5f5eaf7221..2681c014e0 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -3996,6 +3996,16 @@ fn bar() { foo() // will not be called if `-d debug` is not passed } +// Calls to this function must be in unsafe{} blocks +[unsafe] +fn risky_business() { +} + +// V's autofree engine will not take care of memory management in this function +[manualfree] +fn custom_allocations() { +} + // For C interop only, tells V that the following struct is defined with `typedef struct` in C [typedef] struct C.Foo {