diff options
| author | Alexey Shmalko <rasen.dubi@gmail.com> | 2019-04-20 20:08:00 +0300 |
|---|---|---|
| committer | Who? Me?! <mark-i-m@users.noreply.github.com> | 2019-04-23 12:30:52 -0500 |
| commit | b5c8c845d268f95a97735eae7237c94de074d97a (patch) | |
| tree | 5cdaf8005668fddebde52d642bda19f168ba5a7c /src | |
| parent | 2995bd63bbc8e03746ca5f8985b9763e27ea92c1 (diff) | |
| download | rust-b5c8c845d268f95a97735eae7237c94de074d97a.tar.gz rust-b5c8c845d268f95a97735eae7237c94de074d97a.zip | |
Update lowering-module test case
Diffstat (limited to 'src')
| -rw-r--r-- | src/doc/rustc-dev-guide/src/traits/lowering-module.md | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/doc/rustc-dev-guide/src/traits/lowering-module.md b/src/doc/rustc-dev-guide/src/traits/lowering-module.md index 93948405113..3f1515ef8af 100644 --- a/src/doc/rustc-dev-guide/src/traits/lowering-module.md +++ b/src/doc/rustc-dev-guide/src/traits/lowering-module.md @@ -31,7 +31,7 @@ this writing, it looked like this: trait Foo { } -#[rustc_dump_program_clauses] //~ ERROR Implemented(T: Foo) :- +#[rustc_dump_program_clauses] //~ ERROR program clause dump impl<T: 'static> Foo for T where T: Iterator<Item = i32> { } fn main() { @@ -45,19 +45,18 @@ compiler will then invoke the `program_clauses_for` query on that item, and emit compiler errors that dump the clauses produced. These errors just exist for unit-testing, as we can then leverage the standard [ui test] mechanisms to check them. In this case, there is a -`//~ ERROR Implemented` annotation which is intentionally minimal (it -need only be a prefix of the error), but [the stderr file] contains +`//~ ERROR program clause dump` annotation which is always the same for +`#[rustc_dump_program_clauses]`, but [the stderr file] contains the full details: ```text -error: Implemented(T: Foo) :- ProjectionEq(<T as std::iter::Iterator>::Item == i32), TypeOutlives(T \ -: 'static), Implemented(T: std::iter::Iterator), Implemented(T: std::marker::Sized). - --> $DIR/lower_impl.rs:15:1 +error: program clause dump + --> $DIR/lower_impl.rs:5:1 | -LL | #[rustc_dump_program_clauses] //~ ERROR Implemented(T: Foo) :- +LL | #[rustc_dump_program_clauses] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error + | + = 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). } ``` [chalkify]: https://github.com/rust-lang/rust/tree/master/src/test/ui/chalkify |
