about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaniel Micay <danielmicay@gmail.com>2013-07-31 17:59:59 -0400
committerDaniel Micay <danielmicay@gmail.com>2013-08-01 00:21:13 -0400
commitdabd4762037baab06603fe76dd59795e4d415334 (patch)
treed06d60ad7b3088ba03377f022c11fa779a78a7dc
parentc47be6929bafa6c585949907627cd1ea3280fd50 (diff)
downloadrust-dabd4762037baab06603fe76dd59795e4d415334.tar.gz
rust-dabd4762037baab06603fe76dd59795e4d415334.zip
make `in` and `foreach` get treated as keywords
-rw-r--r--src/libextra/crypto/digest.rs6
-rw-r--r--src/libextra/crypto/sha2.rs100
-rw-r--r--src/libextra/fileinput.rs22
-rw-r--r--src/libextra/flate.rs14
-rw-r--r--src/libextra/semver.rs2
-rw-r--r--src/libextra/url.rs22
-rw-r--r--src/librustc/middle/lint.rs4
-rw-r--r--src/librustc/middle/liveness.rs4
-rw-r--r--src/librustc/middle/trans/asm.rs6
-rw-r--r--src/librustc/middle/trans/type_use.rs4
-rw-r--r--src/librustc/middle/typeck/check/mod.rs4
-rw-r--r--src/librusti/rusti.rs10
-rw-r--r--src/librustpkg/tests.rs8
-rw-r--r--src/libstd/condition.rs14
-rw-r--r--src/libstd/os.rs34
-rw-r--r--src/libstd/rt/io/extensions.rs10
-rw-r--r--src/libstd/rt/io/net/tcp.rs8
-rw-r--r--src/libstd/rt/io/net/udp.rs2
-rw-r--r--src/libstd/rt/io/option.rs8
-rw-r--r--src/libstd/run.rs16
-rw-r--r--src/libstd/str.rs2
-rw-r--r--src/libsyntax/ext/asm.rs4
-rw-r--r--src/libsyntax/ext/expand.rs12
-rw-r--r--src/libsyntax/fold.rs2
-rw-r--r--src/libsyntax/parse/token.rs26
-rw-r--r--src/libsyntax/print/pprust.rs4
-rw-r--r--src/libsyntax/visit.rs4
-rw-r--r--src/test/run-pass/issue-2904.rs6
-rw-r--r--src/test/run-pass/option_addition.rs6
-rw-r--r--src/test/run-pass/record-pat.rs4
30 files changed, 184 insertions, 184 deletions
diff --git a/src/libextra/crypto/digest.rs b/src/libextra/crypto/digest.rs
index 26e8b80d8e3..92507f9ca88 100644
--- a/src/libextra/crypto/digest.rs
+++ b/src/libextra/crypto/digest.rs
@@ -65,7 +65,7 @@ pub trait DigestUtil {
      *
      * * in The string to feed into the digest
      */
-    fn input_str(&mut self, in: &str);
+    fn input_str(&mut self, input: &str);
 
     /**
      * Convenience functon that retrieves the result of a digest as a
@@ -75,8 +75,8 @@ pub trait DigestUtil {
 }
 
 impl<D: Digest> DigestUtil for D {
-    fn input_str(&mut self, in: &str) {
-        self.input(in.as_bytes());
+    fn input_str(&mut self, input: &str) {
+        self.input(input.as_bytes());
     }
 
     fn result_str(&mut self) -> ~str {
diff --git a/src/libextra/crypto/sha2.rs b/src/libextra/crypto/sha2.rs
index f21722e8d7a..dfefe9779d1 100644
--- a/src/libextra/crypto/sha2.rs
+++ b/src/libextra/crypto/sha2.rs
@@ -66,34 +66,34 @@ struct Engine512 {
 }
 
 // Convert a [u8] to a u64 in big-endian format
-fn to_u64(in: &[u8]) -> u64 {
-    (in[0] as u64) << 56 |
-    (in[1] as u64) << 48 |
-    (in[2] as u64) << 40 |
-    (in[3] as u64) << 32 |
-    (in[4] as u64) << 24 |
-    (in[5] as u64) << 16 |
-    (in[6] as u64) << 8 |
-    (in[7] as u64)
+fn to_u64(input: &[u8]) -> u64 {
+    (input[0] as u64) << 56 |
+    (input[1] as u64) << 48 |
+    (input[2] as u64) << 40 |
+    (input[3] as u64) << 32 |
+    (input[4] as u64) << 24 |
+    (input[5] as u64) << 16 |
+    (input[6] as u64) << 8 |
+    (input[7] as u64)
 }
 
 // Convert a u64 to a [u8] in big endian format
-fn from_u64(in: u64, out: &mut [u8]) {
-    out[0] = (in >> 56) as u8;
-    out[1] = (in >> 48) as u8;
-    out[2] = (in >> 40) as u8;
-    out[3] = (in >> 32) as u8;
-    out[4] = (in >> 24) as u8;
-    out[5] = (in >> 16) as u8;
-    out[6] = (in >> 8) as u8;
-    out[7] = in as u8;
+fn from_u64(input: u64, out: &mut [u8]) {
+    out[0] = (input >> 56) as u8;
+    out[1] = (input >> 48) as u8;
+    out[2] = (input >> 40) as u8;
+    out[3] = (input >> 32) as u8;
+    out[4] = (input >> 24) as u8;
+    out[5] = (input >> 16) as u8;
+    out[6] = (input >> 8) as u8;
+    out[7] = input as u8;
 }
 
 impl Engine512 {
-    fn input_byte(&mut self, in: u8) {
+    fn input_byte(&mut self, input: u8) {
         assert!(!self.finished)
 
-        self.input_buffer[self.input_buffer_idx] = in;
+        self.input_buffer[self.input_buffer_idx] = input;
         self.input_buffer_idx += 1;
 
         if (self.input_buffer_idx == 8) {
@@ -105,25 +105,25 @@ impl Engine512 {
         self.bit_counter.add_bytes(1);
     }
 
-    fn input_vec(&mut self, in: &[u8]) {
+    fn input_vec(&mut self, input: &[u8]) {
         assert!(!self.finished)
 
         let mut i = 0;
 
-        while i < in.len() && self.input_buffer_idx != 0 {
-            self.input_byte(in[i]);
+        while i < input.len() && self.input_buffer_idx != 0 {
+            self.input_byte(input[i]);
             i += 1;
         }
 
-        while in.len() - i >= 8 {
-            let w = to_u64(in.slice(i, i + 8));
+        while input.len() - i >= 8 {
+            let w = to_u64(input.slice(i, i + 8));
             self.process_word(w);
             self.bit_counter.add_bytes(8);
             i += 8;
         }
 
-        while i < in.len() {
-            self.input_byte(in[i]);
+        while i < input.len() {
+            self.input_byte(input[i]);
             i += 1;
         }
     }
@@ -135,8 +135,8 @@ impl Engine512 {
         self.W_idx = 0;
     }
 
-    fn process_word(&mut self, in: u64) {
-        self.W[self.W_idx] = in;
+    fn process_word(&mut self, input: u64) {
+        self.W[self.W_idx] = input;
         self.W_idx += 1;
         if (self.W_idx == 16) {
             self.W_idx = 0;
@@ -356,26 +356,26 @@ struct Engine256 {
 }
 
 // Convert a [u8] to a u32 in big endian format
-fn to_u32(in: &[u8]) -> u32 {
-    (in[0] as u32) << 24 |
-    (in[1] as u32) << 16 |
-    (in[2] as u32) << 8 |
-    (in[3] as u32)
+fn to_u32(input: &[u8]) -> u32 {
+    (input[0] as u32) << 24 |
+    (input[1] as u32) << 16 |
+    (input[2] as u32) << 8 |
+    (input[3] as u32)
 }
 
 // Convert a u32 to a [u8] in big endian format
-fn from_u32(in: u32, out: &mut [u8]) {
-    out[0] = (in >> 24) as u8;
-    out[1] = (in >> 16) as u8;
-    out[2] = (in >> 8) as u8;
-    out[3] = in as u8;
+fn from_u32(input: u32, out: &mut [u8]) {
+    out[0] = (input >> 24) as u8;
+    out[1] = (input >> 16) as u8;
+    out[2] = (input >> 8) as u8;
+    out[3] = input as u8;
 }
 
 impl Engine256 {
-    fn input_byte(&mut self, in: u8) {
+    fn input_byte(&mut self, input: u8) {
         assert!(!self.finished)
 
-        self.input_buffer[self.input_buffer_idx] = in;
+        self.input_buffer[self.input_buffer_idx] = input;
         self.input_buffer_idx += 1;
 
         if (self.input_buffer_idx == 4) {
@@ -387,25 +387,25 @@ impl Engine256 {
         self.length_bytes += 1;
     }
 
-    fn input_vec(&mut self, in: &[u8]) {
+    fn input_vec(&mut self, input: &[u8]) {
         assert!(!self.finished)
 
         let mut i = 0;
 
-        while i < in.len() && self.input_buffer_idx != 0 {
-            self.input_byte(in[i]);
+        while i < input.len() && self.input_buffer_idx != 0 {
+            self.input_byte(input[i]);
             i += 1;
         }
 
-        while in.len() - i >= 4 {
-            let w = to_u32(in.slice(i, i + 4));
+        while input.len() - i >= 4 {
+            let w = to_u32(input.slice(i, i + 4));
             self.process_word(w);
             self.length_bytes += 4;
             i += 4;
         }
 
-        while i < in.len() {
-            self.input_byte(in[i]);
+        while i < input.len() {
+            self.input_byte(input[i]);
             i += 1;
         }
 
@@ -418,8 +418,8 @@ impl Engine256 {
         self.W_idx = 0;
     }
 
-    fn process_word(&mut self, in: u32) {
-        self.W[self.W_idx] = in;
+    fn process_word(&mut self, input: u32) {
+        self.W[self.W_idx] = input;
         self.W_idx += 1;
         if (self.W_idx == 16) {
             self.W_idx = 0;
diff --git a/src/libextra/fileinput.rs b/src/libextra/fileinput.rs
index f7c54634fe4..d7cf217fbec 100644
--- a/src/libextra/fileinput.rs
+++ b/src/libextra/fileinput.rs
@@ -72,10 +72,10 @@ input, skips the current file and then numbers the remaining lines
 (where the numbers are from the start of each file, rather than the
 total line count).
 
-    let in = FileInput::from_vec(pathify([~"a.txt", ~"b.txt", ~"c.txt"],
+    let input = FileInput::from_vec(pathify([~"a.txt", ~"b.txt", ~"c.txt"],
                                              true));
 
-    for in.each_line |line| {
+    for input.each_line |line| {
         if line.is_empty() {
             break
         }
@@ -85,9 +85,9 @@ total line count).
     io::println("Continue?");
 
     if io::stdin().read_line() == ~"yes" {
-        in.next_file(); // skip!
+        input.next_file(); // skip!
 
-        for in.each_line_state |line, state| {
+        for input.each_line_state |line, state| {
            io::println(fmt!("%u: %s", state.line_num_file,
                                       line))
         }
@@ -589,29 +589,29 @@ mod test {
             make_file(filename.get_ref(), contents);
         }
 
-        let in = FileInput::from_vec(filenames);
+        let input = FileInput::from_vec(filenames);
 
         // read once from 0
-        assert_eq!(in.read_line(), ~"0 1");
-        in.next_file(); // skip the rest of 1
+        assert_eq!(input.read_line(), ~"0 1");
+        input.next_file(); // skip the rest of 1
 
         // read all lines from 1 (but don't read any from 2),
         for uint::range(1, 4) |i| {
-            assert_eq!(in.read_line(), fmt!("1 %u", i));
+            assert_eq!(input.read_line(), fmt!("1 %u", i));
         }
         // 1 is finished, but 2 hasn't been started yet, so this will
         // just "skip" to the beginning of 2 (Python's fileinput does
         // the same)
-        in.next_file();
+        input.next_file();
 
-        assert_eq!(in.read_line(), ~"2 1");
+        assert_eq!(input.read_line(), ~"2 1");
     }
 
     #[test]
     #[should_fail]
     fn test_input_vec_missing_file() {
         for input_vec(pathify([~"this/file/doesnt/exist"], true)) |line| {
-            io::println(line);
+            println(line);
         }
     }
 }
diff --git a/src/libextra/flate.rs b/src/libextra/flate.rs
index 830ef781be9..57edaa53eaf 100644
--- a/src/libextra/flate.rs
+++ b/src/libextra/flate.rs
@@ -95,18 +95,18 @@ mod tests {
             words.push(r.gen_bytes(range));
         }
         for 20.times {
-            let mut in = ~[];
+            let mut input = ~[];
             for 2000.times {
-                in.push_all(r.choose(words));
+                input.push_all(r.choose(words));
             }
             debug!("de/inflate of %u bytes of random word-sequences",
-                   in.len());
-            let cmp = deflate_bytes(in);
+                   input.len());
+            let cmp = deflate_bytes(input);
             let out = inflate_bytes(cmp);
             debug!("%u bytes deflated to %u (%.1f%% size)",
-                   in.len(), cmp.len(),
-                   100.0 * ((cmp.len() as float) / (in.len() as float)));
-            assert_eq!(in, out);
+                   input.len(), cmp.len(),
+                   100.0 * ((cmp.len() as float) / (input.len() as float)));
+            assert_eq!(input, out);
         }
     }
 }
diff --git a/src/libextra/semver.rs b/src/libextra/semver.rs
index 9f2bfd6592a..8c298a7373d 100644
--- a/src/libextra/semver.rs
+++ b/src/libextra/semver.rs
@@ -221,7 +221,7 @@ pub fn parse(s: &str) -> Option<Version> {
     }
     let s = s.trim();
     let mut bad = false;
-    do bad_parse::cond.trap(|_| { debug!("bad"); bad = true }).in {
+    do bad_parse::cond.trap(|_| { debug!("bad"); bad = true }).inside {
         do io::with_str_reader(s) |rdr| {
             let v = parse_reader(rdr);
             if bad || v.to_str() != s.to_owned() {
diff --git a/src/libextra/url.rs b/src/libextra/url.rs
index 563619bb52d..af8d5e17a7c 100644
--- a/src/libextra/url.rs
+++ b/src/libextra/url.rs
@@ -407,7 +407,7 @@ fn get_authority(rawurl: &str) ->
 
     let len = rawurl.len();
     let mut st = Start;
-    let mut in = Digit; // most restricted, start here.
+    let mut input = Digit; // most restricted, start here.
 
     let mut userinfo = None;
     let mut host = ~"";
@@ -425,13 +425,13 @@ fn get_authority(rawurl: &str) ->
         match c {
           '0' .. '9' => (),
           'A' .. 'F' | 'a' .. 'f' => {
-            if in == Digit {
-                in = Hex;
+            if input == Digit {
+                input = Hex;
             }
           }
           'G' .. 'Z' | 'g' .. 'z' | '-' | '.' | '_' | '~' | '%' |
           '&' |'\'' | '(' | ')' | '+' | '!' | '*' | ',' | ';' | '=' => {
-            in = Unreserved;
+            input = Unreserved;
           }
           ':' | '@' | '?' | '#' | '/' => {
             // separators, don't change anything
@@ -452,7 +452,7 @@ fn get_authority(rawurl: &str) ->
               }
               PassHostPort => {
                 // multiple colons means ipv6 address.
-                if in == Unreserved {
+                if input == Unreserved {
                     return Err(
                         ~"Illegal characters in IPv6 address.");
                 }
@@ -461,13 +461,13 @@ fn get_authority(rawurl: &str) ->
               InHost => {
                 pos = i;
                 // can't be sure whether this is an ipv6 address or a port
-                if in == Unreserved {
+                if input == Unreserved {
                     return Err(~"Illegal characters in authority.");
                 }
                 st = Ip6Port;
               }
               Ip6Port => {
-                if in == Unreserved {
+                if input == Unreserved {
                     return Err(~"Illegal characters in authority.");
                 }
                 st = Ip6Host;
@@ -483,11 +483,11 @@ fn get_authority(rawurl: &str) ->
                 return Err(~"Invalid ':' in authority.");
               }
             }
-            in = Digit; // reset input class
+            input = Digit; // reset input class
           }
 
           '@' => {
-            in = Digit; // reset input class
+            input = Digit; // reset input class
             colon_count = 0; // reset count
             match st {
               Start => {
@@ -535,7 +535,7 @@ fn get_authority(rawurl: &str) ->
         }
       }
       PassHostPort | Ip6Port => {
-        if in != Digit {
+        if input != Digit {
             return Err(~"Non-digit characters in port.");
         }
         host = rawurl.slice(begin, pos).to_owned();
@@ -545,7 +545,7 @@ fn get_authority(rawurl: &str) ->
         host = rawurl.slice(begin, end).to_owned();
       }
       InPort => {
-        if in != Digit {
+        if input != Digit {
             return Err(~"Non-digit characters in port.");
         }
         port = Some(rawurl.slice(pos+1, end).to_owned());
diff --git a/src/librustc/middle/lint.rs b/src/librustc/middle/lint.rs
index 41b6c52466f..1f01ad7a282 100644
--- a/src/librustc/middle/lint.rs
+++ b/src/librustc/middle/lint.rs
@@ -706,8 +706,8 @@ fn check_item_ctypes(cx: &Context, it: &ast::item) {
     }
 
     fn check_foreign_fn(cx: &Context, decl: &ast::fn_decl) {
-        for decl.inputs.iter().advance |in| {
-            check_ty(cx, &in.ty);
+        for decl.inputs.iter().advance |input| {
+            check_ty(cx, &input.ty);
         }
         check_ty(cx, &decl.output)
     }
diff --git a/src/librustc/middle/liveness.rs b/src/librustc/middle/liveness.rs
index e595e7c0694..9c97daec8e7 100644
--- a/src/librustc/middle/liveness.rs
+++ b/src/librustc/middle/liveness.rs
@@ -1461,8 +1461,8 @@ fn check_expr(expr: @expr, (this, vt): (@Liveness, vt<@Liveness>)) {
       }
 
       expr_inline_asm(ref ia) => {
-        for ia.inputs.iter().advance |&(_, in)| {
-          (vt.visit_expr)(in, (this, vt));
+        for ia.inputs.iter().advance |&(_, input)| {
+          (vt.visit_expr)(input, (this, vt));
         }
 
         // Output operands must be lvalues
diff --git a/src/librustc/middle/trans/asm.rs b/src/librustc/middle/trans/asm.rs
index 9f302ee6676..323b649f81f 100644
--- a/src/librustc/middle/trans/asm.rs
+++ b/src/librustc/middle/trans/asm.rs
@@ -68,14 +68,14 @@ pub fn trans_inline_asm(bcx: @mut Block, ia: &ast::inline_asm) -> @mut Block {
     cleanups.clear();
 
     // Now the input operands
-    let inputs = do ia.inputs.map |&(c, in)| {
+    let inputs = do ia.inputs.map |&(c, input)| {
         constraints.push(c);
 
         unpack_result!(bcx, {
             callee::trans_arg_expr(bcx,
-                                   expr_ty(bcx, in),
+                                   expr_ty(bcx, input),
                                    ty::ByCopy,
-                                   in,
+                                   input,
                                    &mut cleanups,
                                    None,
                                    callee::DontAutorefArg)
diff --git a/src/librustc/middle/trans/type_use.rs b/src/librustc/middle/trans/type_use.rs
index a599c7c798e..0d3a8039d90 100644
--- a/src/librustc/middle/trans/type_use.rs
+++ b/src/librustc/middle/trans/type_use.rs
@@ -388,8 +388,8 @@ pub fn mark_for_expr(cx: &Context, e: &expr) {
       }
 
       expr_inline_asm(ref ia) => {
-        for ia.inputs.iter().advance |&(_, in)| {
-          node_type_needs(cx, use_repr, in.id);
+        for ia.inputs.iter().advance |&(_, input)| {
+          node_type_needs(cx, use_repr, input.id);
         }
         for ia.outputs.iter().advance |&(_, out)| {
           node_type_needs(cx, use_repr, out.id);
diff --git a/src/librustc/middle/typeck/check/mod.rs b/src/librustc/middle/typeck/check/mod.rs
index 4a3f72a2276..61801404148 100644
--- a/src/librustc/middle/typeck/check/mod.rs
+++ b/src/librustc/middle/typeck/check/mod.rs
@@ -2478,8 +2478,8 @@ pub fn check_expr_with_unifier(fcx: @mut FnCtxt,
         fcx.write_ty(id, ty_param_bounds_and_ty.ty);
       }
       ast::expr_inline_asm(ref ia) => {
-          for ia.inputs.iter().advance |&(_, in)| {
-              check_expr(fcx, in);
+          for ia.inputs.iter().advance |&(_, input)| {
+              check_expr(fcx, input);
           }
           for ia.outputs.iter().advance |&(_, out)| {
               check_expr(fcx, out);
diff --git a/src/librusti/rusti.rs b/src/librusti/rusti.rs
index 0c1f4e203aa..a79f20633ad 100644
--- a/src/librusti/rusti.rs
+++ b/src/librusti/rusti.rs
@@ -447,7 +447,7 @@ fn run_cmd(repl: &mut Repl, _in: @io::Reader, _out: @io::Writer,
 
 /// Executes a line of input, which may either be rust code or a
 /// :command. Returns a new Repl if it has changed.
-pub fn run_line(repl: &mut Repl, in: @io::Reader, out: @io::Writer, line: ~str,
+pub fn run_line(repl: &mut Repl, input: @io::Reader, out: @io::Writer, line: ~str,
                 use_rl: bool) -> bool
 {
     if line.starts_with(":") {
@@ -464,11 +464,11 @@ pub fn run_line(repl: &mut Repl, in: @io::Reader, out: @io::Writer, line: ~str,
                     split.slice(1, len).to_owned()
                 } else { ~[] };
 
-                match run_cmd(repl, in, out, cmd, args, use_rl) {
+                match run_cmd(repl, input, out, cmd, args, use_rl) {
                     action_none => { }
                     action_run_line(multiline_cmd) => {
                         if !multiline_cmd.is_empty() {
-                            return run_line(repl, in, out, multiline_cmd, use_rl);
+                            return run_line(repl, input, out, multiline_cmd, use_rl);
                         }
                     }
                 }
@@ -500,7 +500,7 @@ pub fn run_line(repl: &mut Repl, in: @io::Reader, out: @io::Writer, line: ~str,
 
 pub fn main() {
     let args = os::args();
-    let in = io::stdin();
+    let input = io::stdin();
     let out = io::stdout();
     let mut repl = Repl {
         prompt: ~"rusti> ",
@@ -542,7 +542,7 @@ pub fn main() {
                     }
                     loop;
                 }
-                run_line(&mut repl, in, out, line, istty);
+                run_line(&mut repl, input, out, line, istty);
             }
         }
     }
diff --git a/src/librustpkg/tests.rs b/src/librustpkg/tests.rs
index 5930d8e9043..c5705f069a2 100644
--- a/src/librustpkg/tests.rs
+++ b/src/librustpkg/tests.rs
@@ -485,11 +485,11 @@ fn test_install_invalid() {
     let mut error1_occurred = false;
     do cond1.trap(|_| {
         error1_occurred = true;
-    }).in {
+    }).inside {
         do cond.trap(|_| {
             error_occurred = true;
             temp_workspace.clone()
-        }).in {
+        }).inside {
             ctxt.install(&temp_workspace, &pkgid);
         }
     }
@@ -573,7 +573,7 @@ fn test_package_ids_must_be_relative_path_like() {
         assert!("" == p.to_str());
         assert!("0-length pkgid" == e);
         whatever.clone()
-    }).in {
+    }).inside {
         let x = PkgId::new("", &os::getcwd());
         assert_eq!(~"foo-0.1", x.to_str());
     }
@@ -582,7 +582,7 @@ fn test_package_ids_must_be_relative_path_like() {
         assert_eq!(p.to_str(), os::make_absolute(&Path("foo/bar/quux")).to_str());
         assert!("absolute pkgid" == e);
         whatever.clone()
-    }).in {
+    }).inside {
         let z = PkgId::new(os::make_absolute(&Path("foo/bar/quux")).to_str(),
                            &os::getcwd());
         assert_eq!(~"foo-0.1", z.to_str());
diff --git a/src/libstd/condition.rs b/src/libstd/condition.rs
index 1f7f96d93c3..4d8857c9d1b 100644
--- a/src/libstd/condition.rs
+++ b/src/libstd/condition.rs
@@ -73,7 +73,7 @@ struct Trap<'self, T, U> {
 }
 
 impl<'self, T, U> Trap<'self, T, U> {
-    pub fn in<V>(&self, inner: &'self fn() -> V) -> V {
+    pub fn inside<V>(&self, inner: &'self fn() -> V) -> V {
         let _g = Guard { cond: self.cond };
         debug!("Trap: pushing handler to TLS");
         local_data::set(self.cond.key, self.handler);
@@ -119,7 +119,7 @@ mod test {
             debug!("nested_trap_test_inner: in handler");
             inner_trapped = true;
             0
-        }).in {
+        }).inside {
             debug!("nested_trap_test_inner: in protected block");
             trouble(1);
         }
@@ -134,7 +134,7 @@ mod test {
         do sadness::cond.trap(|_j| {
             debug!("nested_trap_test_outer: in handler");
             outer_trapped = true; 0
-        }).in {
+        }).inside {
             debug!("nested_guard_test_outer: in protected block");
             nested_trap_test_inner();
             trouble(1);
@@ -152,7 +152,7 @@ mod test {
             let i = 10;
             debug!("nested_reraise_trap_test_inner: handler re-raising");
             sadness::cond.raise(i)
-        }).in {
+        }).inside {
             debug!("nested_reraise_trap_test_inner: in protected block");
             trouble(1);
         }
@@ -167,7 +167,7 @@ mod test {
         do sadness::cond.trap(|_j| {
             debug!("nested_reraise_trap_test_outer: in handler");
             outer_trapped = true; 0
-        }).in {
+        }).inside {
             debug!("nested_reraise_trap_test_outer: in protected block");
             nested_reraise_trap_test_inner();
         }
@@ -182,7 +182,7 @@ mod test {
         do sadness::cond.trap(|j| {
             debug!("test_default: in handler");
             sadness::cond.raise_default(j, || { trapped=true; 5 })
-        }).in {
+        }).inside {
             debug!("test_default: in protected block");
             trouble(1);
         }
@@ -205,7 +205,7 @@ mod test {
                 do sadness::cond.trap(|_| {
                     trapped = true;
                     0
-                }).in {
+                }).inside {
                     sadness::cond.raise(0);
                 }
                 assert!(trapped);
diff --git a/src/libstd/os.rs b/src/libstd/os.rs
index ac03735894a..2802fc30c33 100644
--- a/src/libstd/os.rs
+++ b/src/libstd/os.rs
@@ -389,17 +389,17 @@ pub fn fsync_fd(fd: c_int, _l: io::fsync::Level) -> c_int {
 }
 
 pub struct Pipe {
-    in: c_int,
+    input: c_int,
     out: c_int
 }
 
 #[cfg(unix)]
 pub fn pipe() -> Pipe {
     unsafe {
-        let mut fds = Pipe {in: 0 as c_int,
+        let mut fds = Pipe {input: 0 as c_int,
                             out: 0 as c_int };
-        assert_eq!(libc::pipe(&mut fds.in), (0 as c_int));
-        return Pipe {in: fds.in, out: fds.out};
+        assert_eq!(libc::pipe(&mut fds.input), (0 as c_int));
+        return Pipe {input: fds.input, out: fds.out};
     }
 }
 
@@ -413,14 +413,14 @@ pub fn pipe() -> Pipe {
         // fully understand. Here we explicitly make the pipe non-inheritable,
         // which means to pass it to a subprocess they need to be duplicated
         // first, as in core::run.
-        let mut fds = Pipe {in: 0 as c_int,
+        let mut fds = Pipe {input: 0 as c_int,
                     out: 0 as c_int };
-        let res = libc::pipe(&mut fds.in, 1024 as ::libc::c_uint,
+        let res = libc::pipe(&mut fds.input, 1024 as ::libc::c_uint,
                              (libc::O_BINARY | libc::O_NOINHERIT) as c_int);
         assert_eq!(res, 0 as c_int);
-        assert!((fds.in != -1 as c_int && fds.in != 0 as c_int));
-        assert!((fds.out != -1 as c_int && fds.in != 0 as c_int));
-        return Pipe {in: fds.in, out: fds.out};
+        assert!((fds.input != -1 as c_int && fds.input != 0 as c_int));
+        assert!((fds.out != -1 as c_int && fds.input != 0 as c_int));
+        return Pipe {input: fds.input, out: fds.out};
     }
 }
 
@@ -1931,11 +1931,11 @@ mod tests {
           let tempdir = getcwd(); // would like to use $TMPDIR,
                                   // doesn't seem to work on Linux
           assert!((tempdir.to_str().len() > 0u));
-          let in = tempdir.push("in.txt");
+          let input = tempdir.push("in.txt");
           let out = tempdir.push("out.txt");
 
           /* Write the temp input file */
-            let ostream = do in.to_str().as_c_str |fromp| {
+            let ostream = do input.to_str().as_c_str |fromp| {
                 do "w+b".as_c_str |modebuf| {
                     libc::fopen(fromp, modebuf)
                 }
@@ -1950,16 +1950,16 @@ mod tests {
                          len as size_t)
           }
           assert_eq!(libc::fclose(ostream), (0u as c_int));
-          let in_mode = in.get_mode();
-          let rs = os::copy_file(&in, &out);
-          if (!os::path_exists(&in)) {
-            fail!("%s doesn't exist", in.to_str());
+          let in_mode = input.get_mode();
+          let rs = os::copy_file(&input, &out);
+          if (!os::path_exists(&input)) {
+            fail!("%s doesn't exist", input.to_str());
           }
           assert!((rs));
-          let rslt = run::process_status("diff", [in.to_str(), out.to_str()]);
+          let rslt = run::process_status("diff", [input.to_str(), out.to_str()]);
           assert_eq!(rslt, 0);
           assert_eq!(out.get_mode(), in_mode);
-          assert!((remove_file(&in)));
+          assert!((remove_file(&input)));
           assert!((remove_file(&out)));
         }
     }
diff --git a/src/libstd/rt/io/extensions.rs b/src/libstd/rt/io/extensions.rs
index c6654e9dabe..2d21bf0f9dc 100644
--- a/src/libstd/rt/io/extensions.rs
+++ b/src/libstd/rt/io/extensions.rs
@@ -330,7 +330,7 @@ impl<T: Reader> ReaderUtil for T {
             } else {
                 read_error::cond.raise(e)
             }
-        }).in {
+        }).inside {
             while keep_reading {
                 self.push_bytes(&mut buf, DEFAULT_BUF_SIZE)
             }
@@ -640,7 +640,7 @@ mod test {
             None
         };
         do read_error::cond.trap(|_| {
-        }).in {
+        }).inside {
             let byte = reader.read_byte();
             assert!(byte == None);
         }
