about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-05-07 10:21:19 +0000
committerbors <bors@rust-lang.org>2015-05-07 10:21:19 +0000
commitacb3aa0949f846ee315568e34d5796fb746c07e8 (patch)
treeb1ac42dd7d982f7a878e1bb0856795f86c3fb92a
parent95607544b6b59f88f838a9050a126149b4570049 (diff)
parent5ac5203e6e136507b63e451c32127bd9f23edd8a (diff)
downloadrust-acb3aa0949f846ee315568e34d5796fb746c07e8.tar.gz
rust-acb3aa0949f846ee315568e34d5796fb746c07e8.zip
Auto merge of #25175 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #24576, #24966, #25052, #25131, #25137, #25138, #25139, #25141, #25142, #25144, #25146, #25148, #25154, #25156, #25160, #25173
- Failed merges: 
-rw-r--r--src/doc/complement-design-faq.md2
-rw-r--r--src/doc/reference.md9
-rw-r--r--src/doc/trpl/guessing-game.md33
-rw-r--r--src/doc/trpl/strings.md4
-rw-r--r--src/grammar/RustLexer.g48
-rw-r--r--src/grammar/verify.rs2
-rw-r--r--src/liballoc/boxed.rs2
-rw-r--r--src/libcore/iter.rs2
-rw-r--r--src/librustc/diagnostics.rs127
-rw-r--r--src/librustc/middle/resolve_lifetime.rs6
-rw-r--r--src/librustc/middle/traits/error_reporting.rs2
-rw-r--r--src/librustc_trans/trans/cleanup.rs60
-rw-r--r--src/librustc_typeck/astconv.rs2
-rw-r--r--src/librustdoc/clean/mod.rs2
-rw-r--r--src/librustdoc/html/layout.rs4
-rw-r--r--src/libstd/sys/unix/process2.rs2
-rw-r--r--src/rt/valgrind/valgrind.h2
-rw-r--r--src/test/compile-fail/issue-12187-1.rs4
-rw-r--r--src/test/compile-fail/issue-12187-2.rs4
-rw-r--r--src/test/compile-fail/issue-5062.rs4
-rw-r--r--src/test/compile-fail/issue-6458-2.rs4
-rw-r--r--src/test/compile-fail/issue-6458-3.rs4
-rw-r--r--src/test/compile-fail/issue-6458-4.rs4
-rw-r--r--src/test/compile-fail/issue-6458.rs5
-rw-r--r--src/test/compile-fail/issue-7813.rs4
-rw-r--r--src/test/compile-fail/method-ambig-one-trait-unknown-int-type.rs5
-rw-r--r--src/test/compile-fail/traits-multidispatch-convert-ambig-dest.rs5
-rw-r--r--src/test/compile-fail/unconstrained-none.rs4
-rw-r--r--src/test/compile-fail/unconstrained-ref.rs4
-rw-r--r--src/test/compile-fail/vector-no-ann.rs5
-rw-r--r--src/test/run-pass/issue-20616.rs2
31 files changed, 199 insertions, 128 deletions
diff --git a/src/doc/complement-design-faq.md b/src/doc/complement-design-faq.md
index 952416ac160..1a0155d4773 100644
--- a/src/doc/complement-design-faq.md
+++ b/src/doc/complement-design-faq.md
@@ -39,7 +39,7 @@ representation as a primitive. This allows using Rust `enum`s in FFI where C
 `enum`s are also used, for most use cases. The attribute can also be applied
 to `struct`s to get the same layout as a C struct would.
 
-[repr]: reference.html#miscellaneous-attributes
+[repr]: reference.html#ffi-attributes
 
 ## There is no GC
 
diff --git a/src/doc/reference.md b/src/doc/reference.md
index 8103ce8f7f6..ac65b934455 100644
--- a/src/doc/reference.md
+++ b/src/doc/reference.md
@@ -1867,13 +1867,12 @@ macro scope.
   lower to the target's SIMD instructions, if any; the `simd` feature gate
   is necessary to use this attribute.
 - `static_assert` - on statics whose type is `bool`, terminates compilation
-  with an error if it is not initialized to `true`.
-- `unsafe_destructor` - allow implementations of the "drop" language item
-  where the type it is implemented for does not implement the "send" language
-  item; the `unsafe_destructor` feature gate is needed to use this attribute
+  with an error if it is not initialized to `true`. To use this, the `static_assert`
+  feature gate must be enabled.
 - `unsafe_no_drop_flag` - on structs, remove the flag that prevents
   destructors from being run twice. Destructors might be run multiple times on
