W3cubDocs

/Rust

Error code E0748

A raw string isn't correctly terminated because the trailing # count doesn't match its leading # count.

Erroneous code example:

#![allow(unused)]
fn main() {
let dolphins = r##"Dolphins!"#; // error!
}

To terminate a raw string, you have to have the same number of # at the end as at the beginning. Example:

#![allow(unused)]
fn main() {
let dolphins = r#"Dolphins!"#; // One `#` at the beginning, one at the end so
                               // all good!
}

© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/error_codes/E0748.html