Skip to content

Commit 92219f2

Browse files
rasendubimark-i-m
authored andcommitted
Update lowering-module test case
1 parent 99e1b1d commit 92219f2

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/traits/lowering-module.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ this writing, it looked like this:
3131
3232
trait Foo { }
3333
34-
#[rustc_dump_program_clauses] //~ ERROR Implemented(T: Foo) :-
34+
#[rustc_dump_program_clauses] //~ ERROR program clause dump
3535
impl<T: 'static> Foo for T where T: Iterator<Item = i32> { }
3636
3737
fn main() {
@@ -45,19 +45,18 @@ compiler will then invoke the `program_clauses_for` query on that
4545
item, and emit compiler errors that dump the clauses produced. These
4646
errors just exist for unit-testing, as we can then leverage the
4747
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
5050
the full details:
5151

5252
```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
5655
|
57-
LL | #[rustc_dump_program_clauses] //~ ERROR Implemented(T: Foo) :-
56+
LL | #[rustc_dump_program_clauses]
5857
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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). }
6160
```
6261

6362
[chalkify]: https://github.com/rust-lang/rust/tree/master/src/test/ui/chalkify

0 commit comments

Comments
 (0)