]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #6177 : gifnksm/rust/iter-chain, r=thestinger
authorbors <bors@rust-lang.org>
Thu, 2 May 2013 13:15:37 +0000 (06:15 -0700)
committerbors <bors@rust-lang.org>
Thu, 2 May 2013 13:15:37 +0000 (06:15 -0700)
`T: Iterator<A>` and `U: Iterator<A>` should be able to `chain` whether `T` and `U` are same or not.

100 files changed:
src/compiletest/compiletest.rc
src/libcore/core.rc
src/libcore/either.rs
src/libcore/hashmap.rs
src/libcore/io.rs
src/libcore/libc.rs
src/libcore/num/cmath.rs
src/libcore/num/f32.rs
src/libcore/num/f64.rs
src/libcore/num/float.rs
src/libcore/option.rs
src/libcore/rand.rs
src/libcore/repr.rs
src/libcore/run.rs
src/libcore/sys.rs
src/libcore/task/mod.rs
src/libcore/unstable/extfmt.rs
src/libcore/unstable/lang.rs
src/libcore/vec.rs
src/libfuzzer/fuzzer.rc
src/librustc/back/abi.rs
src/librustc/back/arm.rs
src/librustc/back/link.rs
src/librustc/back/mips.rs
src/librustc/back/upcall.rs
src/librustc/back/x86.rs
src/librustc/back/x86_64.rs
src/librustc/driver/driver.rs
src/librustc/driver/session.rs
src/librustc/front/config.rs
src/librustc/front/test.rs
src/librustc/lib/llvm.rs
src/librustc/metadata/creader.rs
src/librustc/metadata/csearch.rs
src/librustc/metadata/cstore.rs
src/librustc/metadata/decoder.rs
src/librustc/metadata/encoder.rs
src/librustc/metadata/tydecode.rs
src/librustc/metadata/tyencode.rs
src/librustc/middle/check_const.rs
src/librustc/middle/check_loop.rs
src/librustc/middle/check_match.rs
src/librustc/middle/const_eval.rs
src/librustc/middle/freevars.rs
src/librustc/middle/kind.rs
src/librustc/middle/lint.rs
src/librustc/middle/liveness.rs
src/librustc/middle/mem_categorization.rs
src/librustc/middle/moves.rs
src/librustc/middle/privacy.rs
src/librustc/middle/region.rs
src/librustc/middle/trans/_match.rs
src/librustc/middle/trans/base.rs
src/librustc/middle/trans/build.rs
src/librustc/middle/trans/common.rs
src/librustc/middle/trans/tvec.rs
src/librustc/middle/ty.rs
src/librustc/middle/typeck/mod.rs
src/librustc/rustc.rc
src/librustc/util/common.rs
src/librustc/util/ppaux.rs
src/libstd/bitv.rs
src/libstd/cmp.rs
src/libstd/dbg.rs
src/libstd/deque.rs
src/libstd/getopts.rs
src/libstd/list.rs
src/libstd/num/bigint.rs
src/libstd/sha1.rs
src/libstd/sort.rs
src/libstd/std.rc
src/libstd/term.rs
src/libstd/test.rs
src/libsyntax/ast.rs
src/libsyntax/ast_map.rs
src/libsyntax/ast_util.rs
src/libsyntax/attr.rs
src/libsyntax/codemap.rs
src/libsyntax/ext/asm.rs
src/libsyntax/ext/base.rs
src/libsyntax/ext/env.rs
src/libsyntax/ext/expand.rs
src/libsyntax/ext/fmt.rs
src/libsyntax/ext/source_util.rs
src/libsyntax/ext/tt/macro_parser.rs
src/libsyntax/fold.rs
src/libsyntax/parse/attr.rs
src/libsyntax/parse/lexer.rs
src/libsyntax/parse/mod.rs
src/libsyntax/parse/parser.rs
src/libsyntax/parse/token.rs
src/libsyntax/print/pp.rs
src/libsyntax/print/pprust.rs
src/libsyntax/visit.rs
src/rt/rust_task.h
src/test/run-pass/item-attributes.rs
src/test/run-pass/spawn.rs
src/test/run-pass/spawn2.rs
src/test/run-pass/task-killjoin-rsrc.rs
src/test/run-pass/task-killjoin.rs

index 4392ce7ba28915e4a360a321c3e1a4fa16abec0f..b6d690f83076fa4d47bdb174debecb5b1c23bb6d 100644 (file)
@@ -223,10 +223,3 @@ pub fn make_test_closure(config: config, testfile: &Path) -> test::TestFn {
     let testfile = testfile.to_str();
     test::DynTestFn(|| runtest::run(config, testfile))
 }
-
-// Local Variables:
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 9a0419ebfc6b2ff3bbc4437d6f524766ace3a9cd..f410591fdc7a3abe0bc51f4753dae240f67f4493 100644 (file)
@@ -263,12 +263,3 @@ mod core {
     pub use sys;
     pub use pipes;
 }
-
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 92f850cddd6d18e0a890e0460ff6b9df33465405..33b7e81ee85fb90ba0925657b0aaf3a00c32904f 100644 (file)
@@ -263,13 +263,3 @@ fn test_partition_empty() {
     assert_eq!(vec::len(lefts), 0u);
     assert_eq!(vec::len(rights), 0u);
 }
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index 41f4f34dc1971518edcd6fd3f07b86e9cd9931fd..9b82a8dad059ed389c6ae208d27768eee3d8d2a9 100644 (file)
@@ -833,7 +833,7 @@ fn consume(&mut self, f: &fn(T)) {
     }
 }
 
-#[test]
+#[cfg(test)]
 mod test_map {
     use container::{Container, Map, Set};
     use option::{None, Some};
@@ -1009,7 +1009,7 @@ fn test_expand() {
     }
 }
 
-#[test]
+#[cfg(test)]
 mod test_set {
     use super::*;
     use container::{Container, Map, Set};
index 35ffd88c8f477e9904eb79ed489cebe1aef5414d..185b84a09c518187e4fb997e164fb65e31cbcd47 100644 (file)
@@ -1954,13 +1954,3 @@ fn test_read_write_f32() {
         }
     }
 }
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index 999a5d9b350e4a03d1b9507badd26a0d8e28bb58..53aaf5726dd0bf92aef2b6aa4c3067c67dcad0ac 100644 (file)
@@ -1846,12 +1846,3 @@ pub mod msvcrt {
         }
     }
 }
-
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 30b0c54dc2dc212124199b385619820f06545c73..8a0a88235d20cacde4fc45539b38e390b108f4ae 100644 (file)
@@ -267,14 +267,3 @@ pub mod c_double_targ_consts {
 }
 
 */
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
-
index 04ddd63a177e74819e0871095c3fe82278320fb3..a00225e85bc49f77dc62ea4895dad77c87102248 100644 (file)
@@ -986,13 +986,3 @@ fn test_primitive() {
         assert_eq!(Primitive::bytes::<f32>(), sys::size_of::<f32>());
     }
 }
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index 9f1944e3fad7fd3dc225ed66bb01bd9ee9f5ccc4..c3bd89b0e0361f5ebc3ce535da58b9e5b103ef0d 100644 (file)
@@ -1033,13 +1033,3 @@ fn test_primitive() {
         assert_eq!(Primitive::bytes::<f64>(), sys::size_of::<f64>());
     }
 }
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index f163d67a69ccbb1636a9c8c1a33f4f7deff7d8d6..b487fa48782b8526490b5be22cf6c8da570d130b 100644 (file)
@@ -1139,13 +1139,3 @@ pub fn test_to_str_inf() {
         assert_eq!(to_str_digits(-infinity, 10u), ~"-inf");
     }
 }
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index 17192b4257b16a6b9b5a0dc11c65a7c38a375ec9..47ec1fabcb8229bbcc620b455600841ac1a2fa57 100644 (file)
@@ -565,11 +565,3 @@ fn test_get_or_zero() {
     let no_stuff: Option<int> = None;
     assert!(no_stuff.get_or_zero() == 0);
 }
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 94ba5ba31b756412b59d46371cc9b1b25fb23d95..80f69f067eb543fe9445f12eaa2011a0b0516bf9 100644 (file)
@@ -1073,12 +1073,3 @@ pub enum rust_rng {}
         }
     }
 }
-
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 03e44e00d88311d91581608050376eaf7cc7a927..29b8400706ce0ca8ef0fa4262f515c42769400cd 100644 (file)
@@ -673,7 +673,7 @@ pub fn write_repr<T>(writer: @Writer, object: &T) {
     }
 }
 
-#[test]
+#[cfg(test)]
 struct P {a: int, b: float}
 
 #[test]
index 37401788ca2d1bf7c46d5a799a7b30981538f699..d0c495dd19e44f77606b97f98fbdca87fcfba268 100644 (file)
@@ -639,11 +639,3 @@ fn test_forced_destroy_actually_kills() {
         test_destroy_actually_kills(true);
     }
 }
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 8cad0a22886424be926e7f213d0474e12e691b41..c0c1ad6d89615fdeefa633577ea38ae41957ff89 100644 (file)
@@ -343,11 +343,3 @@ fn fail_static() { FailWithCause::fail_with("cause", file!(), line!())  }
     #[should_fail]
     fn fail_owned() { FailWithCause::fail_with(~"cause", file!(), line!())  }
 }
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 2a4817727f4cfdf5ace03d220ea8a20fc026c131..0e97c101dc651c701ddbcd2d3a816965cdfdd4d3 100644 (file)
@@ -797,7 +797,7 @@ fn test_run_basic() {
     po.recv();
 }
 
