File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -23,9 +23,13 @@ fn main() {
2323const SEPARATOR : & str = "///////////////////////////////////////////////////////////" ;
2424
2525fn 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+ } ) ;
2933 let contents = fs:: read_to_string ( filename) ?;
3034 let mut lines = contents. lines ( ) . enumerate ( ) ;
3135
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.
5555### SemVer chapter tests
5656
5757There 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.
6064
6165## Contributing
6266
You can’t perform that action at this time.
0 commit comments