Skip to content

Commit

Permalink
Assert current behavior for links
Browse files Browse the repository at this point in the history
For the two of these tests that have a local `char` to link to, this behavior isn't what's expected, but is what's happening presently.
  • Loading branch information
sethp committed Jul 7, 2020
1 parent 165aecb commit 865b930
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/test/rustdoc/intra-link-prim-methods-external-core.rs
Expand Up @@ -6,6 +6,10 @@
#![feature(no_core, lang_items)]
#![no_core]

// @has intra_link_prim_methods_external_core/index.html
// @has - '//*[@id="main"]//a[@href="https://doc.rust-lang.org/nightly/std/primitive.char.html"]' 'char'
// @has - '//*[@id="main"]//a[@href="https://doc.rust-lang.org/nightly/std/primitive.char.html#method.len_utf8"]' 'char::len_utf8'

//! A [`char`] and its [`char::len_utf8`].

extern crate my_core;
4 changes: 4 additions & 0 deletions src/test/rustdoc/intra-link-prim-methods-local.rs
Expand Up @@ -2,6 +2,10 @@
#![feature(no_core, lang_items)]
#![no_core]

// @has intra_link_prim_methods_local/index.html
// @has - '//*[@id="main"]//a[@href="https://doc.rust-lang.org/nightly/std/primitive.char.html"]' 'char'
// @has - '//*[@id="main"]//a[@href="https://doc.rust-lang.org/nightly/std/primitive.char.html#method.len_utf8"]' 'char::len_utf8'

//! A [`char`] and its [`char::len_utf8`].

#[lang = "char"]
Expand Down
4 changes: 4 additions & 0 deletions src/test/rustdoc/intra-link-prim-methods.rs
@@ -1,3 +1,7 @@
#![deny(intra_doc_link_resolution_failure)]

// @has intra_link_prim_methods/index.html
// @has - '//*[@id="main"]//a[@href="https://doc.rust-lang.org/nightly/std/primitive.char.html"]' 'char'
// @has - '//*[@id="main"]//a[@href="https://doc.rust-lang.org/nightly/std/primitive.char.html#method.len_utf8"]' 'char::len_utf8'

//! A [`char`] and its [`char::len_utf8`].

0 comments on commit 865b930

Please sign in to comment.