File tree 2 files changed +13
-5
lines changed
2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -23,9 +23,13 @@ fn main() {
23
23
const SEPARATOR : & str = "///////////////////////////////////////////////////////////" ;
24
24
25
25
fn doit ( ) -> Result < ( ) , Box < dyn Error > > {
26
- let filename = std:: env:: args ( )
27
- . nth ( 1 )
28
- . unwrap_or_else ( || "src/doc/src/reference/semver.md" . to_string ( ) ) ;
26
+ let filename = std:: env:: args ( ) . nth ( 1 ) . unwrap_or_else ( || {
27
+ Path :: new ( env ! ( "CARGO_MANIFEST_DIR" ) )
28
+ . join ( "../../src/doc/src/reference/semver.md" )
29
+ . to_str ( )
30
+ . unwrap ( )
31
+ . to_string ( )
32
+ } ) ;
29
33
let contents = fs:: read_to_string ( filename) ?;
30
34
let mut lines = contents. lines ( ) . enumerate ( ) ;
31
35
Original file line number Diff line number Diff line change @@ -55,8 +55,12 @@ To rebuild the man pages, run `cargo build-man` inside the workspace.
55
55
### SemVer chapter tests
56
56
57
57
There is a script to verify that the examples in the SemVer chapter work as
58
- intended. To run the tests, go into the ` semver-check ` directory and run
59
- ` cargo run ` .
58
+ intended. To run the tests, run ` cargo +stable run -p semver-check ` .
59
+
60
+ Note that these tests run on the most recent stable release because they
61
+ validate the output of the compiler diagnostics. The output can change between
62
+ releases, so we pin to a specific release to avoid frequent and unexpected
63
+ breakage.
60
64
61
65
## Contributing
62
66
You can’t perform that action at this time.
0 commit comments