-#[test]
+#[cfg(test)]
 struct Wrapper {
     mut f: Option<Chan<()>>
 }
index b812be5575a4a3a3c79de6e6910abb7195be6124..f65b1e6726ed45edf7cb69ba7a88d55fcf9934f4 100644 (file)
@@ -688,11 +688,3 @@ fn fmt_slice() {
         let _s = fmt!("%s", s);
     }
 }
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 611862a79e7e0bb7a4a89f5aa58a9fc0aece3e80..a6599e03d6b72b6b53fadb7c54877c85fdbf4d98 100644 (file)
@@ -183,11 +183,3 @@ fn rust_start(main: *c_void, argc: c_int, argv: **c_char,
                       crate_map: *c_void) -> c_int;
     }
 }
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 86767dc5bad859003205af2e16c20f53349023e4..081efe48e1eb55f4f596f4416b5d038813275355 100644 (file)
@@ -137,9 +137,9 @@ pub fn uniq_len<T>(v: &const ~[T]) -> uint {
 }
 
 /**
- * Creates and initializes an immutable vector.
+ * Creates and initializes an owned vector.
  *
- * Creates an immutable vector of size `n_elts` and initializes the elements
+ * Creates an owned vector of size `n_elts` and initializes the elements
  * to the value returned by the function `op`.
  */
 pub fn from_fn<T>(n_elts: uint, op: old_iter::InitOp<T>) -> ~[T] {
@@ -159,9 +159,9 @@ pub fn from_fn<T>(n_elts: uint, op: old_iter::InitOp<T>) -> ~[T] {
 }
 
 /**
- * Creates and initializes an immutable vector.
+ * Creates and initializes an owned vector.
  *
- * Creates an immutable vector of size `n_elts` and initializes the elements
+ * Creates an owned vector of size `n_elts` and initializes the elements
  * to the value `t`.
  */
 pub fn from_elem<T:Copy>(n_elts: uint, t: T) -> ~[T] {
index fc1efd3313cbc2857b5335dcb8cd7c577d4d5781..7c93d867f5040869f3ee5d91fcf8621fe55fb560 100644 (file)
@@ -693,10 +693,3 @@ pub fn main() {
 
     error!("Fuzzer done");
 }
-
-// Local Variables:
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 70a029ede6f8d78efa63e321c69af5ee223a9035..842dd89a7cd49a83045245e061a0d494af02c761 100644 (file)
 pub fn yield_glue_name() -> ~str { return ~"rust_yield_glue"; }
 
 pub fn no_op_type_glue_name() -> ~str { return ~"rust_no_op_type_glue"; }
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index 97c3a588a7fc8d2a5d470a382faf4563229c089f..dfe5751f21b8304ab1cc45dfa64b95815d752ce1 100644 (file)
@@ -72,14 +72,3 @@ pub fn get_target_strs(target_os: session::os) -> target_strs::t {
         cc_args: ~[~"-marm"]
     };
 }
-
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index adaffe5873dabc1de9466e600364fdb0b6d68fc9..87e08a73fcb1c58f347d42a512c89ae919f8ca0c 100644 (file)
@@ -949,13 +949,3 @@ fn unlib(config: @session::config, stem: ~str) -> ~str {
 
     return args;
 }
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index 93c1879eb0f4be89791c790beb42f89a9e849809..b15306a56b0b9dcac5a7cb738a04faf0294bd54a 100644 (file)
@@ -72,14 +72,3 @@ pub fn get_target_strs(target_os: session::os) -> target_strs::t {
         cc_args: ~[]
     };
 }
