Skip to content

rustdoc: Remove the intra-doc links side channel #92601

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

Merged
merged 9 commits into from
Jan 11, 2022
3 changes: 1 addition & 2 deletions src/librustdoc/clean/types.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::cell::RefCell;
use std::default::Default;
use std::fmt::Write;
use std::hash::Hash;
use std::lazy::SyncOnceCell as OnceCell;
use std::path::PathBuf;
Expand Down Expand Up @@ -496,7 +495,7 @@ impl Item {
if let Ok((mut href, ..)) = href(*did, cx) {
debug!(?href);
if let Some(ref fragment) = *fragment {
write!(href, "{}", fragment).unwrap()
fragment.render(&mut href, cx.tcx()).unwrap()
}
Some(RenderedLink {
original_text: s.clone(),
Expand Down
Loading