Skip to content

Commit 3b9650a

Browse files
committed
Remove references to chalkify tests
1 parent cf476b2 commit 3b9650a

File tree

1 file changed

+4
-18
lines changed

1 file changed

+4
-18
lines changed

src/traits/lowering-module.md

+4-18
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,16 @@ created in the [`rustc_traits::lowering`][lowering] module.
99
## The `program_clauses_for` query
1010

1111
The main entry point is the `program_clauses_for` [query], which –
12-
given a def-id – produces a set of Chalk program clauses. These
13-
queries are tested using a
14-
[dedicated unit-testing mechanism, described below](#unit-tests). The
12+
given a def-id – produces a set of Chalk program clauses. The
1513
query is invoked on a `DefId` that identifies something like a trait,
1614
an impl, or an associated item definition. It then produces and
1715
returns a vector of program clauses.
1816

1917
[query]: ../query.html
2018

21-
<a name="unit-tests"></a>
22-
2319
## Unit tests
2420

25-
Unit tests are located in [`src/test/ui/chalkify`][chalkify]. A good
26-
example test is [the `lower_impl` test][lower_impl]. At the time of
21+
A good example test is here. At the time of
2722
this writing, it looked like this:
2823

2924
```rust,ignore
@@ -40,14 +35,10 @@ fn main() {
4035
```
4136

4237
The `#[rustc_dump_program_clauses]` annotation can be attached to
43-
anything with a def-id. (It requires the `rustc_attrs` feature.) The
38+
anything with a def-id (It requires the `rustc_attrs` feature). The
4439
compiler will then invoke the `program_clauses_for` query on that
4540
item, and emit compiler errors that dump the clauses produced. These
46-
errors just exist for unit-testing, as we can then leverage the
47-
standard [ui test] mechanisms to check them. In this case, there is a
48-
`//~ ERROR program clause dump` annotation which is always the same for
49-
`#[rustc_dump_program_clauses]`, but [the stderr file] contains
50-
the full details:
41+
errors just exist for unit-testing. The stderr will be:
5142

5243
```text
5344
error: program clause dump
@@ -58,8 +49,3 @@ LL | #[rustc_dump_program_clauses]
5849
|
5950
= 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). }
6051
```
61-
62-
[chalkify]: https://github.com/rust-lang/rust/tree/master/src/test/ui/chalkify
63-
[lower_impl]: https://github.com/rust-lang/rust/tree/master/src/test/ui/chalkify/lower_impl.rs
64-
[the stderr file]: https://github.com/rust-lang/rust/tree/master/src/test/ui/chalkify/lower_impl.stderr
65-
[ui test]: ../tests/adding.html#guide-to-the-ui-tests

0 commit comments

Comments
 (0)