Skip to content

Commit 8324f2b

Browse files
committed
Test renamed crates in rustdoc
1 parent 2bb7f85 commit 8324f2b

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
//@ compile-flags:-Z unstable-options --extern-html-root-url externs_name=https://renamed.example.com --extern-html-root-url empty=https://bad.invalid
2+
//@ aux-crate:externs_name=empty.rs
3+
//@ edition: 2018
4+
5+
extern crate externs_name as renamed;
6+
7+
//@ has extern_html_alias/index.html
8+
//@ has - '//a/@href' 'https://renamed.example.com/empty/index.html'
9+
pub use renamed as yet_different_name;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//@ compile-flags:-Z unstable-options --extern-html-root-url yet_another_name=https://bad.invalid --extern-html-root-url renamed_privately=https://bad.invalid --extern-html-root-url renamed_locally=https://bad.invalid --extern-html-root-url empty=https://localhost
2+
//@ aux-crate:externs_name=empty.rs
3+
//@ edition: 2018
4+
5+
mod m {
6+
pub extern crate externs_name as renamed_privately;
7+
}
8+
9+
// renaming within the crate's source code is not supposed to affect CLI flags
10+
extern crate externs_name as renamed_locally;
11+
12+
//@ has extern_html_fallback/index.html
13+
//@ has - '//a/@href' 'https://localhost/empty/index.html'
14+
pub use crate::renamed_locally as yet_another_name;

0 commit comments

Comments
 (0)