@@ -679,7 +679,7 @@ mod test {
     fn read_bytes_eof() {
         let mut reader = MemReader::new(~[10, 11]);
         do read_error::cond.trap(|_| {
-        }).in {
+        }).inside {
             assert!(reader.read_bytes(4) == ~[10, 11]);
         }
     }
@@ -720,7 +720,7 @@ mod test {
         let mut reader = MemReader::new(~[10, 11]);
         let mut buf = ~[8, 9];
         do read_error::cond.trap(|_| {
-        }).in {
+        }).inside {
             reader.push_bytes(&mut buf, 4);
             assert!(buf == ~[8, 9, 10, 11]);
         }
@@ -743,7 +743,7 @@ mod test {
             }
         };
         let mut buf = ~[8, 9];
-        do read_error::cond.trap(|_| { } ).in {
+        do read_error::cond.trap(|_| { } ).inside {
             reader.push_bytes(&mut buf, 4);
         }
         assert!(buf == ~[8, 9, 10]);
diff --git a/src/libstd/rt/io/net/tcp.rs b/src/libstd/rt/io/net/tcp.rs
index c997373bf9d..82278875fa5 100644
--- a/src/libstd/rt/io/net/tcp.rs
+++ b/src/libstd/rt/io/net/tcp.rs
@@ -156,7 +156,7 @@ mod test {
             do io_error::cond.trap(|e| {
                 assert!(e.kind == PermissionDenied);
                 called = true;
-            }).in {
+            }).inside {
                 let addr = Ipv4(0, 0, 0, 0, 1);
                 let listener = TcpListener::bind(addr);
                 assert!(listener.is_none());
@@ -172,7 +172,7 @@ mod test {
             do io_error::cond.trap(|e| {
                 assert!(e.kind == ConnectionRefused);
                 called = true;
-            }).in {
+            }).inside {
                 let addr = Ipv4(0, 0, 0, 0, 1);
                 let stream = TcpStream::connect(addr);
                 assert!(stream.is_none());
@@ -320,7 +320,7 @@ mod test {
                         // NB: ECONNRESET on linux, EPIPE on mac
                         assert!(e.kind == ConnectionReset || e.kind == BrokenPipe);
                         stop = true;
-                    }).in {
+                    }).inside {
                         stream.write(buf);
                     }
                     if stop { break }
@@ -349,7 +349,7 @@ mod test {
                         // NB: ECONNRESET on linux, EPIPE on mac
                         assert!(e.kind == ConnectionReset || e.kind == BrokenPipe);
                         stop = true;
-                    }).in {
+                    }).inside {
                         stream.write(buf);
                     }
                     if stop { break }
