Recognize infinite recursion caused by {self}

This commit is contained in:
David Tolnay 2024-11-04 22:18:46 -05:00
parent e1fa5190b4
commit 6a0eb08569
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82
4 changed files with 68 additions and 18 deletions

View file

@ -0,0 +1,9 @@
use thiserror::Error;
#[derive(Error, Debug)]
#[error("{self}")]
pub struct Error;
fn main() {
@//fail
}