-
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index 4cdd279e2fc25ff1303c0241a1b95e019869e569..8fcc5234e8b51ab897d5f83c6c2ee24681ec48ea 100644 (file)
@@ -59,12 +59,3 @@ fn nothrow(f: ValueRef) -> ValueRef {
             nothrow(dv(~"reset_stack_limit", ~[]))
     }
 }
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index 2cc812c3d41056f349729549b900190d5e200ce1..759f5f63c9ec232c04fafa15b1fda1f3561b1753 100644 (file)
@@ -55,13 +55,3 @@ pub fn get_target_strs(target_os: session::os) -> target_strs::t {
         cc_args: ~[~"-m32"]
     };
 }
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index b68073974dcf916f895d929d6dc22af693f24dc8..ed6f1d285147e5f8213057a9d9ace2b7c7a1ea5f 100644 (file)
@@ -63,13 +63,3 @@ pub fn get_target_strs(target_os: session::os) -> target_strs::t {
         cc_args: ~[~"-m64"]
     };
 }
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index 8c053c265fa212500d2e4ecd69692bb77e260fe3..afd0e0acfe91050406735f7009e57f864f8cf351 100644 (file)
@@ -951,11 +951,3 @@ fn test_switch_implies_cfg_test_unless_cfg_test() {
         assert!((vec::len(test_items) == 1u));
     }
 }
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index ff623049f758d0cf501a7e885c03c69391ba3256..237b03bc20fb377aa44e837a58c39f2af42c4b64 100644 (file)
@@ -175,16 +175,16 @@ pub struct Session_ {
 pub type Session = @Session_;
 
 pub impl Session_ {
-    fn span_fatal(@self, sp: span, msg: ~str) -> ! {
+    fn span_fatal(@self, sp: span, msg: &str) -> ! {
         self.span_diagnostic.span_fatal(sp, msg)
     }
-    fn fatal(@self, msg: ~str) -> ! {
+    fn fatal(@self, msg: &str) -> ! {
         self.span_diagnostic.handler().fatal(msg)
     }
-    fn span_err(@self, sp: span, msg: ~str) {
+    fn span_err(@self, sp: span, msg: &str) {
         self.span_diagnostic.span_err(sp, msg)
     }
-    fn err(@self, msg: ~str) {
+    fn err(@self, msg: &str) {
         self.span_diagnostic.handler().err(msg)
     }
     fn has_errors(@self) -> bool {
@@ -193,31 +193,31 @@ fn has_errors(@self) -> bool {
     fn abort_if_errors(@self) {
         self.span_diagnostic.handler().abort_if_errors()
     }
-    fn span_warn(@self, sp: span, msg: ~str) {
+    fn span_warn(@self, sp: span, msg: &str) {
         self.span_diagnostic.span_warn(sp, msg)
     }
-    fn warn(@self, msg: ~str) {
+    fn warn(@self, msg: &str) {
         self.span_diagnostic.handler().warn(msg)
     }
-    fn span_note(@self, sp: span, msg: ~str) {
+    fn span_note(@self, sp: span, msg: &str) {
         self.span_diagnostic.span_note(sp, msg)
     }
-    fn note(@self, msg: ~str) {
+    fn note(@self, msg: &str) {
         self.span_diagnostic.handler().note(msg)
     }
-    fn span_bug(@self, sp: span, msg: ~str) -> ! {
+    fn span_bug(@self, sp: span, msg: &str) -> ! {
         self.span_diagnostic.span_bug(sp, msg)
     }
-    fn bug(@self, msg: ~str) -> ! {
+    fn bug(@self, msg: &str) -> ! {
         self.span_diagnostic.handler().bug(msg)
     }
-    fn span_unimpl(@self, sp: span, msg: ~str) -> ! {
+    fn span_unimpl(@self, sp: span, msg: &str) -> ! {
         self.span_diagnostic.span_unimpl(sp, msg)
     }
-    fn unimpl(@self, msg: ~str) -> ! {
+    fn unimpl(@self, msg: &str) -> ! {
         self.span_diagnostic.handler().unimpl(msg)
     }
-    fn span_lint_level(@self, level: lint::level, sp: span, msg: ~str) {
+    fn span_lint_level(@self, level: lint::level, sp: span, msg: &str) {
         match level {
           lint::allow => { },
           lint::warn => self.span_warn(sp, msg),
@@ -230,7 +230,7 @@ fn span_lint(@self, lint_mode: lint::lint,
                  expr_id: ast::node_id,
                  item_id: ast::node_id,
                  span: span,
-                 msg: ~str) {
+                 msg: &str) {
         let level = lint::get_lint_settings_level(
             self.lint_settings, lint_mode, expr_id, item_id);
         self.span_lint_level(level, span, msg);
@@ -430,10 +430,3 @@ fn test_option_does_not_override_requested_lib_type() {
         assert!(building_library(lib_crate, crate, true));
     }
 }
-
-// Local Variables:
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 75ae8724d720b7742bfb01b5c21fd97c3c9f7948..2246dd9d2f0aa6d0688ae6d9c336c2ed708689be 100644 (file)
@@ -194,11 +194,3 @@ pub fn metas_in_cfg(cfg: ast::crate_cfg,
         })
     })
 }
-
-
-// Local Variables:
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 02e2a4c8734f8b55635c82e1237cfd95bb462c88..ddd702e7d697d670243082b4ec4d1918ae8bebfd 100644 (file)
@@ -141,7 +141,7 @@ fn fold_item(cx: @mut TestCtxt, i: @ast::item, fld: @fold::ast_fold)
     debug!("current path: %s",
            ast_util::path_name_i(copy cx.path, cx.sess.parse_sess.interner));
 
-    if is_test_fn(i) || is_bench_fn(i) {
+    if is_test_fn(cx, i) || is_bench_fn(i) {
         match i.node {
           ast::item_fn(_, purity, _, _, _) if purity == ast::unsafe_fn => {
             let sess = cx.sess;
@@ -169,7 +169,7 @@ fn fold_item(cx: @mut TestCtxt, i: @ast::item, fld: @fold::ast_fold)
     return res;
 }
 
-fn is_test_fn(i: @ast::item) -> bool {
+fn is_test_fn(cx: @mut TestCtxt, i: @ast::item) -> bool {
     let has_test_attr = !attr::find_attrs_by_name(i.attrs,
                                                   ~"test").is_empty();
 
@@ -188,6 +188,13 @@ fn has_test_signature(i: @ast::item) -> bool {
         }
     }
 
+    if has_test_attr && !has_test_signature(i) {
+        let sess = cx.sess;
+        sess.span_err(
+            i.span,
+            ~"functions used as tests must have signature fn() -> ()."
+        );
+    }
     return has_test_attr && has_test_signature(i);
 }
 
@@ -456,11 +463,3 @@ fn mk_test_desc_and_fn_rec(cx: &TestCtxt, test: &Test) -> @ast::expr {
     );
     e
 }
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 31050448e75520c53a2e9e0b129ea607a5f84df1..fbb3380554d9e2ba6e5f2d8025ef77e456640a46 100644 (file)
@@ -2196,13 +2196,3 @@ pub fn mk_section_iter(llof: ObjectFileRef) -> SectionIter {
         }
     }
 }
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index 0d0f0d7ab69f3e3ffac57849a301112b266694f6..da7a2c15f30be8b6a4cb34e5b8be1394f7204dd9 100644 (file)
@@ -328,11 +328,3 @@ fn resolve_crate_deps(e: @mut Env, cdata: @~[u8]) -> cstore::cnum_map {
     }
     return @mut cnum_map;
 }
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index f8dc34f9cee3a6f446b085584e5080d985dae3ca..375989b0ebe61c055d3714c95b385089a04e947c 100644 (file)
@@ -243,11 +243,3 @@ pub fn get_link_args_for_crate(cstore: @mut cstore::CStore,
     let cdata = cstore::get_crate_data(cstore, crate_num);
     decoder::get_link_args_for_crate(cdata)
 }
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 05275a4c66558d27cc2df94b40b7969d6a889197..21815a9ed4718175bb44a3a373ca1a48872344d0 100644 (file)
@@ -161,11 +161,3 @@ struct crate_hash { name: @~str, vers: @~str, hash: @~str }
 
     sorted.map(|ch| /*bad*/copy *ch.hash)
 }
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index fb7b3f9c8b129b604f8b4ae8c567b1eb18b402f8..61454c802cc9a715dd43af442bea9e73828707d5 100644 (file)
@@ -1176,11 +1176,3 @@ pub fn get_link_args_for_crate(cdata: cmd) -> ~[~str] {
     }
     result
 }
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index ba6a4f30857eb79ab22b6a320a1852d45c545d01..2a4334781e4dc3aa2e2173bb66a0d9e1828d193f 100644 (file)
@@ -1420,12 +1420,3 @@ pub fn encoded_ty(tcx: ty::ctxt, t: ty::t) -> ~str {
         tyencode::enc_ty(wr, cx, t);
     }
 }
-
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 011ee115e8c1521f3f6d5eb1804723dc45e155dd..b12db430afc31608601811e162411bc4865daf5e 100644 (file)
@@ -567,13 +567,3 @@ fn parse_bounds(st: @mut PState, conv: conv_did) -> @~[ty::param_bound] {
     }
     @bounds
 }
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index 763b1984b81c86dbfdfcb5e46f21782b1cfa3872..0548204b154e03c75bd2046328a852f57b121f10 100644 (file)
@@ -416,13 +416,3 @@ pub fn enc_type_param_def(w: @io::Writer, cx: @ctxt, v: &ty::TypeParameterDef) {
     w.write_char('|');
     enc_bounds(w, cx, v.bounds);
 }
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index 6a47eedcea8c330efcf85910f933b440e303333b..4e21fcb5bd97dce13d846235d3cefd9a5f3bc59a 100644 (file)
@@ -92,13 +92,13 @@ pub fn check_expr(sess: Session,
           expr_unary(deref, _) => { }
           expr_unary(box(_), _) | expr_unary(uniq(_), _) => {
             sess.span_err(e.span,
-                          ~"disallowed operator in constant expression");
+                          "disallowed operator in constant expression");
             return;
           }
           expr_lit(@codemap::spanned {node: lit_str(_), _}) => { }
           expr_binary(_, _, _) | expr_unary(_, _) => {
             if method_map.contains_key(&e.id) {
-                sess.span_err(e.span, ~"user-defined operators are not \
+                sess.span_err(e.span, "user-defined operators are not \
                                        allowed in constant expressions");
             }
           }
@@ -118,8 +118,8 @@ pub fn check_expr(sess: Session,
             // a path in trans::callee that only works in block contexts.
             if pth.types.len() != 0 {
                 sess.span_err(
-                    e.span, ~"paths in constants may only refer to \
-                              items without type parameters");
+                    e.span, "paths in constants may only refer to \
+                             items without type parameters");
             }
             match def_map.find(&e.id) {
               Some(&def_const(_)) |
@@ -131,11 +131,11 @@ pub fn check_expr(sess: Session,
                 debug!("(checking const) found bad def: %?", def);
                 sess.span_err(
                     e.span,
-                    fmt!("paths in constants may only refer to \
-                          constants or functions"));
+                    "paths in constants may only refer to \
+                     constants or functions");
               }
               None => {
-                sess.span_bug(e.span, ~"unbound path in const?!");
+                sess.span_bug(e.span, "unbound path in const?!");
               }
             }
           }
@@ -146,8 +146,8 @@ pub fn check_expr(sess: Session,
                 _ => {
                     sess.span_err(
                         e.span,
-                        ~"function calls in constants are limited to \
-                          struct and enum constructors");
+                        "function calls in constants are limited to \
+                         struct and enum constructors");
                 }
             }
           }
@@ -163,12 +163,12 @@ pub fn check_expr(sess: Session,
           expr_addr_of(*) => {
                 sess.span_err(
                     e.span,
-                    ~"borrowed pointers in constants may only refer to \
-                      immutable values");
+                    "borrowed pointers in constants may only refer to \
+                     immutable values");
           }
           _ => {
             sess.span_err(e.span,
-                          ~"constant contains unimplemented expression type");
+                          "constant contains unimplemented expression type");
             return;
           }
         }
@@ -178,14 +178,14 @@ pub fn check_expr(sess: Session,
         if t != ty_char {
             if (v as u64) > ast_util::int_ty_max(
                 if t == ty_i { sess.targ_cfg.int_type } else { t }) {
-                sess.span_err(e.span, ~"literal out of range for its type");
+                sess.span_err(e.span, "literal out of range for its type");
             }
         }
       }
       expr_lit(@codemap::spanned {node: lit_uint(v, t), _}) => {
         if v > ast_util::uint_ty_max(
             if t == ty_u { sess.targ_cfg.uint_type } else { t }) {
-            sess.span_err(e.span, ~"literal out of range for its type");
+            sess.span_err(e.span, "literal out of range for its type");
         }
       }
       _ => ()
@@ -224,7 +224,7 @@ struct env {
 
     fn visit_item(it: @item, env: env, v: visit::vt<env>) {
         if env.idstack.contains(&(it.id)) {
-            env.sess.span_fatal(env.root_it.span, ~"recursive constant");
+            env.sess.span_fatal(env.root_it.span, "recursive constant");
         }
         env.idstack.push(it.id);
         visit::visit_item(it, env, v);
@@ -253,11 +253,3 @@ fn visit_expr(e: @expr, env: env, v: visit::vt<env>) {
         visit::visit_expr(e, env, v);
     }
 }
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 9f26f7f83724f0276d03789a92767a2d6c21a9a3..e3b816fceb8bb49540b66e6e89288fd172c62ec3 100644 (file)
@@ -54,17 +54,17 @@ pub fn check_crate(tcx: ty::ctxt, crate: @crate) {
               }
               expr_break(_) => {
                 if !cx.in_loop {
-                    tcx.sess.span_err(e.span, ~"`break` outside of loop");
+                    tcx.sess.span_err(e.span, "`break` outside of loop");
                 }
               }
               expr_again(_) => {
                 if !cx.in_loop {
-                    tcx.sess.span_err(e.span, ~"`again` outside of loop");
+                    tcx.sess.span_err(e.span, "`again` outside of loop");
                 }
               }
               expr_ret(oe) => {
                 if !cx.can_ret {
-                    tcx.sess.span_err(e.span, ~"`return` in block function");
+                    tcx.sess.span_err(e.span, "`return` in block function");
                 }
                 visit::visit_expr_opt(oe, cx, v);
               }
index 852eb1b50a499d1500b3c0f620db9c689b1d1305..479271cf458dd6fe4e06d4d1def28ca03e193514 100644 (file)
@@ -94,7 +94,7 @@ pub fn check_expr(cx: @MatchCheckCtxt, ex: @expr, s: (), v: visit::vt<()>) {
        }
        let arms = vec::concat(arms.filter_mapped(unguarded_pat));
        if arms.is_empty() {
-           cx.tcx.sess.span_err(ex.span, ~"non-exhaustive patterns");
+           cx.tcx.sess.span_err(ex.span, "non-exhaustive patterns");
        } else {
            check_exhaustive(cx, ex.span, arms);
        }
@@ -111,7 +111,7 @@ pub fn check_arms(cx: @MatchCheckCtxt, arms: &[arm]) {
             let v = ~[*pat];
             match is_useful(cx, &seen, v) {
               not_useful => {
-                cx.tcx.sess.span_err(pat.span, ~"unreachable pattern");
+                cx.tcx.sess.span_err(pat.span, "unreachable pattern");
               }
               _ => ()
             }
@@ -685,7 +685,7 @@ pub fn check_local(cx: @MatchCheckCtxt,
     visit::visit_local(loc, s, v);
     if is_refutable(cx, loc.node.pat) {
         cx.tcx.sess.span_err(loc.node.pat.span,
-                          ~"refutable pattern in local binding");
+                             "refutable pattern in local binding");
     }
 
     // Check legality of move bindings.
@@ -708,7 +708,7 @@ pub fn check_fn(cx: @MatchCheckCtxt,
     for decl.inputs.each |input| {
         if is_refutable(cx, input.pat) {
             cx.tcx.sess.span_err(input.pat.span,
-                              ~"refutable pattern in function argument");
+                                 "refutable pattern in function argument");
         }
     }
 }
@@ -780,24 +780,24 @@ pub fn check_legality_of_move_bindings(cx: @MatchCheckCtxt,
         if sub.is_some() {
             tcx.sess.span_err(
                 p.span,
-                ~"cannot bind by-move with sub-bindings");
+                "cannot bind by-move with sub-bindings");
         } else if has_guard {
             tcx.sess.span_err(
                 p.span,
-                ~"cannot bind by-move into a pattern guard");
+                "cannot bind by-move into a pattern guard");
         } else if by_ref_span.is_some() {
             tcx.sess.span_err(
                 p.span,
-                ~"cannot bind by-move and by-ref \
-                  in the same pattern");
+                "cannot bind by-move and by-ref \
+                 in the same pattern");
             tcx.sess.span_note(
                 by_ref_span.get(),
-                ~"by-ref binding occurs here");
+                "by-ref binding occurs here");
         } else if is_lvalue {
             tcx.sess.span_err(
                 p.span,
-                ~"cannot bind by-move when \
-                  matching an lvalue");
+                "cannot bind by-move when \
+                 matching an lvalue");
         }
     };
 
@@ -837,9 +837,9 @@ pub fn check_legality_of_move_bindings(cx: @MatchCheckCtxt,
                         {
                             cx.tcx.sess.span_err(
                                 pat.span,
-                                ~"by-move pattern \
-                                  bindings may not occur \
-                                  behind @ or & bindings");
+                                "by-move pattern \
+                                 bindings may not occur \
+                                 behind @ or & bindings");
                         }
 
                         match sub {
@@ -862,11 +862,3 @@ pub fn check_legality_of_move_bindings(cx: @MatchCheckCtxt,
         (vt.visit_pat)(*pat, false, vt);
     }
 }
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 86b7379bb698ddb5a0e738bf70896e0b15996a45..63b9fcf7096d096782a7363706029da205c1628c 100644 (file)
@@ -484,12 +484,3 @@ pub fn lit_expr_eq(tcx: middle::ty::ctxt, a: @expr, b: @expr) -> bool {
 pub fn lit_eq(a: @lit, b: @lit) -> bool {
     compare_const_vals(&lit_to_const(a), &lit_to_const(b)) == 0
 }
-
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 4c8d36f93f4b24bbf6e8abadbbeae03cedb1dc30..419b75a2ad9d88673fcd519d45ca925bf204ba44 100644 (file)
@@ -119,11 +119,3 @@ pub fn get_freevars(tcx: ty::ctxt, fid: ast::node_id) -> freevar_info {
 pub fn has_freevars(tcx: ty::ctxt, fid: ast::node_id) -> bool {
     return vec::len(*get_freevars(tcx, fid)) != 0u;
 }
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 0925e8cdd637593c88128944f109d03c2684e2bd..6cdc96f7809a9ef29f1315bd0631eb3ef6a7bb3a 100644 (file)
@@ -97,21 +97,21 @@ fn check_struct_safe_for_destructor(cx: Context,
         });
         if !ty::type_is_owned(cx.tcx, struct_ty) {
             cx.tcx.sess.span_err(span,
-                                 ~"cannot implement a destructor on a struct \
-                                   that is not Owned");
+                                 "cannot implement a destructor on a struct \
+                                  that is not Owned");
             cx.tcx.sess.span_note(span,
-                                  ~"use \"#[unsafe_destructor]\" on the \
-                                    implementation to force the compiler to \
-                                    allow this");
+                                  "use \"#[unsafe_destructor]\" on the \
+                                   implementation to force the compiler to \
+                                   allow this");
         }
     } else {
         cx.tcx.sess.span_err(span,
-                             ~"cannot implement a destructor on a struct \
-                               with type parameters");
+                             "cannot implement a destructor on a struct \
+                              with type parameters");
         cx.tcx.sess.span_note(span,
-                              ~"use \"#[unsafe_destructor]\" on the \
-                                implementation to force the compiler to \
-                                allow this");
+                              "use \"#[unsafe_destructor]\" on the \
+                               implementation to force the compiler to \
+                               allow this");
     }
 }
 
