Change coherence error 'implement a trait instead' -> 'implement a trait or new type instead'
This commit is contained in:
parent
f0775d7bfe
commit
d913492855
@ -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");
|
||||
}
|
||||
|
||||
|
6
src/test/compile-fail/trait-or-new-type-instead.rs
Normal file
6
src/test/compile-fail/trait-or-new-type-instead.rs
Normal file
@ -0,0 +1,6 @@
|
||||
// error-pattern: implement a trait or new type instead
|
||||
impl <T> option<T> {
|
||||
fn foo() { }
|
||||
}
|
||||
|
||||
fn main() { }
|
Loading…
x
Reference in New Issue
Block a user