Skip to content

Commit

Permalink
Merge pull request #1696 from rust-lang/pa-reuse
Browse files Browse the repository at this point in the history
Make REUSE ignore `valgrind` copyright statements
  • Loading branch information
marioidival authored Apr 3, 2023
2 parents 4a9228f + 5ebe420 commit ba84bf3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/scope/raii.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ fn main() {

Of course, we can double check for memory errors using [`valgrind`][valgrind]:

<!-- REUSE-IgnoreStart -->
<!-- Prevent REUSE from parsing the copyright statement in the sample code -->
```shell
$ rustc raii.rs && valgrind ./raii
==26873== Memcheck, a memory error detector
Expand All @@ -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)
```
<!-- REUSE-IgnoreEnd -->
No leaks here!
Expand Down
3 changes: 3 additions & 0 deletions src/std/panic.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ fn main() {

Let's check that `panic!` doesn't leak memory.

<!-- REUSE-IgnoreStart -->
<!-- Prevent REUSE from parsing the copyright statement in the sample code -->
```shell
$ rustc panic.rs && valgrind ./panic
==4401== Memcheck, a memory error detector
Expand All @@ -52,3 +54,4 @@ thread '<main>' 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)
```
<!-- REUSE-IgnoreEnd -->

0 comments on commit ba84bf3

Please sign in to comment.