Conversation
|
Unfortunately compiletest can't do multi-line error messages, so I had to do this: #[derive(Serialize)] //~ ERROR: custom derive attribute panicked
#[serde(abc="xyz")] // ERROR: unknown serde container attribute `abc`
struct A {
x: u32,
}We are only checking that the thing fails to compile because "custom derive attribute panicked", not the specific message. I left the messages there so that it is clear what is being tested. |
What do you mean by multi-line error messages? |
|
Here is what the message looks like: error: custom derive attribute panicked
--> src/main.rs:9:10
|
9 | #[derive(Serialize)]
| ^^^^^^^^^
|
= help: message: unknown serde container attribute `abc`Compiletest only sees the error at the top, not the "help". I think related to rust-lang/rust#31380. |
|
Compiletest only sees a help when you ask for a help in the code. So adding a //~^ HELP below the error line should work |
|
Good call, I didn't know about that. I pushed a fix. |
Fixes #565.