diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2024-05-04 23:19:12 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2024-05-05 16:53:57 +0200 |
| commit | a56ba918d226f2e210994f486d7dd3e06328b19f (patch) | |
| tree | e2388611236d6555f93720932d47ca5366327afd | |
| parent | 02f7806ecd641d67c8f046b073323c7e176ee6d2 (diff) | |
| download | rust-a56ba918d226f2e210994f486d7dd3e06328b19f.tar.gz rust-a56ba918d226f2e210994f486d7dd3e06328b19f.zip | |
Implement `edition` method on `Rustdoc` type as well
| -rw-r--r-- | src/tools/run-make-support/src/rustdoc.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tools/run-make-support/src/rustdoc.rs b/src/tools/run-make-support/src/rustdoc.rs index c2c4f2e68e2..6733925b74d 100644 --- a/src/tools/run-make-support/src/rustdoc.rs +++ b/src/tools/run-make-support/src/rustdoc.rs @@ -93,6 +93,13 @@ impl Rustdoc { } } + /// Specify the edition year. + pub fn edition(&mut self, edition: &str) -> &mut Self { + self.cmd.arg("--edition"); + self.cmd.arg(edition); + self + } + #[track_caller] pub fn run_fail_assert_exit_code(&mut self, code: i32) -> Output { let caller_location = std::panic::Location::caller(); |
