Skip to content

Commit 3514e66

Browse files
hovinenbcopybara-github
authored andcommitted
Replace direct URL links in the documentation with inter-crate references.
This follows https://doc.rust-lang.org/rustdoc/write-documentation/linking-to-items-by-name.html and makes the links simpler and somewhat more robust. PiperOrigin-RevId: 524240447
1 parent 3b22ba8 commit 3514e66

File tree

4 files changed

+22
-31
lines changed

4 files changed

+22
-31
lines changed

googletest/src/lib.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -292,17 +292,8 @@
292292
//! }
293293
//! ```
294294
//!
295-
//! [`and_log_failure()`]: trait.GoogleTestSupport.html#tymethod.and_log_failure
296-
//! [`assert_that!`]: macro.assert_that.html
297-
//! [`expect_pred!`]: macro.expect_pred.html
298-
//! [`expect_that!`]: macro.expect_that.html
299-
//! [`fail!`]: macro.fail.html
300-
//! [`google_test`]: attr.google_test.html
301-
//! [`matches_pattern!`]: macro.matches_pattern.html
302-
//! [`verify_pred!`]: macro.verify_pred.html
303-
//! [`verify_that!`]: macro.verify_that.html
304-
//! [`Matcher`]: matcher/trait.Matcher.html
305-
//! [`Result<()>`]: type.Result.html
295+
//! [`and_log_failure()`]: GoogleTestSupport::and_log_failure
296+
//! [`Matcher`]: matcher::Matcher
306297
307298
extern crate googletest_macro;
308299

googletest/src/matchers/elements_are_matcher.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@
4242
/// tests. Use [`unordered_elements_are!`][crate::unordered_elements_are]
4343
/// instead.
4444
///
45-
/// [`IntoIterator`]: https://doc.rust-lang.org/std/iter/trait.IntoIterator.html
46-
/// [`Iterator`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html
47-
/// [`Iterator::collect`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.collect
48-
/// [`Vec`]: https://doc.rust-lang.org/std/vec/struct.Vec.html
45+
/// [`IntoIterator`]: std::iter::IntoIterator
46+
/// [`Iterator`]: std::iter::Iterator
47+
/// [`Iterator::collect`]: std::iter::Iterator::collect
48+
/// [`Vec`]: std::vec::Vec
4949
#[macro_export]
5050
macro_rules! elements_are {
5151
($($matcher:expr),* $(,)?) => {{

googletest/src/matchers/pointwise_matcher.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@
7777
/// matchers like `eq`, `le`, and so on with `pointwise!` but certain C++ tests
7878
/// using `Pointwise` will require some extra work to port.
7979
///
80-
/// [`IntoIterator`]: https://doc.rust-lang.org/std/iter/trait.IntoIterator.html
81-
/// [`Iterator`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html
82-
/// [`Iterator::collect`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.collect
80+
/// [`IntoIterator`]: std::iter::IntoIterator
81+
/// [`Iterator`]: std::iter::Iterator
82+
/// [`Iterator::collect`]: std::iter::Iterator::collect
8383
/// [`Pointwise`]: https://google.github.io/googletest/reference/matchers.html#container-matchers
84-
/// [`Vec`]: https://doc.rust-lang.org/std/vec/struct.Vec.html
84+
/// [`Vec`]: std::vec::Vec
8585
#[macro_export]
8686
macro_rules! pointwise {
8787
($matcher:expr, $container:expr) => {{

googletest/src/matchers/unordered_elements_are_matcher.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@
6464
/// the container and which container elements had no corresponding
6565
/// matchers.
6666
///
67-
/// [`IntoIterator`]: https://doc.rust-lang.org/std/iter/trait.IntoIterator.html
68-
/// [`Iterator`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html
69-
/// [`Iterator::collect`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.collect
70-
/// [`Vec`]: https://doc.rust-lang.org/std/vec/struct.Vec.html
67+
/// [`IntoIterator`]: std::iter::IntoIterator
68+
/// [`Iterator`]: std::iter::Iterator
69+
/// [`Iterator::collect`]: std::iter::Iterator::collect
70+
/// [`Vec`]: std::vec::Vec
7171
#[macro_export]
7272
macro_rules! unordered_elements_are {
7373
($(,)?) => {{
@@ -155,10 +155,10 @@ macro_rules! unordered_elements_are {
155155
/// message then shows the best matching it could find, including which
156156
/// matchers did not have corresponding unique elements in the container.
157157
///
158-
/// [`IntoIterator`]: https://doc.rust-lang.org/std/iter/trait.IntoIterator.html
159-
/// [`Iterator`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html
160-
/// [`Iterator::collect`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.collect
161-
/// [`Vec`]: https://doc.rust-lang.org/std/vec/struct.Vec.html
158+
/// [`IntoIterator`]: std::iter::IntoIterator
159+
/// [`Iterator`]: std::iter::Iterator
160+
/// [`Iterator::collect`]: std::iter::Iterator::collect
161+
/// [`Vec`]: std::vec::Vec
162162
#[macro_export]
163163
macro_rules! contains_each {
164164
($(,)?) => {{
@@ -250,10 +250,10 @@ macro_rules! contains_each {
250250
/// message then shows the best matching it could find, including which
251251
/// container elements did not have corresponding matchers.
252252
///
253-
/// [`IntoIterator`]: https://doc.rust-lang.org/std/iter/trait.IntoIterator.html
254-
/// [`Iterator`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html
255-
/// [`Iterator::collect`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.collect
256-
/// [`Vec`]: https://doc.rust-lang.org/std/vec/struct.Vec.html
253+
/// [`IntoIterator`]: std::iter::IntoIterator
254+
/// [`Iterator`]: std::iter::Iterator
255+
/// [`Iterator::collect`]: std::iter::Iterator::collect
256+
/// [`Vec`]: std::vec::Vec
257257
#[macro_export]
258258
macro_rules! is_contained_in {
259259
($(,)?) => {{

0 commit comments

Comments
 (0)