1 parent
d1ce7d44fe
commit
98f762d959
1 file changed
+11
-13
@@ -1,17 +1,15 @@
|
|||||||
#![doc = r#"
|
#[doc = r#"
|
||||||
rust = r"""
|
rust = r"""
|
||||||
"#]
|
"#]
|
||||||
fn main() {
|
fn main() {
|
||||||
let (head, body) = ("#![doc = r#\"\nrust = r\"\"\"\n\"#]\nfn main() {\n let (head, body) = ", " println!(\"{head}({head:?}, {body:?});\\n{body}{REAL}\\\"#;\");\n}\nconst REAL: &'static str = r#\"");
|
let (head, body) = ("#[doc = r#\"\nrust = r\"\"\"\n\"#]\nfn main() {\n let (head, body) = ", ";\n println!(\"{head}{:?}{body}{REAL}\\\"#;\", (head, body))\n}\nconst REAL: &str = r#\"");
|
||||||
println!("{head}({head:?}, {body:?});\n{body}{REAL}\"#;");
|
println!("{head}{:?}{body}{REAL}\"#;", (head, body))
|
||||||
}
|
}
|
||||||
const REAL: &'static str = r#"""
|
const REAL: &str = r#"""
|
||||||
p = """{d}
|
p = """{0}
|
||||||
rust = r{triple}{rust}{triple}
|
rust = r{2}{1}{2}
|
||||||
p = {triple}{p}{triple}
|
p = {2}{3}{2}
|
||||||
print(p.format(p=p, d={d!r}, rust=rust, triple={triple!r}))
|
print(p.format({0!r}, rust, {2!r}, p))
|
||||||
{triple}
|
#{2:.1}#;"""
|
||||||
{triple}#;"""
|
print(p.format('#[doc = r#"', rust, '"""', p))
|
||||||
print(p.format(p=p, d='#![doc = r#"', rust=rust, triple='"""'))
|
#"#;
|
||||||
"""
|
|
||||||
"""#;
|
|
||||||
Reference in new issue
Block a user