summary refs log tree commit diff
path: root/src/liblog/lib.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2014-05-05 18:56:44 -0700
committerPatrick Walton <pcwalton@mimiga.net>2014-05-06 23:12:54 -0700
commit090040bf4037a094e50b03d79e4baf5cd89c912b (patch)
tree27fa91d623889d59260d3db167abdfa8c4288849 /src/liblog/lib.rs
parent24f6f26e633e50b5b59f9d0f6cca0b1e49e215d9 (diff)
downloadrust-090040bf4037a094e50b03d79e4baf5cd89c912b.tar.gz
rust-090040bf4037a094e50b03d79e4baf5cd89c912b.zip
librustc: Remove `~EXPR`, `~TYPE`, and `~PAT` from the language, except
for `~str`/`~[]`.

Note that `~self` still remains, since I forgot to add support for
`Box<self>` before the snapshot.

How to update your code:

* Instead of `~EXPR`, you should write `box EXPR`.

* Instead of `~TYPE`, you should write `Box<Type>`.

* Instead of `~PATTERN`, you should write `box PATTERN`.

[breaking-change]
Diffstat (limited to 'src/liblog/lib.rs')
-rw-r--r--src/liblog/lib.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/liblog/lib.rs b/src/liblog/lib.rs
index a32a42636b6..035a81f4143 100644
--- a/src/liblog/lib.rs
+++ b/src/liblog/lib.rs
@@ -158,7 +158,7 @@ pub static WARN: u32 = 2;
 /// Error log level
 pub static ERROR: u32 = 1;
 
-local_data_key!(local_logger: ~Logger:Send)
+local_data_key!(local_logger: Box<Logger:Send>)
 
 /// A trait used to represent an interface to a task-local logger. Each task
 /// can have its own custom logger which can respond to logging messages
@@ -229,7 +229,7 @@ pub fn log(level: u32, loc: &'static LogLocation, args: &fmt::Arguments) {
     // frob the slot while we're doing the logging. This will destroy any logger
     // set during logging.
     let mut logger = local_data::pop(local_logger).unwrap_or_else(|| {
-        box DefaultLogger { handle: io::stderr() } as ~Logger:Send
+        box DefaultLogger { handle: io::stderr() } as Box<Logger:Send>
     });
     logger.log(&LogRecord {
         level: LogLevel(level),
@@ -249,7 +249,7 @@ pub fn log_level() -> u32 { unsafe { LOG_LEVEL } }
 
 /// Replaces the task-local logger with the specified logger, returning the old
 /// logger.
-pub fn set_logger(logger: ~Logger:Send) -> Option<~Logger:Send> {
+pub fn set_logger(logger: Box<Logger:Send>) -> Option<Box<Logger:Send>> {
     let prev = local_data::pop(local_logger);
     local_data::set(local_logger, logger);
     return prev;
@@ -351,7 +351,7 @@ fn init() {
         // Schedule the cleanup for this global for when the runtime exits.
         rt::at_exit(proc() {
             assert!(!DIRECTIVES.is_null());
-            let _directives: ~Vec<directive::LogDirective> =
+            let _directives: Box<Vec<directive::LogDirective>> =
                 cast::transmute(DIRECTIVES);
             DIRECTIVES = 0 as *Vec<directive::LogDirective>;
         });