-  the same object with this attribute.
+  the same object with this attribute. To use this, the `unsafe_no_drop_flag` feature
+  gate must be enabled.
 - `doc` - Doc comments such as `/// foo` are equivalent to `#[doc = "foo"]`.
 - `rustc_on_unimplemented` - Write a custom note to be shown along with the error
    when the trait is found to be unimplemented on a type.
diff --git a/src/doc/trpl/guessing-game.md b/src/doc/trpl/guessing-game.md
index 431b7dc50a2..6b58f7dfde8 100644
--- a/src/doc/trpl/guessing-game.md
+++ b/src/doc/trpl/guessing-game.md
@@ -82,11 +82,11 @@ fn main() {
 
     let mut guess = String::new();
 
-    let input = io::stdin().read_line(&mut guess)
+    io::stdin().read_line(&mut guess)
         .ok()
         .expect("Failed to read line");
 
-    println!("You guessed: {}", input);
+    println!("You guessed: {}", guess);
 }
 ```
 
@@ -302,12 +302,12 @@ project.
 There’s just one line of this first example left:
 
 ```rust,ignore
-    println!("You guessed: {}", input);
+    println!("You guessed: {}", guess);
 }
 ```
 
 This prints out the string we saved our input in. The `{}`s are a placeholder,
-and so we pass it `input` as an argument. If we had multiple `{}`s, we would
+and so we pass it `guess` as an argument. If we had multiple `{}`s, we would
 pass multiple arguments:
 
 ```rust
