-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove --cfg dox from rustdoc.rs #77347
Conversation
This was added in rust-lang#53076 because several dependencies were using `cfg(dox)` instead of `cfg(rustdoc)`. I ran `rg 'cfg\(dox\)'` on the source tree with no matches, so I think this is now safe to remove.
src/bootstrap/bin/rustdoc.rs
Outdated
@@ -24,14 +24,10 @@ fn main() { | |||
let mut dylib_path = bootstrap::util::dylib_path(); | |||
dylib_path.insert(0, PathBuf::from(libdir.clone())); | |||
|
|||
//FIXME(misdreavus): once stdsimd uses cfg(doc) instead of cfg(dox), remove the `--cfg dox` | |||
//arguments here | |||
let mut cmd = Command::new(rustdoc); | |||
cmd.args(&args) | |||
.arg("--cfg") | |||
.arg(format!("stage{}", stage)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, this also looks stale, we should really be passing --cfg bootstrap in stage 0 these days, cfg(stage0) shouldn't be used by anything.
Want to update that in this PR as well? (We should match rustc.rs).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like rustc.rs
doesn't set it either, I did find it set in compile.rs
though:
compile.rs
422- .arg("--cfg")
423: .arg("bootstrap")
Maybe nothing actually needs --cfg bootstrap
for rustdoc? I'll try removing --cfg stage0
and see.
Actually it looks like I was a little overoptimistic,
I'll make a PR upstream first. |
I guess this is blocked on a stdarch update? |
Yes, that's right. What's the process for that, do I just open a PR updating the submodule? |
I included the stdarch update in this PR. |
I also needed this diff to get the doc-tests to pass: diff --git a/crates/core_arch/src/core_arch_docs.md b/crates/core_arch/src/core_arch_docs.md
index 64860050..3d363ea7 100644
--- a/crates/core_arch/src/core_arch_docs.md
+++ b/crates/core_arch/src/core_arch_docs.md
@@ -210,12 +210,6 @@ using LLVM's auto-vectorization to produce optimized vectorized code for
AVX2 and also for the default platform.
```rust
-# #![cfg_attr(not(doc),feature(stdsimd))]
-# #[allow(unused_imports)]
-# #[cfg(not(doc))]
-# #[macro_use(is_x86_feature_detected)]
-# extern crate std_detect;
-
fn main() {
let mut dst = [0];
add_quickly(&[1], &[2], &mut dst); @Amanieu does that look like a reasonable change, should I make a PR with it? |
@jyn514 Sounds good. |
The primary purpose is to get the fixes from rust-lang/stdarch#920 and rust-lang/stdarch#922. The other changes included are rust-lang/stdarch#917 and rust-lang/stdarch#919.
This is ready for review. |
@bors r+ |
📌 Commit ca98778 has been approved by |
@bors rollup=iffy Updates submodules and I'm still not sure if removing |
Remove --cfg dox from rustdoc.rs This was added in rust-lang#53076 because several dependencies were using `cfg(dox)` instead of `cfg(rustdoc)` (now `cfg(doc)`). I ran `rg 'cfg\(dox\)'` on the source tree with no matches, so I think this is now safe to remove. r? @Mark-Simulacrum cc @QuietMisdreavus :)
⌛ Testing commit ca98778 with merge 564586eb2abb8f9e5cd07f82266a87457f4ea1fe... |
💔 Test failed - checks-actions |
Looks spurious? cc @rust-lang/cargo
@bors retry |
I ran the test in a loop for a few hours locally, and didn't run into any problems. 0xc0000374 is |
☀️ Test successful - checks-actions, checks-azure |
This was added in #53076 because
several dependencies were using
cfg(dox)
instead ofcfg(rustdoc)
(nowcfg(doc)
).I ran
rg 'cfg\(dox\)'
on the source tree with no matches, so I thinkthis is now safe to remove.
r? @Mark-Simulacrum
cc @QuietMisdreavus :)