Skip to content

Commit f178b5a

Browse files
committed
---
yaml --- r: 11418 b: refs/heads/master c: 4acfcd8 h: refs/heads/master v: v3
1 parent e617083 commit f178b5a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: cb2f43cbf4332ffe90b8963f1bdbaa85febe1b92
2+
refs/heads/master: 4acfcd8c2f9b35caf966a2d7a8e0a658bfe5d292
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf

trunk/src/comp/middle/resolve.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -681,9 +681,9 @@ fn resolve_constr(e: @env, c: @ast::constr, sc: scopes, _v: vt<scopes>) {
681681
e.def_map.insert(c.node.id, d);
682682
}
683683
_ {
684-
e.sess.span_err(c.span,
685-
"Non-predicate in constraint: " +
686-
path_to_str(c.node.path));
684+
let s = path_to_str(c.node.path);
685+
e.sess.span_err(c.span, #fmt("%s is not declared pure. Try \
686+
`pure fn %s` instead of `fn %s`.", s, s, s));
687687
}
688688
}
689689
}

trunk/src/test/compile-fail/not-a-pred.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// -*- rust -*-
2-
// error-pattern: Non-predicate in constraint: lt
2+
// error-pattern: lt is not declared pure
33

44
fn f(a: int, b: int) : lt(a, b) { }
55

0 commit comments

Comments
 (0)