about summary refs log tree commit diff
path: root/src/tools/compiletest
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-04-12 12:17:51 +0200
committerGitHub <noreply@github.com>2019-04-12 12:17:51 +0200
commit2f71ecbb5e15a7ef4d57066f46a5c2273510469f (patch)
tree540d71e3c7f4ee38cb565de2396640bf74403d3a /src/tools/compiletest
parentd77b7d9dc36db4e42a632e8d267746e709e84953 (diff)
parentedebed9fc93d433578aef6b0e2b6a47b580a2f95 (diff)
downloadrust-2f71ecbb5e15a7ef4d57066f46a5c2273510469f.tar.gz
rust-2f71ecbb5e15a7ef4d57066f46a5c2273510469f.zip
Rollup merge of #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.
Diffstat (limited to 'src/tools/compiletest')
-rw-r--r--src/tools/compiletest/src/header.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs
index d735d3351e6..2fe837e99d3 100644
--- a/src/tools/compiletest/src/header.rs
+++ b/src/tools/compiletest/src/header.rs
@@ -303,6 +303,10 @@ pub struct TestProps {
     // For UI tests, allows compiler to generate arbitrary output to stderr
     pub dont_check_compiler_stderr: bool,
     // Don't force a --crate-type=dylib flag on the command line
+    //
+    // Set this for example if you have an auxiliary test file that contains
+    // a proc-macro and needs `#![crate_type = "proc-macro"]`. This ensures
+    // that the aux file is compiled as a `proc-macro` and not as a `dylib`.
     pub no_prefer_dynamic: bool,
     // Run --pretty expanded when running pretty printing tests
     pub pretty_expanded: bool,
@@ -490,7 +494,7 @@ impl TestProps {
             }
 
             if !self.compile_pass {
-                // run-pass implies must_compile_successfully
+                // run-pass implies compile_pass
                 self.compile_pass = config.parse_compile_pass(ln) || self.run_pass;
             }