From b8d3aa32e9ccac7f328721be5aecf0b11e848b36 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Sun, 28 Apr 2019 13:44:42 +0200 Subject: [PATCH] Testing: PANIC_INFO needs to be adjusted after adding attributes/imports --- blog/content/second-edition/posts/04-testing/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog/content/second-edition/posts/04-testing/index.md b/blog/content/second-edition/posts/04-testing/index.md index f94e48e3..a0f2614e 100644 --- a/blog/content/second-edition/posts/04-testing/index.md +++ b/blog/content/second-edition/posts/04-testing/index.md @@ -971,7 +971,7 @@ fn check_message(info: &PanicInfo) { } ``` -The function uses the [`PanicInfo::message`] function to get the panic message. If no message is reported, it calls `fail` to fail the test. Since the function is unstable, we need to add the `#![feature(panic_info_message)]` attribute at the top of our test file. +The function uses the [`PanicInfo::message`] function to get the panic message. If no message is reported, it calls `fail` to fail the test. Since the function is unstable, we need to add the `#![feature(panic_info_message)]` attribute at the top of our test file. Note that you need to adjust the `PANIC_INFO` line number after adding the attribute and the imports on top. [`PanicInfo::message`]: https://doc.rust-lang.org/core/panic/struct.PanicInfo.html#method.message