]> git.lizzy.rs Git - rust.git/commitdiff
Merge #7621
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>
Wed, 10 Feb 2021 08:34:04 +0000 (08:34 +0000)
committerGitHub <noreply@github.com>
Wed, 10 Feb 2021 08:34:04 +0000 (08:34 +0000)
7621: Use track caller in test documentation r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
docs/dev/architecture.md

index 01063824f362195e935d101fa93529e25ed2a8c1..081ee5b9d9055b3c381f53dbdc508806352f24be 100644 (file)
@@ -372,11 +372,11 @@ Tests which directly call various API functions are a liability, because they ma
 So most of the tests look like this:
 
 ```rust
+#[track_caller]
 fn check(input: &str, expect: expect_test::Expect) {
     // The single place that actually exercises a particular API
 }
 
-
 #[test]
 fn foo() {
     check("foo", expect![["bar"]]);