@@ -410,11 +410,11 @@ $ cargo build
    Compiling guessing_game v0.1.0 (file:///home/you/projects/guessing_game)
 ```
 
-So, we told Cargo we wanted any version of `rand`, and so it fetched the
-latest version at the time this was written, `v0.3.8`. But what happens
-when next week, version `v0.4.0` comes out, which changes something with
-`rand`, and it includes a breaking change? After all, a `v0.y.z` version
-in SemVer can change every release.
+So, we told Cargo we wanted any version of `rand`, and so it fetched the latest
+version at the time this was written, `v0.3.8`. But what happens when next
+week, version `v0.3.9` comes out, with an important bugfix? While getting
+bugfixes is important, what if `0.3.9` contains a regression that breaks our
+code?
 
 The answer to this problem is the `Cargo.lock` file you’ll now find in your
 project directory. When you build your project for the first time, Cargo
@@ -422,12 +422,17 @@ figures out all of the versions that fit your criteria, and then writes them
 to the `Cargo.lock` file. When you build your project in the future, Cargo
 will see that the `Cargo.lock` file exists, and then use that specific version
 rather than do all the work of figuring out versions again. This lets you
-have a repeatable build automatically.
+have a repeatable build automatically. In other words, we’ll stay at `0.3.8`
+until we explicitly upgrade, and so will anyone who we share our code with,
+thanks to the lock file.
 
-What about when we _do_ want to use `v0.4.0`? Cargo has another command,
+What about when we _do_ want to use `v0.3.9`? Cargo has another command,
 `update`, which says ‘ignore the lock, figure out all the latest versions that
 fit what we’ve specified. If that works, write those versions out to the lock
-file’.
+file’. But, by default, Cargo will only look for versions larger than `0.3.0`
+and smaller than `0.4.0`. If we want to move to `0.4.x`, we’d have to update
+the `Cargo.toml` directly. When we do, the next time we `cargo build`, Cargo
+will update the index and re-evaluate our `rand` requirements.
 
 There’s a lot more to say about [Cargo][doccargo] and [its
 ecosystem][doccratesio], but for now, that’s all we need to know. Cargo makes
@@ -843,7 +848,7 @@ fn main() {
             Ordering::Less    => println!("Too small!"),
             Ordering::Greater => println!("Too big!"),
             Ordering::Equal   => {
-                println!("You win!"),
+                println!("You win!");
                 break;
             }
         }
@@ -960,8 +965,6 @@ fn main() {
 
     let secret_number = rand::thread_rng().gen_range(1, 101);
 
-    println!("The secret number is: {}", secret_number);
-
     loop {
         println!("Please input your guess.");
 
diff --git a/src/doc/trpl/strings.md b/src/doc/trpl/strings.md
index 6ed4c7cb1b3..61a6ec3eb3f 100644
--- a/src/doc/trpl/strings.md
+++ b/src/doc/trpl/strings.md
@@ -73,13 +73,13 @@ individual bytes, or as codepoints:
 let hachiko = "忠犬ハチ公";
 
 for b in hachiko.as_bytes() {
-print!("{}, ", b);
+    print!("{}, ", b);
 }
 
 println!("");
 
 for c in hachiko.chars() {
-print!("{}, ", c);
+    print!("{}, ", c);
 }
 
 println!("");
diff --git a/src/grammar/RustLexer.g4 b/src/grammar/RustLexer.g4
index 3d8f3aeb28f..f062d33f25e 100644
--- a/src/grammar/RustLexer.g4
+++ b/src/grammar/RustLexer.g4
@@ -8,14 +8,14 @@ lexer grammar RustLexer;
 
 
 tokens {
-    EQ, LT, LE, EQEQ, NE, GE, GT, ANDAND, OROR, NOT, TILDE, PLUT,
+    EQ, LT, LE, EQEQ, NE, GE, GT, ANDAND, OROR, NOT, TILDE, PLUS,
     MINUS, STAR, SLASH, PERCENT, CARET, AND, OR, SHL, SHR, BINOP,
     BINOPEQ, AT, DOT, DOTDOT, DOTDOTDOT, COMMA, SEMI, COLON,
     MOD_SEP, RARROW, FAT_ARROW, LPAREN, RPAREN, LBRACKET, RBRACKET,
-    LBRACE, RBRACE, POUND, DOLLAR, UNDERSCORE, LIT_CHAR,
+    LBRACE, RBRACE, POUND, DOLLAR, UNDERSCORE, LIT_CHAR, LIT_BYTE,
     LIT_INTEGER, LIT_FLOAT, LIT_STR, LIT_STR_RAW, LIT_BINARY,
-    LIT_BINARY_RAW, IDENT, LIFETIME, WHITESPACE, DOC_COMMENT,
-    COMMENT, SHEBANG
+    LIT_BINARY_RAW, QUESTION, IDENT, LIFETIME, WHITESPACE, DOC_COMMENT,
+    COMMENT, SHEBANG, UTF8_BOM
 }
 
 import xidstart , xidcontinue;
diff --git a/src/grammar/verify.rs b/src/grammar/verify.rs
index dec797747c2..10b8abfc786 100644
--- a/src/grammar/verify.rs
+++ b/src/grammar/verify.rs
@@ -111,7 +111,7 @@ fn parse_token_list(file: &str) -> HashMap<String, token::Token> {
             "LIT_BINARY_RAW"    => token::Literal(token::BinaryRaw(Name(0), 0), None),
             "QUESTION"          => token::Question,
             "SHEBANG"           => token::Shebang(Name(0)),
-            _                   => continue,
+            _                   => panic!("Bad token str `{}`", val),
         };
 
         res.insert(num.to_string(), tok);
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs
index 7a089d733cf..a0d60be3000 100644
--- a/src/liballoc/boxed.rs
+++ b/src/liballoc/boxed.rs
@@ -37,7 +37,7 @@
 //! }
 //! ```
 //!
-//! This will print `Cons(1, Box(Cons(2, Box(Nil))))`.
+//! This will print `Cons(1, Cons(2, Nil))`.
 //!
 //! Recursive structures must be boxed, because if the definition of `Cons` looked like this:
 //!
diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs
index 24d9c9a7e7c..a787d34f914 100644
--- a/src/libcore/iter.rs
+++ b/src/libcore/iter.rs
@@ -602,6 +602,8 @@ pub trait Iterator {
     /// Performs a fold operation over the entire iterator, returning the
     /// eventual state at the end of the iteration.
     ///
+    /// This operation is sometimes called 'reduce' or 'inject'.
+    ///
     /// # Examples
     ///
     /// ```
diff --git a/src/librustc/diagnostics.rs b/src/librustc/diagnostics.rs
index 19d2df0b486..88112b4b90c 100644
--- a/src/librustc/diagnostics.rs
+++ b/src/librustc/diagnostics.rs
@@ -419,6 +419,74 @@ of a loop. Without a loop to break out of or continue in, no sensible action can
 be taken.
 "##,
 
+E0282: r##"
+This error indicates that type inference did not result in one unique possible
+type, and extra information is required. In most cases this can be provided
+by adding a type annotation. Sometimes you need to specify a generic type
+parameter manually.
+
+A common example is the `collect` method on `Iterator`. It has a generic type
+parameter with a `FromIterator` bound, which for a `char` iterator is
+implemented by `Vec` and `String` among others. Consider the following snippet
+that reverses the characters of a string:
+
+```
+let x = "hello".chars().rev().collect();
+```
+
+In this case, the compiler cannot infer what the type of `x` should be:
+`Vec<char>` and `String` are both suitable candidates. To specify which type to
+use, you can use a type annotation on `x`:
+
+```
+let x: Vec<char> = "hello".chars().rev().collect();
+```
+
+It is not necessary to annotate the full type. Once the ambiguity is resolved,
+the compiler can infer the rest:
+
+```
+let x: Vec<_> = "hello".chars().rev().collect();
+```
+
+Another way to provide the compiler with enough information, is to specify the
+generic type parameter:
+
+```
+let x = "hello".chars().rev().collect::<Vec<char>>();
+```
+
+Again, you need not specify the full type if the compiler can infer it:
+
+```
+let x = "hello".chars().rev().collect::<Vec<_>>();
+```
+
+Apart from a method or function with a generic type parameter, this error can
+occur when a type parameter of a struct or trait cannot be inferred. In that
+case it is not always possible to use a type annotation, because all candidates
+have the same return type. For instance:
+
+```
+struct Foo<T> {
+    // Some fields omitted.
+}
+
+impl<T> Foo<T> {
+    fn bar() -> i32 {
+        0
+    }
+
+    fn baz() {
+        let number = Foo::bar();
+    }
+}
+```
+
+This will fail because the compiler does not know which instance of `Foo` to
+call `bar` on. Change `Foo::bar()` to `Foo::<T>::bar()` to resolve the error.
+"##,
+
 E0296: r##"
 This error indicates that the given recursion limit could not be parsed. Ensure
 that the value provided is a positive integer between quotes, like so:
@@ -524,10 +592,65 @@ number cannot be negative.
 E0307: r##"
 The length of an array is part of its type. For this reason, this length must be
 a compile-time constant.
+"##,
+
+E0308: r##"
+This error occurs when the compiler was unable to infer the concrete type of a
+variable. This error can occur for several cases, the most common of which is a
+mismatch in the expected type that the compiler inferred for a variable's
+initializing expression, and the actual type explicitly assigned to the
+variable.
+
+For example:
+
+let x: i32 = "I am not a number!";
+//     ~~~   ~~~~~~~~~~~~~~~~~~~~
+//      |             |
+//      |    initializing expression;
+//      |    compiler infers type `&str`
+//      |
+//    type `i32` assigned to variable `x`
+"##,
+
+E0309: r##"
+Types in type definitions have lifetimes associated with them that represent
+how long the data stored within them is guaranteed to be live. This lifetime
+must be as long as the data needs to be alive, and missing the constraint that
+denotes this will cause this error.
+
+// This won't compile because T is not constrained, meaning the data
+// stored in it is not guaranteed to last as long as the reference
+struct Foo<'a, T> {
+    foo: &'a T
+}
+
+// This will compile, because it has the constraint on the type parameter
+struct Foo<'a, T: 'a> {
+    foo: &'a T
+}
+"##,
+
+E0310: r##"
+Types in type definitions have lifetimes associated with them that represent
+how long the data stored within them is guaranteed to be live. This lifetime
+must be as long as the data needs to be alive, and missing the constraint that
+denotes this will cause this error.
+
+// This won't compile because T is not constrained to the static lifetime
+// the reference needs
+struct Foo<T> {
+    foo: &'static T
+}
+
+// This will compile, because it has the constraint on the type parameter
+struct Foo<T: 'static> {
+    foo: &'static T
+}
 "##
 
 }
 
