Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Implement raw string literals #3556

Merged
merged 10 commits into from
Nov 28, 2023
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[package]
name = "raw_string_huge"
type = "bin"
authors = [""]
[dependencies]
TomAFrench marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
let _a = r##############################################################################################################################################################################################################################################################################"hello"##############################################################################################################################################################################################################################################################################;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "unit"
TomAFrench marked this conversation as resolved.
Show resolved Hide resolved
type = "bin"
authors = [""]

[dependencies]
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
global D = r#####"Hello "world""#####;

fn main() {
let a = "Hello \"world\"";
let b = r#"Hello "world""#;
let c = r##"Hello "world""##;
assert(a == b);
jfecher marked this conversation as resolved.
Show resolved Hide resolved
assert(b == c);
assert(c == D);
}
Loading