diff --git a/src/libstd/rt/io/net/udp.rs b/src/libstd/rt/io/net/udp.rs
index 8e654de47f0..d186ad15f4a 100644
--- a/src/libstd/rt/io/net/udp.rs
+++ b/src/libstd/rt/io/net/udp.rs
@@ -117,7 +117,7 @@ mod test {
             do io_error::cond.trap(|e| {
                 assert!(e.kind == PermissionDenied);
                 called = true;
-            }).in {
+            }).inside {
                 let addr = Ipv4(0, 0, 0, 0, 1);
                 let socket = UdpSocket::bind(addr);
                 assert!(socket.is_none());
diff --git a/src/libstd/rt/io/option.rs b/src/libstd/rt/io/option.rs
index d71ef55d3ad..7dadc653e6c 100644
--- a/src/libstd/rt/io/option.rs
+++ b/src/libstd/rt/io/option.rs
@@ -100,7 +100,7 @@ mod test {
             do io_error::cond.trap(|err| {
                 assert_eq!(err.kind, PreviousIoError);
                 called = true;
-            }).in {
+            }).inside {
                 writer.write([0, 0, 0]);
             }
             assert!(called);
@@ -109,7 +109,7 @@ mod test {
             do io_error::cond.trap(|err| {
                 assert_eq!(err.kind, PreviousIoError);
                 called = true;
-            }).in {
+            }).inside {
                 writer.flush();
             }
             assert!(called);
@@ -136,7 +136,7 @@ mod test {
         do read_error::cond.trap(|err| {
             assert_eq!(err.kind, PreviousIoError);
             called = true;
-        }).in {
+        }).inside {
             reader.read(buf);
         }
         assert!(called);
@@ -145,7 +145,7 @@ mod test {
         do io_error::cond.trap(|err| {
             assert_eq!(err.kind, PreviousIoError);
             called = true;
-        }).in {
+        }).inside {
             assert!(reader.eof());
         }
         assert!(called);
diff --git a/src/libstd/run.rs b/src/libstd/run.rs
index 2a8d29214fa..122bc42c4cc 100644
--- a/src/libstd/run.rs
+++ b/src/libstd/run.rs
@@ -152,7 +152,7 @@ impl Process {
         let (in_pipe, in_fd) = match options.in_fd {
             None => {
                 let pipe = os::pipe();
-                (Some(pipe), pipe.in)
+                (Some(pipe), pipe.input)
             },
             Some(fd) => (None, fd)
         };
@@ -175,7 +175,7 @@ impl Process {
                                    in_fd, out_fd, err_fd);
 
         unsafe {
-            for in_pipe.iter().advance  |pipe| { libc::close(pipe.in); }
+            for in_pipe.iter().advance  |pipe| { libc::close(pipe.input); }
             for out_pipe.iter().advance |pipe| { libc::close(pipe.out); }
             for err_pipe.iter().advance |pipe| { libc::close(pipe.out); }
         }
@@ -184,8 +184,8 @@ impl Process {
             pid: res.pid,
             handle: res.handle,
             input: in_pipe.map(|pipe| pipe.out),
-            output: out_pipe.map(|pipe| os::fdopen(pipe.in)),
-            error: err_pipe.map(|pipe| os::fdopen(pipe.in)),
+            output: out_pipe.map(|pipe| os::fdopen(pipe.input)),
+            error: err_pipe.map(|pipe| os::fdopen(pipe.input)),
             exit_code: None,
         }
     }
@@ -1025,7 +1025,7 @@ mod tests {
         let mut proc = run::Process::new("cat", [], run::ProcessOptions {
             dir: None,
             env: None,
-            in_fd: Some(pipe_in.in),
+            in_fd: Some(pipe_in.input),
             out_fd: Some(pipe_out.out),
             err_fd: Some(pipe_err.out)
         });
@@ -1034,14 +1034,14 @@ mod tests {
         assert!(proc.output_redirected());
         assert!(proc.error_redirected());
 
-        os::close(pipe_in.in);
+        os::close(pipe_in.input);
         os::close(pipe_out.out);
         os::close(pipe_err.out);
 
         let expected = ~"test";
         writeclose(pipe_in.out, expected);
-        let actual = readclose(pipe_out.in);
-        readclose(pipe_err.in);
+        let actual = readclose(pipe_out.input);
+        readclose(pipe_err.input);
         proc.finish();
 
         assert_eq!(expected, actual);
diff --git a/src/libstd/str.rs b/src/libstd/str.rs
index 1026b454c07..b0ae719e00f 100644
--- a/src/libstd/str.rs
+++ b/src/libstd/str.rs
@@ -2863,7 +2863,7 @@ mod tests {
             assert_eq!(err, ~"from_bytes: input is not UTF-8; first bad byte is 255");
             error_happened = true;
             ~""
-        }).in {
+        }).inside {
             from_bytes(bb)
         };
         assert!(error_happened);
diff --git a/src/libsyntax/ext/asm.rs b/src/libsyntax/ext/asm.rs
index bf7cccdc9ef..ee0ec664e1b 100644
--- a/src/libsyntax/ext/asm.rs
+++ b/src/libsyntax/ext/asm.rs
@@ -95,10 +95,10 @@ pub fn expand_asm(cx: @ExtCtxt, sp: span, tts: &[ast::token_tree])
 
                     let constraint = p.parse_str();
                     p.expect(&token::LPAREN);
-                    let in = p.parse_expr();
+                    let input = p.parse_expr();
                     p.expect(&token::RPAREN);
 
-                    inputs.push((constraint, in));
+                    inputs.push((constraint, input));
                 }
             }
             Clobbers => {
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs
index 72bbc4a96c5..adf014b3a29 100644
--- a/src/libsyntax/ext/expand.rs
+++ b/src/libsyntax/ext/expand.rs
@@ -750,16 +750,16 @@ pub fn std_macros() -> @str {
 
     macro_rules! condition (
 
-        { pub $c:ident: $in:ty -> $out:ty; } => {
+        { pub $c:ident: $input:ty -> $out:ty; } => {
 
             pub mod $c {
                 #[allow(non_uppercase_statics)];
                 static key: ::std::local_data::Key<
-                    @::std::condition::Handler<$in, $out>> =
+                    @::std::condition::Handler<$input, $out>> =
                     &::std::local_data::Key;
 
                 pub static cond :
-                    ::std::condition::Condition<$in,$out> =
+                    ::std::condition::Condition<$input,$out> =
                     ::std::condition::Condition {
                         name: stringify!($c),
                         key: key
@@ -767,17 +767,17 @@ pub fn std_macros() -> @str {
             }
         };
 
-        { $c:ident: $in:ty -> $out:ty; } => {
+        { $c:ident: $input:ty -> $out:ty; } => {
 
             // FIXME (#6009): remove mod's `pub` below once variant above lands.
             pub mod $c {
                 #[allow(non_uppercase_statics)];
                 static key: ::std::local_data::Key<
-                    @::std::condition::Handler<$in, $out>> =
+                    @::std::condition::Handler<$input, $out>> =
                     &::std::local_data::Key;
 
                 pub static cond :
-                    ::std::condition::Condition<$in,$out> =
+                    ::std::condition::Condition<$input,$out> =
                     ::std::condition::Condition {
                         name: stringify!($c),
                         key: key
diff --git a/src/libsyntax/fold.rs b/src/libsyntax/fold.rs
index 3016ee660dc..e3ca36ac12d 100644
--- a/src/libsyntax/fold.rs
+++ b/src/libsyntax/fold.rs
@@ -626,7 +626,7 @@ pub fn noop_fold_expr(e: &expr_, fld: @ast_fold) -> expr_ {
         }
         expr_inline_asm(ref a) => {
             expr_inline_asm(inline_asm {
-                inputs: a.inputs.map(|&(c, in)| (c, fld.fold_expr(in))),
+                inputs: a.inputs.map(|&(c, input)| (c, fld.fold_expr(input))),
                 outputs: a.outputs.map(|&(c, out)| (c, fld.fold_expr(out))),
                 .. (*a).clone()
             })
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index 8d979990b31..500d2b1c640 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -125,7 +125,7 @@ pub fn binop_to_str(o: binop) -> ~str {
     }
 }
 
-pub fn to_str(in: @ident_interner, t: &Token) -> ~str {
+pub fn to_str(input: @ident_interner, t: &Token) -> ~str {
     match *t {
       EQ => ~"=",
       LT => ~"<",
@@ -195,8 +195,8 @@ pub fn to_str(in: @ident_interner, t: &Token) -> ~str {
       LIT_STR(ref s) => { fmt!("\"%s\"", ident_to_str(s).escape_default()) }
 
       /* Name components */
-      IDENT(s, _) => in.get(s.name).to_owned(),
-      LIFETIME(s) => fmt!("'%s", in.get(s.name)),
+      IDENT(s, _) => input.get(s.name).to_owned(),
+      LIFETIME(s) => fmt!("'%s", input.get(s.name)),
       UNDERSCORE => ~"_",
 
       /* Other */
@@ -204,7 +204,7 @@ pub fn to_str(in: @ident_interner, t: &Token) -> ~str {
       EOF => ~"<eof>",
       INTERPOLATED(ref nt) => {
         match nt {
-            &nt_expr(e) => ::print::pprust::expr_to_str(e, in),
+            &nt_expr(e) => ::print::pprust::expr_to_str(e, input),
             _ => {
                 ~"an interpolated " +
                     match (*nt) {
@@ -471,10 +471,10 @@ fn mk_fresh_ident_interner() -> @ident_interner {
         "unsafe",             // 61
         "use",                // 62
         "while",              // 63
+        "in",                 // 64
+        "foreach",            // 65
 
-        "be",                 // 64
-        "in",                 // 65
-        "foreach",            // 66
+        "be",                 // 66
     ];
 
     @ident_interner {
@@ -615,10 +615,10 @@ pub mod keywords {
                 False => ident { name: 39, ctxt: 0 },
                 Fn => ident { name: 40, ctxt: 0 },
                 For => ident { name: 41, ctxt: 0 },
-                ForEach => ident { name: 66, ctxt: 0 },
+                ForEach => ident { name: 65, ctxt: 0 },
                 If => ident { name: 42, ctxt: 0 },
                 Impl => ident { name: 43, ctxt: 0 },
-                In => ident { name: 65, ctxt: 0 },
+                In => ident { name: 64, ctxt: 0 },
                 Let => ident { name: 44, ctxt: 0 },
                 __Log => ident { name: 45, ctxt: 0 },
                 Loop => ident { name: 46, ctxt: 0 },
@@ -641,7 +641,7 @@ pub mod keywords {
                 Unsafe => ident { name: 61, ctxt: 0 },
                 Use => ident { name: 62, ctxt: 0 },
                 While => ident { name: 63, ctxt: 0 },
-                Be => ident { name: 64, ctxt: 0 },
+                Be => ident { name: 66, ctxt: 0 },
             }
         }
     }
@@ -657,7 +657,7 @@ pub fn is_keyword(kw: keywords::Keyword, tok: &Token) -> bool {
 pub fn is_any_keyword(tok: &Token) -> bool {
     match *tok {
         token::IDENT(sid, false) => match sid.name {
-            8 | 27 | 32 .. 64 => true,
+            8 | 27 | 32 .. 66 => true,
             _ => false,
         },
         _ => false
@@ -667,7 +667,7 @@ pub fn is_any_keyword(tok: &Token) -> bool {
 pub fn is_strict_keyword(tok: &Token) -> bool {
     match *tok {
         token::IDENT(sid, false) => match sid.name {
-            8 | 27 | 32 .. 63 => true,
+            8 | 27 | 32 .. 65 => true,
             _ => false,
         },
         _ => false,
@@ -677,7 +677,7 @@ pub fn is_strict_keyword(tok: &Token) -> bool {
 pub fn is_reserved_keyword(tok: &Token) -> bool {
     match *tok {
         token::IDENT(sid, false) => match sid.name {
-            64 => true,
+            66 => true,
             _ => false,
         },
         _ => false,
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs
index 4fab3c5779e..7e0e63a29ac 100644
--- a/src/libsyntax/print/pprust.rs
+++ b/src/libsyntax/print/pprust.rs
@@ -108,14 +108,14 @@ pub fn print_crate(cm: @CodeMap,
                    span_diagnostic: @diagnostic::span_handler,
                    crate: &ast::Crate,
                    filename: @str,
-                   in: @io::Reader,
+                   input: @io::Reader,
                    out: @io::Writer,
                    ann: pp_ann,
                    is_expanded: bool) {
     let (cmnts, lits) = comments::gather_comments_and_literals(
         span_diagnostic,
         filename,
-        in
+        input
     );
     let s = @ps {
         s: pp::mk_printer(out, default_columns),
diff --git a/src/libsyntax/visit.rs b/src/libsyntax/visit.rs
index 990aaa99b78..07749c7254b 100644
--- a/src/libsyntax/visit.rs
+++ b/src/libsyntax/visit.rs
@@ -563,8 +563,8 @@ pub fn visit_expr<E:Clone>(ex: @expr, (e, v): (E, vt<E>)) {
         expr_mac(ref mac) => visit_mac(mac, (e.clone(), v)),
         expr_paren(x) => (v.visit_expr)(x, (e.clone(), v)),
         expr_inline_asm(ref a) => {
-            for a.inputs.iter().advance |&(_, in)| {
-                (v.visit_expr)(in, (e.clone(), v));
+            for a.inputs.iter().advance |&(_, input)| {
+                (v.visit_expr)(input, (e.clone(), v));
             }
             for a.outputs.iter().advance |&(_, out)| {
                 (v.visit_expr)(out, (e.clone(), v));
diff --git a/src/test/run-pass/issue-2904.rs b/src/test/run-pass/issue-2904.rs
index bd4e3f84719..48f40e2eda7 100644
--- a/src/test/run-pass/issue-2904.rs
+++ b/src/test/run-pass/issue-2904.rs
@@ -62,10 +62,10 @@ fn square_from_char(c: char) -> square {
     }
 }
 
-fn read_board_grid<rdr:'static + io::Reader>(in: rdr) -> ~[~[square]] {
-    let in = @in as @io::Reader;
+fn read_board_grid<rdr:'static + io::Reader>(input: rdr) -> ~[~[square]] {
+    let input = @input as @io::Reader;
     let mut grid = ~[];
-    for in.each_line |line| {
+    for input.each_line |line| {
         let mut row = ~[];
         for line.iter().advance |c| {
             row.push(square_from_char(c))
diff --git a/src/test/run-pass/option_addition.rs b/src/test/run-pass/option_addition.rs
index 07996cb439d..fe39d1b11d3 100644
--- a/src/test/run-pass/option_addition.rs
+++ b/src/test/run-pass/option_addition.rs
@@ -27,11 +27,11 @@ pub fn main() {
     assert_eq!(foobar, somefoobar.get());
 }
 
-fn optint(in: int) -> Option<int> {
-    if in == 0 {
+fn optint(input: int) -> Option<int> {
+    if input == 0 {
         return None;
     }
     else {
-        return Some(in);
+        return Some(input);
     }
 }
diff --git a/src/test/run-pass/record-pat.rs b/src/test/run-pass/record-pat.rs
index b13a955404c..d1b15b9bb7c 100644
--- a/src/test/run-pass/record-pat.rs
+++ b/src/test/run-pass/record-pat.rs
@@ -12,8 +12,8 @@ enum t1 { a(int), b(uint), }
 struct T2 {x: t1, y: int}
 enum t3 { c(T2, uint), }
 
-fn m(in: t3) -> int {
-    match in {
+fn m(input: t3) -> int {
+    match input {
       c(T2 {x: a(m), _}, _) => { return m; }
       c(T2 {x: b(m), y: y}, z) => { return ((m + z) as int) + y; }
     }