]> git.lizzy.rs Git - rust.git/blobdiff - tests/source/string-lit.rs
Prevent duplicate comma when formatting struct pattern with ".."
[rust.git] / tests / source / string-lit.rs
index 35d8ec072c2a8765fc2ffb37379837f45413b75d..7719e76ffe75cc075bd9cb6f72027374d9f55cc6 100644 (file)
@@ -1,3 +1,4 @@
+// rustfmt-format_strings: true
 // Long string literals
 
 fn main() -> &'static str {
@@ -22,6 +23,8 @@ fn main() -> &'static str {
 remove
 formatting"#;
 
+    filename.replace(" ", "\\" );
+
     let xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx =
         funktion("yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy");
         
@@ -32,3 +35,27 @@ fn main() -> &'static str {
 
     "stuffin'"
 }
+
+fn issue682() {
+    let a = "hello \\ o/";
+    let b = a.replace("\\ ", "\\");
+}
+
+fn issue716() {
+    println!("forall x. mult(e(), x) = x /\\
+              forall x. mult(x, x) = e()");
+}
+
+fn issue_1282() {
+    {
+        match foo {
+            Permission::AndroidPermissionAccessLocationExtraCommands => {
+                "android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"
+            }
+        }
+    }
+}
+
+// #1987
+#[link_args = "-s NO_FILESYSTEM=1 -s NO_EXIT_RUNTIME=1 -s EXPORTED_RUNTIME_METHODS=[\"_malloc\"] -s NO_DYNAMIC_EXECUTION=1 -s ELIMINATE_DUPLICATE_FUNCTIONS=1 -s EVAL_CTORS=1"]
+extern "C" {}