From 5ebe4203669ceb0aba60efa0726822207ef81cfc Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Mon, 3 Apr 2023 12:08:40 +0200 Subject: [PATCH] make REUSE ignore valgrind copyright statements --- src/scope/raii.md | 3 +++ src/std/panic.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/scope/raii.md b/src/scope/raii.md index 7b6bca6184..6d94b07138 100644 --- a/src/scope/raii.md +++ b/src/scope/raii.md @@ -41,6 +41,8 @@ fn main() { Of course, we can double check for memory errors using [`valgrind`][valgrind]: + + ```shell $ rustc raii.rs && valgrind ./raii ==26873== Memcheck, a memory error detector @@ -58,6 +60,7 @@ $ rustc raii.rs && valgrind ./raii ==26873== For counts of detected and suppressed errors, rerun with: -v ==26873== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 2) ``` + No leaks here! diff --git a/src/std/panic.md b/src/std/panic.md index b22000494c..d08d1f4e28 100644 --- a/src/std/panic.md +++ b/src/std/panic.md @@ -34,6 +34,8 @@ fn main() { Let's check that `panic!` doesn't leak memory. + + ```shell $ rustc panic.rs && valgrind ./panic ==4401== Memcheck, a memory error detector @@ -52,3 +54,4 @@ thread '
' panicked at 'division by zero', panic.rs:5 ==4401== For counts of detected and suppressed errors, rerun with: -v ==4401== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) ``` +