about summary refs log tree commit diff
path: root/src/librustpkg
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-05-21 11:40:41 -0700
committerbors <bors@rust-lang.org>2013-05-21 11:40:41 -0700
commit73597a5bd5f7f3caba46e9e9369bf40881dbb619 (patch)
tree9f0aa158b80236e7353b5d06908e56e610a8ae72 /src/librustpkg
parent64963d6cbaea86e0d2a58f507e57a76da7512e3e (diff)
parent70222b7e86da5a813f9bcf60d884389fc8b04ef7 (diff)
downloadrust-73597a5bd5f7f3caba46e9e9369bf40881dbb619.tar.gz
rust-73597a5bd5f7f3caba46e9e9369bf40881dbb619.zip
auto merge of #6657 : sanxiyn/rust/allocation, r=thestinger
Diffstat (limited to 'src/librustpkg')
-rw-r--r--src/librustpkg/rustpkg.rc26
-rw-r--r--src/librustpkg/usage.rs20
-rw-r--r--src/librustpkg/util.rs12
3 files changed, 29 insertions, 29 deletions
diff --git a/src/librustpkg/rustpkg.rc b/src/librustpkg/rustpkg.rc
index c1aaa428715..94fdcddfbb5 100644
--- a/src/librustpkg/rustpkg.rc
+++ b/src/librustpkg/rustpkg.rc
@@ -126,14 +126,14 @@ impl<'self> PkgScript<'self> {
                                                &exe, @copy os::args()[0],
                                                driver::cu_everything);
                 debug!("Running program: %s %s %s", exe.to_str(), root.to_str(), what);
-                let status = run::run_program(exe.to_str(), ~[root.to_str(), what]);
+                let status = run::run_program(exe.to_str(), [root.to_str(), what]);
                 if status != 0 {
                     return (~[], status);
                 }
                 else {
                     debug!("Running program (configs): %s %s %s",
-                           exe.to_str(), root.to_str(), ~"configs");
-                    let output = run::program_output(exe.to_str(), ~[root.to_str(), ~"configs"]);
+                           exe.to_str(), root.to_str(), "configs");
+                    let output = run::program_output(exe.to_str(), [root.to_str(), ~"configs"]);
                     // Run the configs() function to get the configs
                     let mut cfgs = ~[];
                     for str::each_word(output.out) |w| {
@@ -360,9 +360,9 @@ pub fn main() {
     io::println("WARNING: The Rust package manager is experimental and may be unstable");
 
     let args = os::args();
-    let opts = ~[getopts::optflag(~"h"), getopts::optflag(~"help"),
-                 getopts::optflag(~"j"), getopts::optflag(~"json"),
-                 getopts::optmulti(~"c"), getopts::optmulti(~"cfg")];
+    let opts = ~[getopts::optflag("h"), getopts::optflag("help"),
+                 getopts::optflag("j"), getopts::optflag("json"),
+                 getopts::optmulti("c"), getopts::optmulti("cfg")];
     let matches = &match getopts::getopts(args, opts) {
         result::Ok(m) => m,
         result::Err(f) => {
@@ -371,10 +371,10 @@ pub fn main() {
             return;
         }
     };
-    let help = getopts::opt_present(matches, ~"h") ||
-               getopts::opt_present(matches, ~"help");
-    let json = getopts::opt_present(matches, ~"j") ||
-               getopts::opt_present(matches, ~"json");
+    let help = getopts::opt_present(matches, "h") ||
+               getopts::opt_present(matches, "help");
+    let json = getopts::opt_present(matches, "j") ||
+               getopts::opt_present(matches, "json");
     let mut args = copy matches.free;
 
     args.shift();
@@ -428,7 +428,7 @@ pub impl Crate {
 
     fn flag(&self, flag: ~str) -> Crate {
         Crate {
-            flags: vec::append(copy self.flags, ~[flag]),
+            flags: vec::append(copy self.flags, [flag]),
             .. copy *self
         }
     }
@@ -442,7 +442,7 @@ pub impl Crate {
 
     fn cfg(&self, cfg: ~str) -> Crate {
         Crate {
-            cfgs: vec::append(copy self.cfgs, ~[cfg]),
+            cfgs: vec::append(copy self.cfgs, [cfg]),
             .. copy *self
         }
     }
@@ -546,7 +546,7 @@ impl PkgSrc {
         let url = fmt!("https://%s", self.id.remote_path.to_str());
         util::note(fmt!("git clone %s %s", url, local.to_str()));
 
-        if run::program_output(~"git", ~[~"clone", copy url, local.to_str()]).status != 0 {
+        if run::program_output("git", [~"clone", copy url, local.to_str()]).status != 0 {
             util::note(fmt!("fetching %s failed: can't clone repository", url));
             return false;
         }
diff --git a/src/librustpkg/usage.rs b/src/librustpkg/usage.rs
index cfda56f777a..90c87210faa 100644
--- a/src/librustpkg/usage.rs
+++ b/src/librustpkg/usage.rs
@@ -11,7 +11,7 @@
 use core::io;
 
 pub fn general() {
-    io::println(~"Usage: rustpkg [options] <cmd> [args..]
+    io::println("Usage: rustpkg [options] <cmd> [args..]
 
 Where <cmd> is one of:
     build, clean, do, info, install, prefer, test, uninstall, unprefer
@@ -23,7 +23,7 @@ Options:
 }
 
 pub fn build() {
-    io::println(~"rustpkg [options..] build
+    io::println("rustpkg [options..] build
 
 Build all targets described in the package script in the current
 directory.
@@ -33,21 +33,21 @@ Options:
 }
 
 pub fn clean() {
-    io::println(~"rustpkg clean
+    io::println("rustpkg clean
 
 Remove all build files in the work cache for the package in the current
 directory.");
 }
 
 pub fn do_cmd() {
-    io::println(~"rustpkg do <cmd>
+    io::println("rustpkg do <cmd>
 
 Runs a command in the package script. You can listen to a command
 by tagging a function with the attribute `#[pkg_do(cmd)]`.");
 }
 
 pub fn info() {
-    io::println(~"rustpkg [options..] info
+    io::println("rustpkg [options..] info
 
 Probe the package script in the current directory for information.
 
@@ -56,7 +56,7 @@ Options:
 }
 
 pub fn install() {
-    io::println(~"rustpkg [options..] install [url] [target]
+    io::println("rustpkg [options..] install [url] [target]
 
 Install a package from a URL by Git or cURL (FTP, HTTP, etc.).
 If target is provided, Git will checkout the branch or tag before
@@ -76,14 +76,14 @@ Options:
 }
 
 pub fn uninstall() {
-    io::println(~"rustpkg uninstall <id|name>[@version]
+    io::println("rustpkg uninstall <id|name>[@version]
 
 Remove a package by id or name and optionally version. If the package(s)
 is/are depended on by another package then they cannot be removed.");
 }
 
 pub fn prefer() {
-    io::println(~"rustpkg [options..] prefer <id|name>[@version]
+    io::println("rustpkg [options..] prefer <id|name>[@version]
 
 By default all binaries are given a unique name so that multiple versions can
 coexist. The prefer command will symlink the uniquely named binary to
@@ -101,7 +101,7 @@ Example:
 }
 
 pub fn unprefer() {
-    io::println(~"rustpkg [options..] unprefer <id|name>[@version]
+    io::println("rustpkg [options..] unprefer <id|name>[@version]
 
 Remove all symlinks from the store to the binary directory for a package
 name and optionally version. If version is not supplied, the latest version
@@ -110,7 +110,7 @@ information.");
 }
 
 pub fn test() {
-    io::println(~"rustpkg [options..] test
+    io::println("rustpkg [options..] test
 
 Build all targets described in the package script in the current directory
 with the test flag. The test bootstraps will be run afterwards and the output
diff --git a/src/librustpkg/util.rs b/src/librustpkg/util.rs
index f18396f95be..94101c4676f 100644
--- a/src/librustpkg/util.rs
+++ b/src/librustpkg/util.rs
@@ -208,7 +208,7 @@ fn fold_item(ctx: @mut ReadyCtx,
              fold: @fold::ast_fold) -> Option<@ast::item> {
     ctx.path.push(item.ident);
 
-    let attrs = attr::find_attrs_by_name(item.attrs, ~"pkg_do");
+    let attrs = attr::find_attrs_by_name(item.attrs, "pkg_do");
 
     if attrs.len() > 0 {
         let mut cmds = ~[];
@@ -281,7 +281,7 @@ pub fn note(msg: ~str) {
 
     if term::color_supported() {
         term::fg(out, term::color_green);
-        out.write_str(~"note: ");
+        out.write_str("note: ");
         term::reset(out);
         out.write_line(msg);
     } else {
@@ -294,7 +294,7 @@ pub fn warn(msg: ~str) {
 
     if term::color_supported() {
         term::fg(out, term::color_yellow);
-        out.write_str(~"warning: ");
+        out.write_str("warning: ");
         term::reset(out);
         out.write_line(msg);
     } else {
@@ -307,7 +307,7 @@ pub fn error(msg: ~str) {
 
     if term::color_supported() {
         term::fg(out, term::color_red);
-        out.write_str(~"error: ");
+        out.write_str("error: ");
         term::reset(out);
         out.write_line(msg);
     } else {
@@ -353,8 +353,8 @@ pub fn compile_input(sysroot: Option<@Path>,
     debug!("compiling %s into %s",
            in_file.to_str(),
            out_file.to_str());
-    debug!("flags: %s", str::connect(flags, ~" "));
-    debug!("cfgs: %s", str::connect(cfgs, ~" "));
+    debug!("flags: %s", str::connect(flags, " "));
+    debug!("cfgs: %s", str::connect(cfgs, " "));
     debug!("compile_input's sysroot = %?", sysroot);
 
     let crate_type = match what {