File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,20 @@ their command specifies, or the test will fail without even being run.
58
58
* ` //~ ` comments can be restricted to specific revisions by adding the revision name after the ` ~ ` in square brackets: ` //~[XXX] `
59
59
* ` //@ ` comments can be restricted to specific revisions by adding the revision name after the ` @ ` in square brackets: ` //@[XXX] `
60
60
* Note that you cannot add revisions to the ` revisions ` command.
61
+
62
+ For example:
63
+
64
+ ``` rust
65
+ // @revisions: edition2021 edition2024
66
+ // @[edition2021] edition:2021
67
+ // @[edition2024] edition:2024
68
+ // @[edition2024] check-pass
69
+
70
+ // Then in code:
71
+ let x = 12 ; // ~[edition2021] dead_code
72
+ let x = 12 ;
73
+ // ~[edition2021]^ dead_code
74
+ ```
61
75
* `// @compile-flags: XXX` appends `XXX` to the command line arguments passed to the rustc driver
62
76
* you can specify this multiple times , and all the flags will accumulate
63
77
* `// @rustc-env: XXX=YYY` sets the env var `XXX` to `YYY` for the rustc driver execution.
You can’t perform that action at this time.
0 commit comments