@@ -143,10 +143,10 @@ fn check_item(item: @item, cx: Context, visitor: visit::vt<Context>) {
                                 }
                                 _ => {
                                     cx.tcx.sess.span_bug(self_type.span,
-                                                         ~"the self type for \
-                                                           the Drop trait \
-                                                           impl is not a \
-                                                           path");
+                                                         "the self type for \
+                                                          the Drop trait \
+                                                          impl is not a \
+                                                          path");
                                 }
                             }
                         }
@@ -193,7 +193,7 @@ fn check_for_block(_cx: Context, _fv: @freevar_entry) {
     fn check_for_bare(cx: Context, fv: @freevar_entry) {
         cx.tcx.sess.span_err(
             fv.span,
-            ~"attempted dynamic environment capture");
+            "attempted dynamic environment capture");
     }
 
     let fty = ty::node_id_to_type(cx.tcx, id);
@@ -409,7 +409,7 @@ fn check_imm_free_var(cx: Context, def: def, sp: span) {
             if is_mutbl {
                 cx.tcx.sess.span_err(
                     sp,
-                    ~"mutable variables cannot be implicitly captured");
+                    "mutable variables cannot be implicitly captured");
             }
         }
         def_arg(*) => { /* ok */ }
@@ -451,12 +451,12 @@ pub fn check_durable(tcx: ty::ctxt, ty: ty::t, sp: span) -> bool {
     if !ty::type_is_durable(tcx, ty) {
         match ty::get(ty).sty {
           ty::ty_param(*) => {
-            tcx.sess.span_err(sp, ~"value may contain borrowed \
-                                    pointers; use `'static` bound");
+            tcx.sess.span_err(sp, "value may contain borrowed \
+                                   pointers; use `'static` bound");
           }
           _ => {
-            tcx.sess.span_err(sp, ~"value may contain borrowed \
-                                    pointers");
+            tcx.sess.span_err(sp, "value may contain borrowed \
+                                   pointers");
           }
         }
         false
@@ -581,19 +581,9 @@ pub fn check_kind_bounds_of_cast(cx: Context, source: @expr, target: @expr) {
             if !ty::type_is_owned(cx.tcx, source_ty) {
                 cx.tcx.sess.span_err(
                     target.span,
-                    ~"uniquely-owned trait objects must be sendable");
+                    "uniquely-owned trait objects must be sendable");
             }
         }
         _ => {} // Nothing to do.
     }
 }
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index b67d74bc272b6fa328a91a1061e38819b42b96d9..265d6b0c7677cdf3c68e44d101ec1aa351b08e0f 100644 (file)
@@ -338,14 +338,14 @@ fn with_lint_attrs(&self, attrs: ~[ast::attribute], f: &fn(Context)) {
                           _ => {
                             self.sess.span_err(
                                 meta.span,
-                                ~"malformed lint attribute");
+                                "malformed lint attribute");
                           }
                         }
                     }
                   }
                   _  => {
                     self.sess.span_err(meta.span,
-                                       ~"malformed lint attribute");
+                                       "malformed lint attribute");
                   }
                 }
             }
@@ -485,8 +485,8 @@ fn check_item_while_true(cx: ty::ctxt, it: @ast::item) {
                                 cx.sess.span_lint(
                                     while_true, e.id, it.id,
                                     e.span,
-                                    ~"denote infinite loops \
-                                      with loop { ... }");
+                                    "denote infinite loops \
+                                     with loop { ... }");
                             }
                             _ => ()
                         }
@@ -603,7 +603,7 @@ fn is_comparison(binop: ast::binop) -> bool {
                     && !check_limits(cx, *binop, l, r) {
                     cx.sess.span_lint(
                         type_limits, e.id, it.id, e.span,
-                        ~"comparison is useless due to type limits");
+                        "comparison is useless due to type limits");
                 }
             }
             _ => ()
