Skip to content

Commit 52a9d02

Browse files
committed
---
yaml --- r: 14424 b: refs/heads/try c: 4acfcd8 h: refs/heads/master v: v3
1 parent d0d1032 commit 52a9d02

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
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: cb2f43cbf4332ffe90b8963f1bdbaa85febe1b92
5+
refs/heads/try: 4acfcd8c2f9b35caf966a2d7a8e0a658bfe5d292
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/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
}

branches/try/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)