Change coherence error 'implement a trait instead' -> 'implement a trait or new type instead'

This commit is contained in:
Ben Blum 2012-08-09 18:49:27 -04:00
parent f0775d7bfe
commit d913492855
2 changed files with 8 additions and 1 deletions

View File

@ -279,7 +279,7 @@ class CoherenceChecker {
session.span_err(item.span,
~"no base type found for inherent \
implementation; implement a \
trait instead");
trait or new type instead");
}
some(_) => {
// Nothing to do.
@ -490,6 +490,7 @@ class CoherenceChecker {
was defined in; \
define and \
implement a trait \
or new type \
instead");
}

View File

@ -0,0 +1,6 @@
// error-pattern: implement a trait or new type instead
impl <T> option<T> {
fn foo() { }
}
fn main() { }