diff options
Diffstat (limited to 'editors/code')
-rw-r--r-- | editors/code/rust.tmGrammar.json | 45 | ||||
-rw-r--r-- | editors/code/src/run.ts | 4 |
2 files changed, 31 insertions, 18 deletions
diff --git a/editors/code/rust.tmGrammar.json b/editors/code/rust.tmGrammar.json index 3ddd14f9c..18fad6288 100644 --- a/editors/code/rust.tmGrammar.json +++ b/editors/code/rust.tmGrammar.json | |||
@@ -694,23 +694,15 @@ | |||
694 | "interpolations": { | 694 | "interpolations": { |
695 | "comment": "curly brace interpolations", | 695 | "comment": "curly brace interpolations", |
696 | "name": "meta.interpolation.rust", | 696 | "name": "meta.interpolation.rust", |
697 | "begin": "{", | 697 | "match": "({)[^\"{}]*(})", |
698 | "beginCaptures": { | 698 | "captures": { |
699 | "0": { | 699 | "1": { |
700 | "name": "punctuation.definition.interpolation.rust" | 700 | "name": "punctuation.definition.interpolation.rust" |
701 | } | 701 | }, |
702 | }, | 702 | "2": { |
703 | "end": "}", | ||
704 | "endCaptures": { | ||
705 | "0": { | ||
706 | "name": "punctuation.definition.interpolation.rust" | 703 | "name": "punctuation.definition.interpolation.rust" |
707 | } | 704 | } |
708 | }, | 705 | } |
709 | "patterns": [ | ||
710 | { | ||
711 | "include": "#interpolations" | ||
712 | } | ||
713 | ] | ||
714 | }, | 706 | }, |
715 | "lifetimes": { | 707 | "lifetimes": { |
716 | "patterns": [ | 708 | "patterns": [ |
@@ -966,9 +958,28 @@ | |||
966 | ] | 958 | ] |
967 | }, | 959 | }, |
968 | { | 960 | { |
969 | "comment": "double-quoted raw strings and raw byte strings", | 961 | "comment": "double-quoted raw strings and raw byte strings (no hash)", |
962 | "name": "string.quoted.double.rust", | ||
963 | "begin": "(b?r)(\")", | ||
964 | "beginCaptures": { | ||
965 | "1": { | ||
966 | "name": "string.quoted.byte.raw.rust" | ||
967 | }, | ||
968 | "2": { | ||
969 | "name": "punctuation.definition.string.rust" | ||
970 | } | ||
971 | }, | ||
972 | "end": "\"", | ||
973 | "endCaptures": { | ||
974 | "0": { | ||
975 | "name": "punctuation.definition.string.rust" | ||
976 | } | ||
977 | } | ||
978 | }, | ||
979 | { | ||
980 | "comment": "double-quoted raw strings and raw byte strings (with hash)", | ||
970 | "name": "string.quoted.double.rust", | 981 | "name": "string.quoted.double.rust", |
971 | "begin": "(b?r)(#*)(\")", | 982 | "begin": "(b?r)(#+)(\")", |
972 | "beginCaptures": { | 983 | "beginCaptures": { |
973 | "1": { | 984 | "1": { |
974 | "name": "string.quoted.byte.raw.rust" | 985 | "name": "string.quoted.byte.raw.rust" |
@@ -980,7 +991,7 @@ | |||
980 | "name": "punctuation.definition.string.rust" | 991 | "name": "punctuation.definition.string.rust" |
981 | } | 992 | } |
982 | }, | 993 | }, |
983 | "end": "(\")(#*)", | 994 | "end": "(\")(#+)", |
984 | "endCaptures": { | 995 | "endCaptures": { |
985 | "1": { | 996 | "1": { |
986 | "name": "punctuation.definition.string.rust" | 997 | "name": "punctuation.definition.string.rust" |
diff --git a/editors/code/src/run.ts b/editors/code/src/run.ts index 459b7f250..17573cd82 100644 --- a/editors/code/src/run.ts +++ b/editors/code/src/run.ts | |||
@@ -129,7 +129,9 @@ export async function createTask(runnable: ra.Runnable, config: Config): Promise | |||
129 | } | 129 | } |
130 | 130 | ||
131 | const args = [...runnable.args.cargoArgs]; // should be a copy! | 131 | const args = [...runnable.args.cargoArgs]; // should be a copy! |
132 | args.push(...runnable.args.cargoExtraArgs); // Append user-specified cargo options. | 132 | if (runnable.args.cargoExtraArgs) { |
133 | args.push(...runnable.args.cargoExtraArgs); // Append user-specified cargo options. | ||
134 | } | ||
133 | if (runnable.args.executableArgs.length > 0) { | 135 | if (runnable.args.executableArgs.length > 0) { |
134 | args.push('--', ...runnable.args.executableArgs); | 136 | args.push('--', ...runnable.args.executableArgs); |
135 | } | 137 | } |