+
 register_diagnostics! {
     E0011,
     E0012,
@@ -562,7 +685,6 @@ register_diagnostics! {
     E0279, // requirement is not satisfied
     E0280, // requirement is not satisfied
     E0281, // type implements trait but other trait is required
-    E0282, // unable to infer enough type information about
     E0283, // cannot resolve type
     E0284, // cannot resolve type
     E0285, // overflow evaluation builtin bounds
@@ -571,9 +693,6 @@ register_diagnostics! {
     E0300, // unexpanded macro
     E0304, // expected signed integer constant
     E0305, // expected constant
-    E0308,
-    E0309, // thing may not live long enough
-    E0310, // thing may not live long enough
     E0311, // thing may not live long enough
     E0312, // lifetime of reference outlives lifetime of borrowed content
     E0313, // lifetime of borrowed pointer outlives lifetime of captured variable
diff --git a/src/librustc/middle/resolve_lifetime.rs b/src/librustc/middle/resolve_lifetime.rs
index 6f40e17855a..e7a03a9b7e1 100644
--- a/src/librustc/middle/resolve_lifetime.rs
+++ b/src/librustc/middle/resolve_lifetime.rs
@@ -374,7 +374,7 @@ fn extract_labels<'v, 'a>(ctxt: &mut LifetimeContext<'a>, b: &'v ast::Block) {
         fn visit_expr(&mut self, ex: &'v ast::Expr) {
             if let Some(label) = expression_label(ex) {
                 for &(prior, prior_span) in &self.labels_in_fn[..] {
-                    // FIXME (#24278): non-hygienic comparision
+                    // FIXME (#24278): non-hygienic comparison
                     if label.name == prior.name {
                         signal_shadowing_problem(self.sess,
                                                  label.name,
@@ -420,7 +420,7 @@ fn extract_labels<'v, 'a>(ctxt: &mut LifetimeContext<'a>, b: &'v ast::Block) {
                 EarlyScope(_, lifetimes, s) |
                 LateScope(lifetimes, s) => {
                     for lifetime_def in lifetimes {
-                        // FIXME (#24278): non-hygienic comparision
+                        // FIXME (#24278): non-hygienic comparison
                         if label.name == lifetime_def.lifetime.name {
                             signal_shadowing_problem(
                                 sess,
@@ -677,7 +677,7 @@ impl<'a> LifetimeContext<'a> {
                                         lifetime: &ast::Lifetime)
     {
         for &(label, label_span) in &self.labels_in_fn {
-            // FIXME (#24278): non-hygienic comparision
+            // FIXME (#24278): non-hygienic comparison
             if lifetime.name == label.name {
                 signal_shadowing_problem(self.sess,
                                          lifetime.name,
diff --git a/src/librustc/middle/traits/error_reporting.rs b/src/librustc/middle/traits/error_reporting.rs
index 1b5719d3d42..c2c4d60a4ff 100644
--- a/src/librustc/middle/traits/error_reporting.rs
+++ b/src/librustc/middle/traits/error_reporting.rs
@@ -290,7 +290,7 @@ pub fn maybe_report_ambiguity<'a, 'tcx>(infcx: &InferCtxt<'a, 'tcx>,
                     {
                         span_err!(infcx.tcx.sess, obligation.cause.span, E0282,
                                 "unable to infer enough type information about `{}`; \
-                                 type annotations required",
+                                 type annotations or generic parameter binding required",
                                 self_ty.user_string(infcx.tcx));
                     } else {
                         span_err!(infcx.tcx.sess, obligation.cause.span, E0283,
diff --git a/src/librustc_trans/trans/cleanup.rs b/src/librustc_trans/trans/cleanup.rs
index 63732588143..d23543924dd 100644
--- a/src/librustc_trans/trans/cleanup.rs
+++ b/src/librustc_trans/trans/cleanup.rs
@@ -507,23 +507,6 @@ impl<'blk, 'tcx> CleanupMethods<'blk, 'tcx> for FunctionContext<'blk, 'tcx> {
         self.schedule_clean(cleanup_scope, drop as CleanupObj);
     }
 
-    /// Schedules a call to `free(val)`. Note that this is a shallow operation.
-    fn schedule_free_slice(&self,
-                           cleanup_scope: ScopeId,
-                           val: ValueRef,
-                           size: ValueRef,
-                           align: ValueRef,
-                           heap: Heap) {
-        let drop = box FreeSlice { ptr: val, size: size, align: align, heap: heap };
-
-        debug!("schedule_free_slice({:?}, val={}, heap={:?})",
-               cleanup_scope,
-               self.ccx.tn().val_to_string(val),
-               heap);
-
-        self.schedule_clean(cleanup_scope, drop as CleanupObj);
-    }
-
     fn schedule_clean(&self,
                       cleanup_scope: ScopeId,
                       cleanup: CleanupObj<'tcx>) {
@@ -1107,43 +1090,6 @@ impl<'tcx> Cleanup<'tcx> for FreeValue<'tcx> {
 }
 
 #[derive(Copy, Clone)]
-pub struct FreeSlice {
-    ptr: ValueRef,
-    size: ValueRef,
-    align: ValueRef,
-    heap: Heap,
-}
-
-impl<'tcx> Cleanup<'tcx> for FreeSlice {
-    fn must_unwind(&self) -> bool {
-        true
-    }
-
-    fn clean_on_unwind(&self) -> bool {
-        true
-    }
-
-    fn is_lifetime_end(&self) -> bool {
-        false
-    }
-
-    fn trans<'blk>(&self,
-                   bcx: Block<'blk, 'tcx>,
-                   debug_loc: DebugLoc)
-                   -> Block<'blk, 'tcx> {
-        match self.heap {
-            HeapExchange => {
-                glue::trans_exchange_free_dyn(bcx,
-                                              self.ptr,
-                                              self.size,
-                                              self.align,
-                                              debug_loc)
-            }
-        }
-    }
-}
-
-#[derive(Copy, Clone)]
 pub struct LifetimeEnd {
     ptr: ValueRef,
 }
@@ -1253,12 +1199,6 @@ pub trait CleanupMethods<'blk, 'tcx> {
                            val: ValueRef,
                            heap: Heap,
                            content_ty: Ty<'tcx>);
-    fn schedule_free_slice(&self,
-                           cleanup_scope: ScopeId,
-                           val: ValueRef,
-                           size: ValueRef,
-                           align: ValueRef,
-                           heap: Heap);
     fn schedule_clean(&self,
                       cleanup_scope: ScopeId,
                       cleanup: CleanupObj<'tcx>);
diff --git a/src/librustc_typeck/astconv.rs b/src/librustc_typeck/astconv.rs
index 694993cdc0a..677254238c0 100644
--- a/src/librustc_typeck/astconv.rs
+++ b/src/librustc_typeck/astconv.rs
@@ -1344,7 +1344,7 @@ pub fn ast_ty_arg_to_ty<'tcx>(this: &AstConv<'tcx>,
 }
 
 // Check the base def in a PathResolution and convert it to a Ty. If there are
-// associated types in the PathResolution, these will need to be seperately
+// associated types in the PathResolution, these will need to be separately
 // resolved.
 fn base_def_to_ty<'tcx>(this: &AstConv<'tcx>,
                         rscope: &RegionScope,
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs
index 1e6e9a7562a..444e5dea89a 100644
--- a/src/librustdoc/clean/mod.rs
+++ b/src/librustdoc/clean/mod.rs
@@ -944,7 +944,7 @@ impl<'a, 'tcx> Clean<Generics> for (&'a ty::Generics<'tcx>,
         // a Sized bound, removing the bounds as we find them.
         //
         // Note that associated types also have a sized bound by default, but we
-        // don't actually konw the set of associated types right here so that's
+        // don't actually know the set of associated types right here so that's
         // handled in cleaning associated types
         let mut sized_params = HashSet::new();
         where_predicates.retain(|pred| {
diff --git a/src/librustdoc/html/layout.rs b/src/librustdoc/html/layout.rs
index a53884ca047..798cc6a612c 100644
--- a/src/librustdoc/html/layout.rs
+++ b/src/librustdoc/html/layout.rs
@@ -111,6 +111,10 @@ r##"<!DOCTYPE html>
                 <code>trait</code>, <code>typedef</code> (or
                 <code>tdef</code>).
             </p>
+            <p>
+                Search functions by type signature (e.g.
+                <code>vec -> usize</code>)
+            </p>
         </div>
     </div>
 
diff --git a/src/libstd/sys/unix/process2.rs b/src/libstd/sys/unix/process2.rs
index 4e7c4d241f5..6f3c0fd63aa 100644
--- a/src/libstd/sys/unix/process2.rs
+++ b/src/libstd/sys/unix/process2.rs
@@ -328,7 +328,7 @@ impl Process {
         }) {
             Ok(0) => None,
             Ok(n) if n == self.pid => Some(translate_status(status)),
-            Ok(n) => panic!("unkown pid: {}", n),
+            Ok(n) => panic!("unknown pid: {}", n),
             Err(e) => panic!("unknown waitpid error: {}", e),
         }
     }
diff --git a/src/rt/valgrind/valgrind.h b/src/rt/valgrind/valgrind.h
index af01dfd71a7..51f9de8edf0 100644
--- a/src/rt/valgrind/valgrind.h
+++ b/src/rt/valgrind/valgrind.h
@@ -5122,7 +5122,7 @@ VALGRIND_PRINTF_BACKTRACE(const char *format, ...)
 
 
 /* These requests allow control to move from the simulated CPU to the
-   real CPU, calling an arbitary function.
+   real CPU, calling an arbitrary function.
 
    Note that the current ThreadId is inserted as the first argument.
    So this call:
diff --git a/src/test/compile-fail/issue-12187-1.rs b/src/test/compile-fail/issue-12187-1.rs
index 74423b041dd..5322966ae2e 100644
--- a/src/test/compile-fail/issue-12187-1.rs
+++ b/src/test/compile-fail/issue-12187-1.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -14,5 +14,5 @@ fn new<T>() -> &'static T {
 
 fn main() {
     let &v = new();
-    //~^ ERROR type annotations required
+    //~^ ERROR type annotations or generic parameter binding required
 }
diff --git a/src/test/compile-fail/issue-12187-2.rs b/src/test/compile-fail/issue-12187-2.rs
index af5c8b45a48..dabc0acba37 100644
--- a/src/test/compile-fail/issue-12187-2.rs
+++ b/src/test/compile-fail/issue-12187-2.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -14,5 +14,5 @@ fn new<'r, T>() -> &'r T {
 
 fn main() {
     let &v = new();
-    //~^ ERROR type annotations required
+    //~^ ERROR type annotations or generic parameter binding required
 }
diff --git a/src/test/compile-fail/issue-5062.rs b/src/test/compile-fail/issue-5062.rs
index 7bf3449a664..392d38a6144 100644
--- a/src/test/compile-fail/issue-5062.rs
+++ b/src/test/compile-fail/issue-5062.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -9,4 +9,4 @@
 // except according to those terms.
 
 fn main() { format!("{:?}", None); }
-    //~^ ERROR type annotations required
+    //~^ ERROR type annotations or generic parameter binding required
diff --git a/src/test/compile-fail/issue-6458-2.rs b/src/test/compile-fail/issue-6458-2.rs
index 0143c75bfc6..acf1d766b6a 100644
--- a/src/test/compile-fail/issue-6458-2.rs
+++ b/src/test/compile-fail/issue-6458-2.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -11,5 +11,5 @@
 fn main() {
     // Unconstrained type:
     format!("{:?}", None);
-    //~^ ERROR type annotations required
+    //~^ ERROR type annotations or generic parameter binding required
 }
diff --git a/src/test/compile-fail/issue-6458-3.rs b/src/test/compile-fail/issue-6458-3.rs
index f96faeeec4b..3f81e51efe2 100644
--- a/src/test/compile-fail/issue-6458-3.rs
+++ b/src/test/compile-fail/issue-6458-3.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -12,5 +12,5 @@ use std::mem;
 
 fn main() {
     mem::transmute(0);
-    //~^ ERROR type annotations required
+    //~^ ERROR type annotations or generic parameter binding required
 }
diff --git a/src/test/compile-fail/issue-6458-4.rs b/src/test/compile-fail/issue-6458-4.rs
index 02274e5441e..7f408be9c02 100644
--- a/src/test/compile-fail/issue-6458-4.rs
+++ b/src/test/compile-fail/issue-6458-4.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,7 +10,7 @@
 
 fn foo(b: bool) -> Result<bool,String> {
     Err("bar".to_string());
-    //~^ ERROR type annotations required
+    //~^ ERROR type annotations or generic parameter binding required
 }
 
 fn main() {
diff --git a/src/test/compile-fail/issue-6458.rs b/src/test/compile-fail/issue-6458.rs
index 0bf9a3c2d48..c1f9dd6a4b8 100644
--- a/src/test/compile-fail/issue-6458.rs
+++ b/src/test/compile-fail/issue-6458.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -16,7 +16,8 @@ pub struct MyState;
 pub fn foo<State>(_: TypeWithState<State>) {}
 
 pub fn bar() {
-   foo(TypeWithState(marker::PhantomData));  //~ ERROR type annotations required
+   foo(TypeWithState(marker::PhantomData));
+   //~^ ERROR type annotations or generic parameter binding required
 }
 
 fn main() {
diff --git a/src/test/compile-fail/issue-7813.rs b/src/test/compile-fail/issue-7813.rs
index 81421af4fa8..327fb6adf1d 100644
--- a/src/test/compile-fail/issue-7813.rs
+++ b/src/test/compile-fail/issue-7813.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,5 +10,5 @@
 
 fn main() {
     let v = &[];
-    let it = v.iter(); //~ ERROR type annotations required
+    let it = v.iter(); //~ ERROR type annotations or generic parameter binding required
 }
diff --git a/src/test/compile-fail/method-ambig-one-trait-unknown-int-type.rs b/src/test/compile-fail/method-ambig-one-trait-unknown-int-type.rs
index c6d45f1c9db..59d75c5a787 100644
--- a/src/test/compile-fail/method-ambig-one-trait-unknown-int-type.rs
+++ b/src/test/compile-fail/method-ambig-one-trait-unknown-int-type.rs
@@ -1,4 +1,4 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -31,7 +31,8 @@ impl foo for Vec<isize> {
 
 fn m1() {
     // we couldn't infer the type of the vector just based on calling foo()...
-    let mut x = Vec::new(); //~ ERROR type annotations required
+    let mut x = Vec::new();
+    //~^ ERROR type annotations or generic parameter binding required
     x.foo();
 }
 
diff --git a/src/test/compile-fail/traits-multidispatch-convert-ambig-dest.rs b/src/test/compile-fail/traits-multidispatch-convert-ambig-dest.rs
index 8fe1f4d2371..c77494912bc 100644
--- a/src/test/compile-fail/traits-multidispatch-convert-ambig-dest.rs
+++ b/src/test/compile-fail/traits-multidispatch-convert-ambig-dest.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -33,7 +33,8 @@ where T : Convert<U>
 }
 
 fn a() {
-    test(22, std::default::Default::default()); //~ ERROR type annotations required
+    test(22, std::default::Default::default());
+    //~^ ERROR type annotations or generic parameter binding required
 }
 
 fn main() {}
diff --git a/src/test/compile-fail/unconstrained-none.rs b/src/test/compile-fail/unconstrained-none.rs
index 9879766a8fa..c14de98e03f 100644
--- a/src/test/compile-fail/unconstrained-none.rs
+++ b/src/test/compile-fail/unconstrained-none.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -11,5 +11,5 @@
 // Issue #5062
 
 fn main() {
-    None; //~ ERROR type annotations required
+    None; //~ ERROR type annotations or generic parameter binding required
 }
diff --git a/src/test/compile-fail/unconstrained-ref.rs b/src/test/compile-fail/unconstrained-ref.rs
index e03f60e758c..02a3f2b9ab8 100644
--- a/src/test/compile-fail/unconstrained-ref.rs
+++ b/src/test/compile-fail/unconstrained-ref.rs
@@ -1,4 +1,4 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -13,5 +13,5 @@ struct S<'a, T:'a> {
 }
 
 fn main() {
-    S { o: &None }; //~ ERROR type annotations required
+    S { o: &None }; //~ ERROR type annotations or generic parameter binding required
 }
diff --git a/src/test/compile-fail/vector-no-ann.rs b/src/test/compile-fail/vector-no-ann.rs
index d48f5715ec1..419b8c4e1b0 100644
--- a/src/test/compile-fail/vector-no-ann.rs
+++ b/src/test/compile-fail/vector-no-ann.rs
@@ -1,4 +1,4 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,5 +10,6 @@
 
 
 fn main() {
-    let _foo = Vec::new(); //~ ERROR type annotations required
+    let _foo = Vec::new();
+    //~^ ERROR type annotations or generic parameter binding required
 }
diff --git a/src/test/run-pass/issue-20616.rs b/src/test/run-pass/issue-20616.rs
index e6b256f7e84..d5b79971094 100644
--- a/src/test/run-pass/issue-20616.rs
+++ b/src/test/run-pass/issue-20616.rs
@@ -32,7 +32,7 @@ type TypeF<T> = Box<T>;
 // type argument with trailing comma
 type TypeG<T> = Box<T,>;
 
-// trailing comma on liftime defs
+// trailing comma on lifetime defs
 type TypeH<'a,> = &'a ();
 
 // trailing comma on type argument