From eba5a209bdfba2c62af82050da892f9944dcafe4 Mon Sep 17 00:00:00 2001 From: Espen Halsaa Albrektsen Date: Thu, 8 May 2025 13:42:05 +0200 Subject: [PATCH] Do not hide unsafe blocks within macro expansions --- src/coding-guidelines/macros.rst | 41 ++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/src/coding-guidelines/macros.rst b/src/coding-guidelines/macros.rst index 91bd38b..e03256b 100644 --- a/src/coding-guidelines/macros.rst +++ b/src/coding-guidelines/macros.rst @@ -301,4 +301,45 @@ Macros fn example_function() { // Compliant implementation } + +.. guideline:: Do not hide unsafe blocks within macro expansions + :id: gui_FRLaMIMb4t3S + :category: required + :status: draft + :release: todo + :fls: fls_4vjbkm4ceymk + :decidability: todo + :scope: todo + :tags: reduce-human-error + + Description of the guideline goes here. + + .. rationale:: + :id: rat_WJubG7KuUDLW + :status: draft + + Explanation of why this guideline is important. + + .. non_compliant_example:: + :id: non_compl_ex_AyFnP0lJLHxi + :status: draft + + Explanation of code example. + .. code-block:: rust + + fn example_function() { + // Non-compliant implementation + } + + .. compliant_example:: + :id: compl_ex_pO5gP1aj2v4F + :status: draft + + Explanation of code example. + + .. code-block:: rust + + fn example_function() { + // Compliant implementation + } \ No newline at end of file