diff options
| author | bors <bors@rust-lang.org> | 2020-09-29 12:11:17 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-09-29 12:11:17 +0000 |
| commit | 9e34b729647f44bfbbc361949b14b5bea65e4996 (patch) | |
| tree | 5a96bb441ab40aaa69818812e418898c805456bf /src/test | |
| parent | 26373fb4baa9c5b8a7a1e2821fcfa930a85d327d (diff) | |
| parent | 406584621a4e2d3752b2444c5bed2218447f0bfe (diff) | |
| download | rust-9e34b729647f44bfbbc361949b14b5bea65e4996.tar.gz rust-9e34b729647f44bfbbc361949b14b5bea65e4996.zip | |
Auto merge of #77253 - jyn514:crate-link, r=Manishearth
Resolve `crate` in intra-doc links properly across crates Closes https://github.com/rust-lang/rust/issues/77193; see https://github.com/rust-lang/rust/issues/77193#issuecomment-699065946 for an explanation of what's going on here. ~~This also fixes the BTreeMap docs that have been broken for a while; see the description on the second commit for why and how.~~ Nope, see the second commit for why the link had to be changed. r? `@Manishearth` cc `@dylni` `@dylni` note that this doesn't solve your original problem - now _both_ `with_code` and `crate::with_code` will be broken links. However this will fix a lot of other broken links (in particular I think https://docs.rs/sqlx/0.4.0-beta.1/sqlx/query/struct.Query.html is because of this bug). I'll open another issue for resolving additional docs in the new scope.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/rustdoc/auxiliary/intra-link-cross-crate-crate.rs | 5 | ||||
| -rw-r--r-- | src/test/rustdoc/intra-link-cross-crate-crate.rs | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/test/rustdoc/auxiliary/intra-link-cross-crate-crate.rs b/src/test/rustdoc/auxiliary/intra-link-cross-crate-crate.rs new file mode 100644 index 00000000000..a37848e23d9 --- /dev/null +++ b/src/test/rustdoc/auxiliary/intra-link-cross-crate-crate.rs @@ -0,0 +1,5 @@ +#![crate_name = "inner"] + +/// Links to [crate::g] +pub fn f() {} +pub fn g() {} diff --git a/src/test/rustdoc/intra-link-cross-crate-crate.rs b/src/test/rustdoc/intra-link-cross-crate-crate.rs new file mode 100644 index 00000000000..edf544708b6 --- /dev/null +++ b/src/test/rustdoc/intra-link-cross-crate-crate.rs @@ -0,0 +1,6 @@ +// aux-build:intra-link-cross-crate-crate.rs +// build-aux-docs +#![crate_name = "outer"] +extern crate inner; +// @has outer/fn.f.html '//a[@href="../inner/fn.g.html"]' "crate::g" +pub use inner::f; |
