Added lexars
This commit is contained in:
parent
382b2ce94b
commit
f9f64b0558
820 changed files with 149371 additions and 0 deletions
lexers/testdata/rust
29
lexers/testdata/rust/string_interpol.actual
vendored
Normal file
29
lexers/testdata/rust/string_interpol.actual
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
fn main() {
|
||||
let foo = 'x';
|
||||
|
||||
println!(
|
||||
"
|
||||
Kitchen sink
|
||||
{{ }} - Escaped
|
||||
{{{}}} - Escaped with inner interpol
|
||||
{foo:#?} - Ident with pretty debug format
|
||||
{0:-<5} - Positional with complex fill/alignment
|
||||
",
|
||||
foo,
|
||||
);
|
||||
|
||||
// Unconventional formatting
|
||||
println! ( "Hello, {foo}!");
|
||||
|
||||
// Exhausting the supported macros
|
||||
eprintln!("{foo}");
|
||||
eprint!("{foo}");
|
||||
println!("{foo}");
|
||||
print!("{foo}");
|
||||
format!("{foo}");
|
||||
format_args!("{foo}");
|
||||
panic!("{foo}");
|
||||
todo!("{foo}");
|
||||
unreachable!("{foo}");
|
||||
unimplemented!("{foo}");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue