aboutsummaryrefslogtreecommitdiff
path: root/src/rt/rust.cpp
diff options
context:
space:
mode:
authorMichael Bebenita <[email protected]>2010-07-27 23:13:33 -0700
committerGraydon Hoare <[email protected]>2010-07-28 20:30:28 -0700
commitd7864697854fc07192d537949f7712776d652156 (patch)
tree50d963ca92d6b1d707d52f187e99025a06094321 /src/rt/rust.cpp
parentMove allocation-tracking into rust_srv. (diff)
downloadrust-d7864697854fc07192d537949f7712776d652156.tar.xz
rust-d7864697854fc07192d537949f7712776d652156.zip
Add a warning interface to rust_srv.
Diffstat (limited to 'src/rt/rust.cpp')
-rw-r--r--src/rt/rust.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/rt/rust.cpp b/src/rt/rust.cpp
index 37398655..2200df11 100644
--- a/src/rt/rust.cpp
+++ b/src/rt/rust.cpp
@@ -94,6 +94,16 @@ rust_srv::fatal(char const *expr, char const *file, size_t line)
exit(1);
}
+void
+rust_srv::warning(char const *expr, char const *file, size_t line)
+{
+ char buf[1024];
+ snprintf(buf, sizeof(buf),
+ "warning: '%s', at: %s:%d",
+ expr, file, (int)line);
+ log(buf);
+}
+
rust_srv *
rust_srv::clone()
{