diff --git a/tests/rustdoc/issue-29449.rs b/tests/rustdoc/issue-29449.rs index 0d829cf6fcffe..0b9b29a69eefb 100644 --- a/tests/rustdoc/issue-29449.rs +++ b/tests/rustdoc/issue-29449.rs @@ -1,3 +1,5 @@ +#![crate_name="issue_29449"] + // @has issue_29449/struct.Foo.html pub struct Foo; diff --git a/tests/rustdoc/issue-29503.rs b/tests/rustdoc/issue-29503.rs index 01ae4438500da..310acd09a8238 100644 --- a/tests/rustdoc/issue-29503.rs +++ b/tests/rustdoc/issue-29503.rs @@ -1,3 +1,5 @@ +#![crate_name="issue_29503"] + use std::fmt; // @has issue_29503/trait.MyTrait.html diff --git a/tests/rustdoc/issue-29584.rs b/tests/rustdoc/issue-29584.rs index 4364a9649b57b..6e3feafc7ad69 100644 --- a/tests/rustdoc/issue-29584.rs +++ b/tests/rustdoc/issue-29584.rs @@ -1,6 +1,8 @@ // aux-build:issue-29584.rs // ignore-cross-compile +#![crate_name="issue_29584"] + extern crate issue_29584; // @has issue_29584/struct.Foo.html diff --git a/tests/rustdoc/issue-30109.rs b/tests/rustdoc/issue-30109.rs index e9447538ad782..ff9a22b5f7b37 100644 --- a/tests/rustdoc/issue-30109.rs +++ b/tests/rustdoc/issue-30109.rs @@ -2,6 +2,8 @@ // aux-build:issue-30109-1.rs // ignore-cross-compile +#![crate_name="issue_30109"] + pub mod quux { extern crate issue_30109_1 as bar; use self::bar::Bar; diff --git a/tests/rustdoc/issue-30252.rs b/tests/rustdoc/issue-30252.rs index c3777362a66d9..749c63d741c64 100644 --- a/tests/rustdoc/issue-30252.rs +++ b/tests/rustdoc/issue-30252.rs @@ -1,5 +1,7 @@ // compile-flags:--test --cfg feature="bar" +#![crate_name="issue_30252"] + /// ```rust /// assert_eq!(cfg!(feature = "bar"), true); /// ``` diff --git a/tests/rustdoc/issue-30366.rs b/tests/rustdoc/issue-30366.rs index c6274a058b0e5..0fa5dc6fe7f4a 100644 --- a/tests/rustdoc/issue-30366.rs +++ b/tests/rustdoc/issue-30366.rs @@ -1,5 +1,7 @@ // @has issue_30366/index.html '//a/@href' 'http://www.rust-lang.org/' +#![crate_name="issue_30366"] + /// Describe it. [Link somewhere][1]. /// /// [1]: http://www.rust-lang.org/ diff --git a/tests/rustdoc/issue-31808.rs b/tests/rustdoc/issue-31808.rs index e55c5bd4f7cee..58f9daaff591a 100644 --- a/tests/rustdoc/issue-31808.rs +++ b/tests/rustdoc/issue-31808.rs @@ -1,5 +1,7 @@ // Test that associated item impls on primitive types don't crash rustdoc +#![crate_name="issue_31808"] + pub trait Foo { const BAR: usize; type BAZ; diff --git a/tests/rustdoc/issue-31899.rs b/tests/rustdoc/issue-31899.rs index 3eee374465d2b..570ab59bbe981 100644 --- a/tests/rustdoc/issue-31899.rs +++ b/tests/rustdoc/issue-31899.rs @@ -1,3 +1,5 @@ +#![crate_name="issue_31899"] + // @has issue_31899/index.html // @hasraw - 'Make this line a bit longer.' // @!hasraw - 'rust rust-example-rendered' diff --git a/tests/rustdoc/issue-32374.rs b/tests/rustdoc/issue-32374.rs index 985bf03a12159..36070dbb731d8 100644 --- a/tests/rustdoc/issue-32374.rs +++ b/tests/rustdoc/issue-32374.rs @@ -1,6 +1,7 @@ #![feature(staged_api)] #![doc(issue_tracker_base_url = "https://issue_url/")] #![unstable(feature = "test", issue = "32374")] +#![crate_name="issue_32374"] // @matches issue_32374/index.html '//*[@class="item-name"]/span[@class="stab deprecated"]' \ // 'Deprecated' diff --git a/tests/rustdoc/issue-32395.rs b/tests/rustdoc/issue-32395.rs index 5552300f9fe89..d419c75b71c7e 100644 --- a/tests/rustdoc/issue-32395.rs +++ b/tests/rustdoc/issue-32395.rs @@ -2,6 +2,8 @@ // build-aux-docs // ignore-cross-compile +#![crate_name="issue_32395"] + // @has variant_struct/enum.Foo.html // @!hasraw - 'pub qux' // @!hasraw - 'pub(crate) qux' diff --git a/tests/rustdoc/issue-32556.rs b/tests/rustdoc/issue-32556.rs index e1cf115099726..369aef72e1906 100644 --- a/tests/rustdoc/issue-32556.rs +++ b/tests/rustdoc/issue-32556.rs @@ -1,3 +1,5 @@ +#![crate_name="issue_32556"] + /// Blah blah blah /// ```ignore (testing rustdoc's handling of ignore) /// bad_assert!(); diff --git a/tests/rustdoc/issue-32890.rs b/tests/rustdoc/issue-32890.rs index 970954433ec72..dfac0ef22b7f7 100644 --- a/tests/rustdoc/issue-32890.rs +++ b/tests/rustdoc/issue-32890.rs @@ -1,3 +1,5 @@ +#![crate_name="issue_32890"] + // @has issue_32890/struct.Foo.html pub struct Foo(T); diff --git a/tests/rustdoc/issue-33069.rs b/tests/rustdoc/issue-33069.rs index 0213a53cab5d7..9c0e0014bd1a8 100644 --- a/tests/rustdoc/issue-33069.rs +++ b/tests/rustdoc/issue-33069.rs @@ -1,3 +1,5 @@ +#![crate_name="issue_33069"] + pub trait Bar {} #[doc(hidden)] diff --git a/tests/rustdoc/issue-33178-1.rs b/tests/rustdoc/issue-33178-1.rs index 4dc425346abb2..24740c12952c8 100644 --- a/tests/rustdoc/issue-33178-1.rs +++ b/tests/rustdoc/issue-33178-1.rs @@ -2,6 +2,8 @@ // aux-build:variant-struct.rs // ignore-cross-compile +#![crate_name="issue_33178_1"] + // @has issue_33178_1/index.html // @!has - //a/@title empty pub extern crate empty; diff --git a/tests/rustdoc/issue-33178.rs b/tests/rustdoc/issue-33178.rs index ed643f5ae118f..fb44d8efc8c87 100644 --- a/tests/rustdoc/issue-33178.rs +++ b/tests/rustdoc/issue-33178.rs @@ -3,6 +3,8 @@ // build-aux-docs // ignore-cross-compile +#![crate_name="issue_33178"] + // @has issue_33178/index.html // @has - '//a[@title="mod empty"][@href="../empty/index.html"]' empty pub extern crate empty; diff --git a/tests/rustdoc/issue-33302.rs b/tests/rustdoc/issue-33302.rs index a316f3ad99bcf..b4e6cc7aaac2a 100644 --- a/tests/rustdoc/issue-33302.rs +++ b/tests/rustdoc/issue-33302.rs @@ -1,3 +1,5 @@ +#![crate_name="issue_33302"] + // Ensure constant and array length values are not taken from source // code, which wreaks havoc with macros.