diff options
Diffstat (limited to 'subprojects/thiserror/tests/ui/raw-identifier.rs')
| -rw-r--r-- | subprojects/thiserror/tests/ui/raw-identifier.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/subprojects/thiserror/tests/ui/raw-identifier.rs b/subprojects/thiserror/tests/ui/raw-identifier.rs new file mode 100644 index 0000000..e7e66d0 --- /dev/null +++ b/subprojects/thiserror/tests/ui/raw-identifier.rs @@ -0,0 +1,12 @@ +use thiserror::Error; + +#[derive(Error, Debug)] +#[error("error: {r#fn}")] +pub struct Error { + r#fn: &'static str, +} + +fn main() { + let r#fn = "..."; + let _ = format!("error: {r#fn}"); +} |
