about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2024-05-04 23:19:12 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2024-05-05 16:53:57 +0200
commita56ba918d226f2e210994f486d7dd3e06328b19f (patch)
treee2388611236d6555f93720932d47ca5366327afd
parent02f7806ecd641d67c8f046b073323c7e176ee6d2 (diff)
downloadrust-a56ba918d226f2e210994f486d7dd3e06328b19f.tar.gz
rust-a56ba918d226f2e210994f486d7dd3e06328b19f.zip
Implement `edition` method on `Rustdoc` type as well
-rw-r--r--src/tools/run-make-support/src/rustdoc.rs7
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();