Debugging type error for rawstring

Hi, i found a lack of precision with the compiler:

fn main() {
    let var1 = "test1";
    let rawstr = r#"{"type": "type1", "type2": var1}"#;
    rawstr.debugtype();
}

it says:

no method named debugtype found for reference &str in the current scope

How can i get the same error message with rawstring ?
(or &rawstring ?)

Your rawstr variable has the same type as var1. There isn't a separate type for raw strings.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.