Commit 7b2f36e
authored
Rollup merge of #149838 - aerooneqq:build-aux-in-pp-tests, r=petrochenkov
Build auxiliary in pretty tests
I've encountered a problem with building auxiliary in pretty tests with the following configuration:
```
//@ edition:2021
//@ aux-crate:to_reuse_functions=to-reuse-functions.rs
//@ pretty-mode:hir
//@ pretty-compare-only
//@ pp-exact:delegation-inherit-attributes.pp
```
In such kind of tests, I want to test the resulting HIR, without final typecheck (`pretty-compare-only`). I plan to use such tests during testing the attribute inheritance in delegation feature. However, related auxiliary is built only in [self.typecheck_source](https://github.com/rust-lang/rust/blob/2e667b0c6491678642a83e3aff86626397360af5/src/tools/compiletest/src/runtest/pretty.rs#L79) method (in `compose_and_run_compiler` routine), so it is impossible to execute test in my scenario. As a solution I've added the auxiliary build in [print_source](https://github.com/rust-lang/rust/blob/2e667b0c6491678642a83e3aff86626397360af5/src/tools/compiletest/src/runtest.rs#L434) method, so it is also built in a compare only scenarios.
I've tried to search other solutions to this problem, but I haven't found a way to force auxiliary build in such a configuration of a pretty test.
r? `@petrochenkov`1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
439 | 439 | | |
440 | 440 | | |
441 | 441 | | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
442 | 445 | | |
443 | 446 | | |
444 | 447 | | |
| |||
0 commit comments