Skip to content

Commit d913492

Browse files
committed
Change coherence error 'implement a trait instead' -> 'implement a trait or new type instead'
1 parent f0775d7 commit d913492

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/rustc/middle/typeck/coherence.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ class CoherenceChecker {
279279
session.span_err(item.span,
280280
~"no base type found for inherent \
281281
implementation; implement a \
282-
trait instead");
282+
trait or new type instead");
283283
}
284284
some(_) => {
285285
// Nothing to do.
@@ -490,6 +490,7 @@ class CoherenceChecker {
490490
was defined in; \
491491
define and \
492492
implement a trait \
493+
or new type \
493494
instead");
494495
}
495496

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// error-pattern: implement a trait or new type instead
2+
impl <T> option<T> {
3+
fn foo() { }
4+
}
5+
6+
fn main() { }

0 commit comments

Comments
 (0)