@@ -630,7 +630,7 @@ fn check_item_default_methods(cx: ty::ctxt, item: @ast::item) {
                             item.id,
                             item.id,
                             item.span,
-                            ~"default methods are experimental");
+                            "default methods are experimental");
                     }
                 }
             }
@@ -649,7 +649,7 @@ fn check_item_deprecated_mutable_fields(cx: ty::ctxt, item: @ast::item) {
                                           item.id,
                                           item.id,
                                           field.span,
-                                          ~"mutable fields are deprecated");
+                                          "mutable fields are deprecated");
                     }
                     ast::named_field(*) | ast::unnamed_field => {}
                 }
@@ -672,14 +672,14 @@ fn check_foreign_fn(cx: ty::ctxt, fn_id: ast::node_id,
                     cx.sess.span_lint(
                         ctypes, id, fn_id,
                         ty.span,
-                        ~"found rust type `int` in foreign module, while \
+                        "found rust type `int` in foreign module, while \
                          libc::c_int or libc::c_long should be used");
                   }
                   ast::def_prim_ty(ast::ty_uint(ast::ty_u)) => {
                     cx.sess.span_lint(
                         ctypes, id, fn_id,
                         ty.span,
-                        ~"found rust type `uint` in foreign module, while \
+                        "found rust type `uint` in foreign module, while \
                          libc::c_uint or libc::c_ulong should be used");
                   }
                   _ => ()
@@ -795,7 +795,7 @@ fn check_item_path_statement(cx: ty::ctxt, it: @ast::item) {
                         cx.sess.span_lint(
                             path_statement, id, it.id,
                             s.span,
-                            ~"path statement with no effect");
+                            "path statement with no effect");
                     }
                     _ => ()
                 }
@@ -835,8 +835,8 @@ fn check_case(cx: ty::ctxt, ident: ast::ident,
         if !is_camel_case(cx, ident) {
             cx.sess.span_lint(
                 non_camel_case_types, expr_id, item_id, span,
-                ~"type, variant, or trait should have \
-                  a camel case identifier");
+                "type, variant, or trait should have \
+                 a camel case identifier");
         }
     }
 
@@ -863,7 +863,7 @@ fn check_item_unused_unsafe(cx: ty::ctxt, it: @ast::item) {
                 if !cx.used_unsafe.contains(&blk.node.id) {
                     cx.sess.span_lint(unused_unsafe, blk.node.id, it.id,
                                       blk.span,
-                                      ~"unnecessary `unsafe` block");
+                                      "unnecessary `unsafe` block");
                 }
             }
             _ => ()
@@ -888,9 +888,9 @@ fn check_item_unused_mut(tcx: ty::ctxt, it: @ast::item) {
         }
         if !used {
             let msg = if bindings == 1 {
-                ~"variable does not need to be mutable"
+                "variable does not need to be mutable"
             } else {
-                ~"variables do not need to be mutable"
+                "variables do not need to be mutable"
             };
             tcx.sess.span_lint(unused_mut, p.id, it.id, p.span, msg);
         }
@@ -946,13 +946,3 @@ pub fn check_crate(tcx: ty::ctxt, crate: @ast::crate) {
 
     tcx.sess.abort_if_errors();
 }
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index 0df10c59a8aac7ffbb4dfa280d51475684655dde..40d62cac3572d98b942fd1a37b8b2a12cd8f5377 100644 (file)
@@ -359,7 +359,7 @@ fn captures(&mut self, expr: @expr) -> @~[CaptureInfo] {
         match self.capture_info_map.find(&expr.id) {
           Some(&caps) => caps,
           None => {
-            self.tcx.sess.span_bug(expr.span, ~"no registered caps");
+            self.tcx.sess.span_bug(expr.span, "no registered caps");
           }
         }
     }
@@ -687,7 +687,7 @@ fn variable_from_def_map(&self, node_id: node_id,
           }
           None => {
             self.tcx.sess.span_bug(
-                span, ~"Not present in def map")
+                span, "Not present in def map")
           }
         }
     }
@@ -804,15 +804,15 @@ fn find_loop_scope(&self, opt_label: Option<ident>, id: node_id, sp: span)
                       // to find with one
                 match self.tcx.def_map.find(&id) {
                     Some(&def_label(loop_id)) => loop_id,
-                    _ => self.tcx.sess.span_bug(sp, ~"Label on break/loop \
-                                                    doesn't refer to a loop")
+                    _ => self.tcx.sess.span_bug(sp, "Label on break/loop \
+                                                     doesn't refer to a loop")
                 },
             None => {
                 // Vanilla 'break' or 'loop', so use the enclosing
                 // loop scope
                 let loop_scope = &mut *self.loop_scope;
                 if loop_scope.len() == 0 {
-                    self.tcx.sess.span_bug(sp, ~"break outside loop");
+                    self.tcx.sess.span_bug(sp, "break outside loop");
                 }
                 else {
                     // FIXME(#5275): this shouldn't have to be a method...
@@ -994,7 +994,7 @@ fn propagate_through_stmt(&self, stmt: @stmt, succ: LiveNode)
           }
 
           stmt_mac(*) => {
-            self.tcx.sess.span_bug(stmt.span, ~"unexpanded macro");
+            self.tcx.sess.span_bug(stmt.span, "unexpanded macro");
           }
         }
     }
@@ -1164,7 +1164,7 @@ fn propagate_through_expr(&self, expr: @expr, succ: LiveNode)
               match self.break_ln.find(&sc) {
                   Some(&b) => b,
                   None => self.tcx.sess.span_bug(expr.span,
-                                ~"Break to unknown label")
+                                                 "Break to unknown label")
               }
           }
 
@@ -1178,7 +1178,7 @@ fn propagate_through_expr(&self, expr: @expr, succ: LiveNode)
               match self.cont_ln.find(&sc) {
                   Some(&b) => b,
                   None => self.tcx.sess.span_bug(expr.span,
-                                ~"Loop to unknown label")
+                                                 "Loop to unknown label")
               }
           }
 
@@ -1304,7 +1304,7 @@ fn propagate_through_expr(&self, expr: @expr, succ: LiveNode)
           }
 
           expr_mac(*) => {
-            self.tcx.sess.span_bug(expr.span, ~"unexpanded macro");
+            self.tcx.sess.span_bug(expr.span, "unexpanded macro");
           }
         }
     }
@@ -1618,10 +1618,10 @@ fn check_ret(@self, id: node_id, sp: span, _fk: &visit::fn_kind,
             } else if ty::type_is_bot(t_ret) {
                 // for bot return types, not ok.  Function should fail.
                 self.tcx.sess.span_err(
-                    sp, ~"some control paths may return");
+                    sp, "some control paths may return");
             } else {
                 self.tcx.sess.span_err(
-                    sp, ~"not all control paths return a value");
+                    sp, "not all control paths return a value");
             }
         }
     }
@@ -1712,10 +1712,10 @@ fn check_for_reassignment(@self, ln: LiveNode, var: Variable,
               None => {
                 self.tcx.sess.span_err(
                     span,
-                    ~"re-assignment of immutable variable");
+                    "re-assignment of immutable variable");
                 self.tcx.sess.span_note(
                     orig_span,
-                    ~"prior assignment occurs here");
+                    "prior assignment occurs here");
               }
             }
           }
index 7fa198be1d47fa75b14f616b5c73eefd0f428f04..866bd5377b9bac060004495e24376fd75c74eef0 100644 (file)
@@ -928,7 +928,7 @@ fn cat_pattern(&self,
                 _ => {
                     self.tcx.sess.span_bug(
                         pat.span,
-                        ~"enum pattern didn't resolve to enum or struct");
+                        "enum pattern didn't resolve to enum or struct");
                 }
             }
           }
index fe1466bf808a372d99f985943eee75c6ba581b82..ecee2ea1a2fb264191d755511a9c292c0a381110 100644 (file)
@@ -424,7 +424,7 @@ fn use_expr(&self,
                     MoveInWhole => {
                         self.tcx.sess.span_bug(
                             expr.span,
-                            fmt!("Component mode can never be MoveInWhole"));
+                            "Component mode can never be MoveInWhole");
                     }
                 }
             }
@@ -647,7 +647,7 @@ fn use_expr(&self,
             expr_mac(*) => {
                 self.tcx.sess.span_bug(
                     expr.span,
-                    ~"macro expression remains after expansion");
+                    "macro expression remains after expansion");
             }
         }
     }
index a37ebdcfaa263345260123f5c382cb1979e32c9f..be98195621902b8980899223e66630847e71e6b9 100644 (file)
@@ -99,8 +99,8 @@ pub fn check_crate(tcx: ty::ctxt,
                                          parental_privacy == Public)
                                          == Private {
             tcx.sess.span_err(span,
-                ~"can only dereference enums \
-                  with a single, public variant");
+                "can only dereference enums \
+                 with a single, public variant");
         }
     };
 
@@ -121,8 +121,8 @@ pub fn check_crate(tcx: ty::ctxt,
                                             tcx.sess.parse_sess.interner)));
             }
             None => {
-                tcx.sess.span_bug(span, ~"method not found in \
-                                          AST map?!");
+                tcx.sess.span_bug(span, "method not found in \
+                                         AST map?!");
             }
         }
     };
