We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent adaa838 commit bd57886Copy full SHA for bd57886
tests/ui/compiletest-self-test/aux-has-props.rs
@@ -0,0 +1,14 @@
1
+//@ edition: 2024
2
+//@ aux-build: aux_with_props.rs
3
+//@ compile-flags: --check-cfg=cfg(this_is_aux)
4
+//@ run-pass
5
+
6
+// Test that auxiliaries are built using the directives in the auxiliary file,
7
+// and don't just accidentally use the directives of the main test file.
8
9
+extern crate aux_with_props;
10
11
+fn main() {
12
+ assert!(!cfg!(this_is_aux));
13
+ assert!(aux_with_props::aux_directives_are_respected());
14
+}
tests/ui/compiletest-self-test/auxiliary/aux_with_props.rs
@@ -0,0 +1,6 @@
+//@ compile-flags: --cfg=this_is_aux
+pub fn aux_directives_are_respected() -> bool {
+ cfg!(this_is_aux)
0 commit comments