forked from gentoo-utils/gentoo-utils
Merge commit '6eba9cd92c295c5389944f6adda1f1e83b2cb008' as 'subprojects/thiserror'
This commit is contained in:
12
subprojects/thiserror/tests/ui/raw-identifier.rs
Normal file
12
subprojects/thiserror/tests/ui/raw-identifier.rs
Normal file
@@ -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}");
|
||||
}
|
||||
Reference in New Issue
Block a user