Skip to content

Commit 5ca16c6

Browse files
authored
Rollup merge of rust-lang#59806 - phansch:compiletest_docs2, r=oli-obk
compiletest: Improve no_prefer_dynamic docs This adds some extra docs for the `no-prefer-dynamic` header. And also a `s/must_compile_successfully/compile_pass`. `must_compile_successfully` has been renamed to `compile_pass` at some point in the past and this comment was still referring to the old name.
2 parents 33fc12a + edebed9 commit 5ca16c6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/tools/compiletest/src/header.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,10 @@ pub struct TestProps {
307307
// For UI tests, allows compiler to generate arbitrary output to stderr
308308
pub dont_check_compiler_stderr: bool,
309309
// Don't force a --crate-type=dylib flag on the command line
310+
//
311+
// Set this for example if you have an auxiliary test file that contains
312+
// a proc-macro and needs `#![crate_type = "proc-macro"]`. This ensures
313+
// that the aux file is compiled as a `proc-macro` and not as a `dylib`.
310314
pub no_prefer_dynamic: bool,
311315
// Run --pretty expanded when running pretty printing tests
312316
pub pretty_expanded: bool,
@@ -499,7 +503,7 @@ impl TestProps {
499503
}
500504

501505
if !self.compile_pass {
502-
// run-pass implies must_compile_successfully
506+
// run-pass implies compile_pass
503507
self.compile_pass = config.parse_compile_pass(ln) || self.run_pass;
504508
}
505509

0 commit comments

Comments
 (0)