summaryrefslogtreecommitdiff
path: root/xmake/tools/rustc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/tools/rustc.lua')
-rw-r--r--xmake/tools/rustc.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/tools/rustc.lua b/xmake/tools/rustc.lua
index 6456e7a3a..5727544d2 100644
--- a/xmake/tools/rustc.lua
+++ b/xmake/tools/rustc.lua
@@ -148,7 +148,7 @@ function check(flags)
local sourcefile = os.tmpfile() .. ".rs"
-- make stub code
- io.write(sourcefile, "fn main() {\n}")
+ io.writefile(sourcefile, "fn main() {\n}")
-- check it
os.run("%s --emit obj %s -o %s %s", _g.shellname, ifelse(flags, flags, ""), objectfile, sourcefile)