@@ -140,8 +140,8 @@ pub fn check_crate(tcx: ty::ctxt,
                 // Look up the enclosing impl.
                 if container_id.crate != local_crate {
                     tcx.sess.span_bug(span,
-                                      ~"local method isn't in local \
-                                        impl?!");
+                                      "local method isn't in local \
+                                       impl?!");
                 }
 
                 match tcx.items.find(&container_id.node) {
@@ -155,10 +155,10 @@ pub fn check_crate(tcx: ty::ctxt,
                         }
                     }
                     Some(_) => {
-                        tcx.sess.span_bug(span, ~"impl wasn't an item?!");
+                        tcx.sess.span_bug(span, "impl wasn't an item?!");
                     }
                     None => {
-                        tcx.sess.span_bug(span, ~"impl wasn't in AST map?!");
+                        tcx.sess.span_bug(span, "impl wasn't in AST map?!");
                     }
                 }
             }
@@ -185,8 +185,8 @@ pub fn check_crate(tcx: ty::ctxt,
                                             tcx.sess.parse_sess.interner)));
             }
             None => {
-                tcx.sess.span_bug(span, ~"method not found in \
-                                          AST map?!");
+                tcx.sess.span_bug(span, "method not found in \
+                                         AST map?!");
             }
         }
     };
@@ -219,7 +219,7 @@ pub fn check_crate(tcx: ty::ctxt,
                                                    .interner)));
                 }
                 None => {
-                    tcx.sess.span_bug(span, ~"item not found in AST map?!");
+                    tcx.sess.span_bug(span, "item not found in AST map?!");
                 }
             }
         };
@@ -333,10 +333,10 @@ pub fn check_crate(tcx: ty::ctxt,
                             match item.node {
                                 item_trait(_, _, ref methods) => {
                                     if method_num >= (*methods).len() {
-                                        tcx.sess.span_bug(span, ~"method \
-                                                                  number \
-                                                                  out of \
-                                                                  range?!");
+                                        tcx.sess.span_bug(span, "method \
+                                                                 number \
+                                                                 out of \
+                                                                 range?!");
                                     }
                                     match (*methods)[method_num] {
                                         provided(method)
@@ -363,20 +363,20 @@ pub fn check_crate(tcx: ty::ctxt,
                                     }
                                 }
                                 _ => {
-                                    tcx.sess.span_bug(span, ~"trait wasn't \
-                                                              actually a \
-                                                              trait?!");
+                                    tcx.sess.span_bug(span, "trait wasn't \
+                                                             actually a \
+                                                             trait?!");
                                 }
                             }
                         }
                         Some(_) => {
-                            tcx.sess.span_bug(span, ~"trait wasn't an \
-                                                      item?!");
+                            tcx.sess.span_bug(span, "trait wasn't an \
+                                                     item?!");
                         }
                         None => {
-                            tcx.sess.span_bug(span, ~"trait item wasn't \
-                                                      found in the AST \
-                                                      map?!");
+                            tcx.sess.span_bug(span, "trait item wasn't \
+                                                     found in the AST \
+                                                     map?!");
                         }
                     }
                 } else {
@@ -465,8 +465,8 @@ pub fn check_crate(tcx: ty::ctxt,
                             match method_map.find(&expr.id) {
                                 None => {
                                     tcx.sess.span_bug(expr.span,
-                                                      ~"method call not in \
-                                                        method map");
+                                                      "method call not in \
+                                                       method map");
                                 }
                                 Some(ref entry) => {
                                     debug!("(privacy checking) checking \
@@ -512,18 +512,18 @@ struct variant \
                                     }
                                     _ => {
                                         tcx.sess.span_bug(expr.span,
-                                                          ~"resolve didn't \
-                                                            map enum struct \
-                                                            constructor to a \
-                                                            variant def");
+                                                          "resolve didn't \
+                                                           map enum struct \
+                                                           constructor to a \
+                                                           variant def");
                                     }
                                 }
                             }
                         }
                         _ => {
-                            tcx.sess.span_bug(expr.span, ~"struct expr \
-                                                           didn't have \
-                                                           struct type?!");
+                            tcx.sess.span_bug(expr.span, "struct expr \
+                                                          didn't have \
+                                                          struct type?!");
                         }
                     }
                 }
@@ -579,18 +579,18 @@ struct variant \
                                     }
                                     _ => {
                                         tcx.sess.span_bug(pattern.span,
-                                                          ~"resolve didn't \
-                                                            map enum struct \
-                                                            pattern to a \
-                                                            variant def");
+                                                          "resolve didn't \
+                                                           map enum struct \
+                                                           pattern to a \
+                                                           variant def");
                                     }
                                 }
                             }
                         }
                         _ => {
                             tcx.sess.span_bug(pattern.span,
-                                              ~"struct pattern didn't have \
-                                                struct type?!");
+                                              "struct pattern didn't have \
+                                               struct type?!");
                         }
                     }
                 }
index 88e201fb5f4385de044ce49b849109f33915e426..4faa2150003f02d4c5fd0c4941c92b15ac7024ea 100644 (file)
@@ -320,7 +320,7 @@ fn ancestors_of(self: &RegionMaps, scope: ast::node_id)
 pub fn parent_id(cx: ctxt, span: span) -> ast::node_id {
     match cx.parent {
       None => {
-        cx.sess.span_bug(span, ~"crate should not be parent here");
+        cx.sess.span_bug(span, "crate should not be parent here");
       }
       Some(parent_id) => {
         parent_id
index 3755cca8c35e97acf40a44b302acba8da1ef7957..197b537fe9003ed2f77451d2b2f3df450bf134ba 100644 (file)
@@ -1862,11 +1862,3 @@ pub fn bind_irrefutable_pat(bcx: block,
     }
     return bcx;
 }
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 2090e50000b0110958edf5ef790eed222c222d70..0c3e3ba3cb6726ba3653830ace3d80cb91bd2f9e 100644 (file)
@@ -3172,12 +3172,3 @@ pub fn trans_crate(sess: session::Session,
         return (llmod, link_meta);
     }
 }
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index f5c496484a03767b3ee9c797a580e4748daaf033..a02ac96e520bd2fed0f22050558f045f8d94d65a 100644 (file)
@@ -1086,13 +1086,3 @@ pub fn AtomicRMW(cx: block, op: AtomicBinOp,
         llvm::LLVMBuildAtomicRMW(B(cx), op, dst, src, order)
     }
 }
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index f8fb0f4b7cf318f6b2194637873789b1eaeacc09..d31caffe77a1490aff88054be559095718881ae7 100644 (file)
@@ -1521,13 +1521,3 @@ pub fn dummy_substs(tps: ~[ty::t]) -> ty::substs {
 pub fn bool_to_i1(bcx: block, llval: ValueRef) -> ValueRef {
     build::ICmp(bcx, lib::llvm::IntNE, llval, C_bool(false))
 }
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index 30a7648e7eafb26f79b1c4e74a61d4cf5e6362bd..da1cdfa4db103af875b0d781e225455446bae1c9 100644 (file)
@@ -594,13 +594,3 @@ pub fn iter_vec_unboxed(bcx: block, body_ptr: ValueRef, vec_ty: ty::t,
     let dataptr = get_dataptr(bcx, body_ptr);
     return iter_vec_raw(bcx, dataptr, vec_ty, fill, f);
 }
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index ccd7cc6a8ab9821a75b0224b7bae3c4f6635b138..3c8f100d1c9337645ca5aad1920f1a7d4fa8c608 100644 (file)
@@ -3261,7 +3261,7 @@ pub fn expr_kind(tcx: ctxt,
         ast::expr_mac(*) => {
             tcx.sess.span_bug(
                 expr.span,
-                ~"macro expression remains after expansion");
+                "macro expression remains after expansion");
         }
     }
 }
@@ -4242,27 +4242,27 @@ pub fn eval_repeat_count(tcx: ctxt, count_expr: @ast::expr) -> uint {
         const_eval::const_uint(count) => return count as uint,
         const_eval::const_float(count) => {
             tcx.sess.span_err(count_expr.span,
-                              ~"expected signed or unsigned integer for \
-                                repeat count but found float");
+                              "expected signed or unsigned integer for \
+                               repeat count but found float");
             return count as uint;
         }
         const_eval::const_str(_) => {
             tcx.sess.span_err(count_expr.span,
-                              ~"expected signed or unsigned integer for \
-                                repeat count but found string");
+                              "expected signed or unsigned integer for \
+                               repeat count but found string");
             return 0;
         }
         const_eval::const_bool(_) => {
             tcx.sess.span_err(count_expr.span,
-                              ~"expected signed or unsigned integer for \
-                                repeat count but found boolean");
+                              "expected signed or unsigned integer for \
+                               repeat count but found boolean");
             return 0;
         }
       },
       Err(*) => {
         tcx.sess.span_err(count_expr.span,
-                          ~"expected constant integer for repeat count \
-                            but found variable");
+                          "expected constant integer for repeat count \
+                           but found variable");
         return 0;
       }
     }
