From 959dc77e6e3cd8eeba12cee775287477a04baf26 Mon Sep 17 00:00:00 2001 From: Noah Lev Date: Fri, 26 Nov 2021 15:31:38 -0800 Subject: [PATCH] Remove unnecessary use of `include!` in rustdoc test Using `include!` shouldn't affect the test. It was only added because: > I replicated how it was performed in libstd. Since it's the main > target of this fix, I thought it was the best way. But it's unnecessary and adds unnecessary indirection. --- src/test/rustdoc/primitive-generic-impl.rs | 7 ------- src/test/rustdoc/primitive/primitive-generic-impl.rs | 4 +++- 2 files changed, 3 insertions(+), 8 deletions(-) delete mode 100644 src/test/rustdoc/primitive-generic-impl.rs diff --git a/src/test/rustdoc/primitive-generic-impl.rs b/src/test/rustdoc/primitive-generic-impl.rs deleted file mode 100644 index bc689c6ed2f..00000000000 --- a/src/test/rustdoc/primitive-generic-impl.rs +++ /dev/null @@ -1,7 +0,0 @@ -#![feature(rustdoc_internals)] - -#![crate_name = "foo"] - -include!("primitive/primitive-generic-impl.rs"); - -// @has foo/primitive.i32.html '//div[@id="impl-ToString"]//h3[@class="code-header in-band"]' 'impl ToString for T' diff --git a/src/test/rustdoc/primitive/primitive-generic-impl.rs b/src/test/rustdoc/primitive/primitive-generic-impl.rs index 63ea1d8e31c..f9737240c70 100644 --- a/src/test/rustdoc/primitive/primitive-generic-impl.rs +++ b/src/test/rustdoc/primitive/primitive-generic-impl.rs @@ -1,6 +1,8 @@ #![feature(rustdoc_internals)] -// FIXME: this test doesn't test anything +#![crate_name = "foo"] + +// @has foo/primitive.i32.html '//div[@id="impl-ToString"]//h3[@class="code-header in-band"]' 'impl ToString for T' #[doc(primitive = "i32")] /// Some useless docs, wouhou!