@@ -31,7 +31,7 @@ this writing, it looked like this:
31
31
32
32
trait Foo { }
33
33
34
- #[rustc_dump_program_clauses] //~ ERROR Implemented(T: Foo) :-
34
+ #[rustc_dump_program_clauses] //~ ERROR program clause dump
35
35
impl<T: 'static> Foo for T where T: Iterator<Item = i32> { }
36
36
37
37
fn main() {
@@ -45,19 +45,18 @@ compiler will then invoke the `program_clauses_for` query on that
45
45
item, and emit compiler errors that dump the clauses produced. These
46
46
errors just exist for unit-testing, as we can then leverage the
47
47
standard [ ui test] mechanisms to check them. In this case, there is a
48
- ` //~ ERROR Implemented ` annotation which is intentionally minimal (it
49
- need only be a prefix of the error) , but [ the stderr file] contains
48
+ ` //~ ERROR program clause dump ` annotation which is always the same for
49
+ ` #[rustc_dump_program_clauses] ` , but [ the stderr file] contains
50
50
the full details:
51
51
52
52
``` text
53
- error: Implemented(T: Foo) :- ProjectionEq(<T as std::iter::Iterator>::Item == i32), TypeOutlives(T \
54
- : 'static), Implemented(T: std::iter::Iterator), Implemented(T: std::marker::Sized).
55
- --> $DIR/lower_impl.rs:15:1
53
+ error: program clause dump
54
+ --> $DIR/lower_impl.rs:5:1
56
55
|
57
- LL | #[rustc_dump_program_clauses] //~ ERROR Implemented(T: Foo) :-
56
+ LL | #[rustc_dump_program_clauses]
58
57
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
59
-
60
- error: aborting due to previous error
58
+ |
59
+ = note: forall<T> { Implemented(T: Foo) :- ProjectionEq(<T as std::iter::Iterator>::Item == i32), TypeOutlives(T: 'static), Implemented(T: std::iter::Iterator), Implemented(T: std::marker::Sized). }
61
60
```
62
61
63
62
[ chalkify ] : https://github.com/rust-lang/rust/tree/master/src/test/ui/chalkify
0 commit comments