@@ -4370,11 +4370,3 @@ pub fn visitor_object_ty(tcx: ctxt) -> (@TraitRef, t) {
     (trait_ref,
      mk_trait(tcx, trait_ref.def_id, copy trait_ref.substs, BoxTraitStore, ast::m_imm))
 }
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 646b6412f5507c824d212ce340f2de0a1c6dcc1f..b0e0b7319ac846914ba783c22a3798641cba7f53 100644 (file)
@@ -426,12 +426,3 @@ pub fn check_crate(tcx: ty::ctxt,
     tcx.sess.abort_if_errors();
     (ccx.method_map, ccx.vtable_map)
 }
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index 54c51cf2e487aea7f11306c16fc41ea43b99d955..adb1c2fcc41718c551fb50b1009422530a27f0d9 100644 (file)
@@ -357,11 +357,3 @@ pub fn main() {
         run_compiler(&args, demitter);
     }
 }
-
-
-// Local Variables:
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 38f55b2b6e4233a5e478115958ba5e1905cd54c8..b4a479fc5970f7d46c44e56d08e8d26819276a54 100644 (file)
@@ -112,13 +112,3 @@ pub fn pluralize(n: uint, s: ~str) -> ~str {
 
 // A set of node IDs (used to keep track of which node IDs are for statements)
 pub type stmt_set = @mut HashSet<ast::node_id>;
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index aa8c3f8fd1b7eb1e2b7a7b77a0a2e172105cd582..69849a8d51b832693f5a1417da003523348cf83e 100644 (file)
@@ -739,11 +739,3 @@ fn repr(&self, tcx: ctxt) -> ~str {
         vstore_to_str(tcx, *self)
     }
 }
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End
index 5314c35419cc5aaf464eb2d981d614b2761943fc..078ed6af5a02ad6bc98ae2b669f60ae15b777680 100644 (file)
@@ -1507,13 +1507,3 @@ fn bench_bitv_big_union(b: &mut BenchHarness) {
         }
     }
 }
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index 5d7f64a7c8fa0427a2f82d5ce3bf98f6da689f7c..ea3793c13748358caabd93b41649447029430553 100644 (file)
@@ -64,7 +64,7 @@ fn test_fuzzy_eq_eps() {
     assert!(!(&1.5f).fuzzy_eq_eps(&0.9, &0.5));
 }
 
-#[test]
+#[cfg(test)]
 mod test_complex{
     use cmp::*;
 
index 34dd6390ecc12f98c11edb8d49aa4c11a986e375..4b2d2a60a68ef5d275d2b1aa237fa4b081cce9a3 100644 (file)
@@ -76,11 +76,3 @@ fn test_breakpoint_should_not_abort_process_when_not_under_gdb() {
     // the process under normal circumstances
     breakpoint();
 }
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 5d52bb7c0810baaa87f153e948aa25723deeee6f..8a310a9f52b5e7dbd6116865ff5686b74ae310aa 100644 (file)
@@ -353,7 +353,7 @@ fn test_boxes() {
         assert!(*deq.get(3) == d);
     }
 
-    #[test]
+    #[cfg(test)]
     fn test_parameterized<T:Copy + Eq + Durable>(a: T, b: T, c: T, d: T) {
         let mut deq = Deque::new();
         assert!(deq.len() == 0);
index fda5c105da5f7e53597743625d47d17ae56a90cd..c03042fe9c2bfc63d1b0818996e3f4d8c87b78db 100644 (file)
@@ -1374,11 +1374,3 @@ fn test_groups_usage_description_wrapping() {
         assert!(usage == expected)
     }
 }
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 401cc121a62a8eb2c424075a22b6bb6500fa7360..2b6fa0bc05691065027bf8663988beb632037506 100644 (file)
@@ -242,11 +242,3 @@ fn test_append() {
             == list::append(list::from_vec(~[1,2]), list::from_vec(~[3,4])));
     }
 }
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index fa9d6318cc9473c76ea62d81a269ac0ca2c20a6e..e2a336027fdef962c3b4e5dd70516c6fcd95ead0 100644 (file)
@@ -80,6 +80,7 @@ pub fn to_uint(hi: BigDigit, lo: BigDigit) -> uint {
 A BigUint-typed value BigUint { data: @[a, b, c] } represents a number
 (a + b * BigDigit::base + c * BigDigit::base^2).
 */
+#[deriving(Clone)]
 pub struct BigUint {
     priv data: ~[BigDigit]
 }
@@ -680,7 +681,7 @@ pub fn to_uint(&self) -> uint {
 }
 
 /// A Sign is a BigInt's composing element.
-#[deriving(Eq)]
+#[deriving(Eq, Clone)]
 pub enum Sign { Minus, Zero, Plus }
 
 impl Ord for Sign {
@@ -726,6 +727,7 @@ fn neg(&self) -> Sign {
 }
 
 /// A big signed integer type.
+#[deriving(Clone)]
 pub struct BigInt {
     priv sign: Sign,
     priv data: BigUint
@@ -825,8 +827,8 @@ impl Signed for BigInt {
     #[inline(always)]
     fn abs(&self) -> BigInt {
         match self.sign {
-            Plus | Zero => copy *self,
-            Minus => BigInt::from_biguint(Plus, copy self.data)
+            Plus | Zero => self.clone(),
+            Minus => BigInt::from_biguint(Plus, self.data.clone())
         }
     }
 
@@ -850,8 +852,8 @@ impl Add<BigInt, BigInt> for BigInt {
     #[inline(always)]
     fn add(&self, other: &BigInt) -> BigInt {
         match (self.sign, other.sign) {
-            (Zero, _)      => copy *other,
-            (_,    Zero)   => copy *self,
+            (Zero, _)      => other.clone(),
+            (_,    Zero)   => self.clone(),
             (Plus, Plus)   => BigInt::from_biguint(Plus,
                                                    self.data + other.data),
             (Plus, Minus)  => self - (-*other),
@@ -866,7 +868,7 @@ impl Sub<BigInt, BigInt> for BigInt {
     fn sub(&self, other: &BigInt) -> BigInt {
         match (self.sign, other.sign) {
             (Zero, _)    => -other,
-            (_,    Zero) => copy *self,
+            (_,    Zero) => self.clone(),
             (Plus, Plus) => match self.data.cmp(&other.data) {
                 Less    => BigInt::from_biguint(Minus, other.data - self.data),
                 Greater => BigInt::from_biguint(Plus, self.data - other.data),
@@ -913,7 +915,7 @@ fn rem(&self, other: &BigInt) -> BigInt {
 impl Neg<BigInt> for BigInt {
     #[inline(always)]
     fn neg(&self) -> BigInt {
-        BigInt::from_biguint(self.sign.neg(), copy self.data)
+        BigInt::from_biguint(self.sign.neg(), self.data.clone())
     }
 }
 
@@ -1100,9 +1102,9 @@ fn to_uint(&self) -> uint {
 
 #[cfg(test)]
 mod biguint_tests {
+    use super::*;
     use core::num::{IntConvertible, Zero, One, FromStrRadix};
     use core::cmp::{Less, Equal, Greater};
-    use super::{BigUint, BigDigit};
 
     #[test]
     fn test_from_slice() {
@@ -1390,10 +1392,10 @@ fn test_div_rem() {
             let c = BigUint::from_slice(cVec);
 
             if !a.is_zero() {
-                assert!(c.div_rem(&a) == (copy b, Zero::zero()));
+                assert!(c.div_rem(&a) == (b.clone(), Zero::zero()));
             }
             if !b.is_zero() {
-                assert!(c.div_rem(&b) == (copy a, Zero::zero()));
+                assert!(c.div_rem(&b) == (a.clone(), Zero::zero()));
             }
         }
 
@@ -1555,7 +1557,7 @@ fn check(n: uint, s: &str) {
 
 #[cfg(test)]
 mod bigint_tests {
-    use super::{BigInt, BigUint, BigDigit, Sign, Minus, Zero, Plus};
+    use super::*;
     use core::cmp::{Less, Equal, Greater};
     use core::num::{IntConvertible, Zero, One, FromStrRadix};
 
index 7371250b38a91d81930c7ec467b83384e530b4a2..a8e0f7d062a58af24f2be8e4c3ebc817798901f9 100644 (file)
@@ -412,11 +412,3 @@ fn check_vec_eq(v0: ~[u8], v1: ~[u8]) {
         }
     }
 }
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 3e6011e80df81150a8aee7457a882c35213fbd88..172532a2e5b6bbb472f4c517af7b390f6e62ea70 100644 (file)
@@ -1202,11 +1202,3 @@ fn ge<'a>(&self, other: &'a LVal<'self>) -> bool {
         }
     }
 }
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 0a5348d79760ecf49b4779ecaf20a4a1862ab348..ea099090ebaba3a1832807a1c08ecea09447e68d 100644 (file)
@@ -121,11 +121,3 @@ pub mod std {
     pub use serialize;
     pub use test;
 }
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 022f1f8564ece8c0a21cccc485e468a3c8f94467..a79b9f4c84980bce53c67b5999336996a797544d 100644 (file)
@@ -76,10 +76,3 @@ pub fn fg(writer: @io::Writer, color: u8) {
 pub fn bg(writer: @io::Writer, color: u8) {
     return set_color(writer, '4' as u8, color);
 }
-
-// Local Variables:
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 278a326d1de959ca7f5fbad46f5dc8cd881ad5fa..65fb0c7426a4effc7895459dcc7c22c259306d5d 100644 (file)
@@ -960,12 +960,3 @@ fn testfn() { }
         }
     }
 }
-
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 4bb2d220ad669be146bc8e504307abdc8c40f6ef..a295952439fba032180adbef90bce456b14e4850 100644 (file)
@@ -1346,12 +1346,3 @@ mod test {
 }
 
 */
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index d2125cebb5e48cd6ee244cd55ee4bbdd0c5a166b..69397276c4f54d4470d0786490ea7e4ef1dd05db 100644 (file)
@@ -404,11 +404,3 @@ pub fn node_item_query<Result>(items: map, id: node_id,
         _ => fail!(error_msg)
     }
 }
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 2b3793e45e9c80373c372c6316093e8577be3952..47ef7227842e22e979d0b0baf387374e3af8d7f3 100644 (file)
@@ -832,11 +832,3 @@ fn unfold_marks(mrks:~[Mrk],tail:SyntaxContext,table: &mut SCTable) -> SyntaxCon
     }
 
 }
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 2f8405c6e9689c8cbf6e786a3c07d9f6cc3dc6ae..f4f0def284327a3f4a66d09758f15ea68f8fa364 100644 (file)
@@ -341,13 +341,3 @@ pub fn require_unique_names(diagnostic: @span_handler,
         }
     }
 }
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index 1194506a8876fb0a1884b3a6aa9ac0f6d5386e0b..5f4967351e11b990715c8abc16c29fc70882df37 100644 (file)
@@ -522,15 +522,3 @@ fn t2 () {
         fm.next_line(BytePos(2));
     }
 }
-
-
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index dfebf6f786a28d028e139659edc1cfe011ee348e..53f40113532b22f4460fb48f85a0601ba3db644f 100644 (file)
@@ -187,15 +187,3 @@ pub fn expand_asm(cx: @ext_ctxt, sp: span, tts: &[ast::token_tree])
         span: sp
     })
 }
-
-
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index 2d6d74b5c1e324867a5d0d1e3cfed0d5b066f6fb..1c03ad1375919c694950281b8ae9bc0b46e702ac 100644 (file)
@@ -543,13 +543,3 @@ mod test {
         assert_eq!(*(m.find(&@~"def").get()),16);
     }
 }
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index 5e5fd7d97b19f2d752635e10ab9834f515f9b1e4..5b1e3737b236b5ca7ce7cb1276ea03e02674a295 100644 (file)
@@ -34,13 +34,3 @@ pub fn expand_syntax_ext(cx: @ext_ctxt, sp: span, tts: &[ast::token_tree])
     };
     MRExpr(e)
 }
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index fde5a2594226e6e5dce860b03ab52a0dcc82155f..02a698b283d392a00570bca209b053755647df4a 100644 (file)
@@ -721,11 +721,3 @@ fn make_dummy_attr(s: @~str) -> ast::attribute {
     }
 
 }
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 9bbe617eb070bbb95215feecadb013e018c96072..62641279f883a3588605ad0537ceb75e31505799 100644 (file)
@@ -322,12 +322,3 @@ fn log_conv(c: &Conv) {
 
     return mk_block(cx, fmt_sp, ~[], stms, Some(buf()));
 }
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index 70aa9472c855ba2f5e869319980c2c0619653105..ab22b3152f4771d7b64ea3bbf1cf34ba2419be22 100644 (file)
@@ -150,13 +150,3 @@ fn res_rel_file(cx: @ext_ctxt, sp: codemap::span, arg: &Path) -> Path {
         copy *arg
     }
 }
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index e4e033e0ffff7e0c7cd089cdd9060e2fc5bab21e..0c1e619985d2605844257393fa9406edc0bb8ca6 100644 (file)
@@ -438,11 +438,3 @@ pub fn parse_nt(p: &Parser, name: ~str) -> nonterminal {
       _ => p.fatal(~"Unsupported builtin nonterminal parser: " + name)
     }
 }
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 36565395e598899df3b6842ae07d65afc515d20d..229a8664d0c350b3a9af27ff4089d0d35ea86401 100644 (file)
@@ -859,13 +859,3 @@ fn fold_attributes(&self, attrs: ~[attribute]) -> ~[attribute] {
 pub fn make_fold(afp: ast_fold_fns) -> @ast_fold {
     afp as @ast_fold
 }
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index cc580155d70cfd26f736c0f900270386fe6affcf..037b2c089f46a6936c2bce7b8ea704be98fbf4a8 100644 (file)
@@ -179,13 +179,3 @@ fn parse_optional_meta(&self) -> ~[@ast::meta_item] {
         }
     }
 }
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index 60d6ce504fd9aa9b554cf422ac1d9a814d4eadfa..16a7ef71317ef33f9bb30b0a0b9bc09f69bf902e 100644 (file)
@@ -892,13 +892,3 @@ fn mk_ident (env: Env, id: ~str, is_mod_name: bool) -> token::Token {
         assert_eq!(tok, token::LIFETIME(id));
     }
 }
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index 5d51a54d770b11936c476f10308360de0a998ec8..4f1d41a4a7a171ed9c09759d8776ca3461a62389 100644 (file)
@@ -418,7 +418,7 @@ fn string_to_parser(source_str: @~str) -> Parser {
         new_parser_from_source_str(ps,~[],~"bogofile",source_str)
     }
 
-    #[test] fn to_json_str<E : Encodable<std::json::Encoder>>(val: @E) -> ~str {
+    #[cfg(test)] fn to_json_str<E : Encodable<std::json::Encoder>>(val: @E) -> ~str {
         do io::with_str_writer |writer| {
             val.encode(~std::json::Encoder(writer));
         }
@@ -674,13 +674,3 @@ fn parser_done(p: Parser){
         string_to_expr(@~"a::z.froob(b,@(987+3))");
     }
 }
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index a582748edb39c83079faf2dc112208ca77653609..8459fc8c6273d74aebae5edfd1ec8dcdb5d3d5de 100644 (file)
@@ -4509,14 +4509,3 @@ fn parse_str(&self) -> @~str {
         }
     }
 }
-
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index 338b7c99d973002956584ecbfa5b579d42f3b8ac..fe7bd5b3bc17db3790e954d396dc11f805b840c6 100644 (file)
@@ -556,11 +556,3 @@ pub fn reserved_keyword_table() -> HashSet<~str> {
     }
     return words;
 }
-
-
-// Local Variables:
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index e2ad5becb123b31a7e1efb816f39ef0c080fcec1..3fa615939b77e98fdd928270a1bc121262ae66a4 100644 (file)
@@ -587,14 +587,3 @@ pub fn hardbreak_tok_offset(off: int) -> token {
 }
 
 pub fn hardbreak_tok() -> token { return hardbreak_tok_offset(0); }
-
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index ab958d8b5cef512c1e917b15de4c198f46049576..76de109eebd304cc7743bfd03ef4d14327b97fcd 100644 (file)
@@ -2280,13 +2280,3 @@ fn test_variant_to_str() {
         assert_eq!(&varstr,&~"pub principal_skinner");
     }
 }
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index 71cfbab91089e2f9acf8598cb0a91309e06650b8..9a0c97d76162bdb15b3281cfb302ae441f9cf04b 100644 (file)
@@ -757,11 +757,3 @@ fn v_struct_method(f: @fn(@method), m: @method, e: (), v: vt<()>) {
             v_struct_method(v.visit_struct_method, a, b, c)
     });
 }
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 4aa1199cabc3f2153f456ec5c564386bab2e2c28..fd4e8451b642ab11acfd60584870b74c45e64f02 100644 (file)
 #define RED_ZONE_SIZE RZ_MAC_32
 #endif
 
+#ifndef RED_ZONE_SIZE
+# error "Red zone not defined for this platform"
+#endif
+
 struct frame_glue_fns {
     uintptr_t mark_glue_off;
     uintptr_t drop_glue_off;
index 24fe671337287db617acdb2bfc4c5504651ce9d2..c616d46a8336c95efac6e4a7f524ba6e543db24b 100644 (file)
@@ -195,13 +195,3 @@ fn test_fn_inner() {
 }
 
 pub fn main() { }
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
index db4ca7b3ed863eda5054c47ab4822757c8e2fc69..63c2b7da38f2f3072df2754a8b642fd98209149c 100644 (file)
@@ -18,11 +18,3 @@ pub fn main() {
 }
 
 fn child(&&i: int) { error!(i); assert!((i == 10)); }
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index f9350746349b32c2b0dc9e2b20f89051da522530..e748a1636ea80ec9b5c23be7cbaf072127d3155d 100644 (file)
@@ -32,11 +32,3 @@ fn child(&&args: (int, int, int, int, int, int, int, int, int)) {
     assert!((i8 == 80));
     assert!((i9 == 90));
 }
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 7cd08695da0f04ba082e4359f7604f6993470881..879f668577f867bf8ed42985ebd6e410156840c2 100644 (file)
@@ -83,11 +83,3 @@ fn supervisor() {
 pub fn main() {
     join(joinable(supervisor));
 }
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
index 563e35be3d63bf68157794363082c2d9a8a8cf0c..73c069e560cd08dd59a6d328373421360dc3051a 100644 (file)
@@ -33,11 +33,3 @@ fn supervisor() {
 pub fn main() {
     task::spawn_unlinked(supervisor)
 }
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End: