Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
f7acd9f
Fix assertion failures in `OwnedHandle` with `windows_subsystem`.
sunfishcode Sep 9, 2021
2df9cc5
Fix Windows compilation errors.
sunfishcode Sep 9, 2021
0693aa1
Document the valid values for `HandleOrNull` and `HandleOrInvalid`.
sunfishcode Oct 5, 2021
9654d52
Ensure that pushing empty path works as before
seanyoung Oct 8, 2021
427b6a7
Feature gate and make must_not_suspend allow-by-default
guswynn Oct 12, 2021
4b4b56d
Only use `clone3` when needed for pidfd
cuviper Oct 15, 2021
aaa8f4e
Update another comment on fork vs. clone3
cuviper Oct 15, 2021
462002b
Also note tool expectations of fork vs clone3
cuviper Oct 15, 2021
d658d6d
Revert "Do not call getpid wrapper after fork in tests"
cuviper Oct 15, 2021
d19aeb2
Fix documentation header sizes
jsha Oct 22, 2021
3374d0d
Fixes incorrect handling of ADT's drop requirements
JakobDegen Oct 23, 2021
4f9474c
Add regresstion test for #90024.
JakobDegen Oct 24, 2021
d092236
Clean up debug statements in needs_drop
JakobDegen Oct 26, 2021
2039a92
Fix ICE when forgetting to `Box` a parameter to a `Self::func` call
JakobDegen Oct 24, 2021
7a83694
expose default substs in param_env
b-naber Oct 25, 2021
96fd370
add tests
b-naber Oct 25, 2021
dc73bdc
Update odht crate to 0.3.1 (big-endian bugfix)
michaelwoerister Oct 29, 2021
640bfaf
Add more missing methods to `IntraLinkCrateLoader`
jyn514 Nov 8, 2021
5fd4bb4
Go back to loading all external crates unconditionally
jyn514 Nov 1, 2021
082accd
Split doc_cfg and doc_auto_cfg features
GuillaumeGomez Nov 2, 2021
fb40f17
Also check for feature gates in "src/test/rustdoc"
GuillaumeGomez Nov 2, 2021
fed62b2
Apply adjustments for field expression even if inaccessible
nbdd0121 Nov 2, 2021
5de0c84
introduce an enum for tracking the 2229 migration causes
nikomatsakis Nov 4, 2021
042c837
rework diagnostic reporting to be more structured
nikomatsakis Nov 4, 2021
34cd4ef
handle case of a variable not captured
nikomatsakis Nov 5, 2021
d9ddee4
apply suggestions from code review
nikomatsakis Nov 5, 2021
e63c3b5
Properly register text_direction_codepoint_in_comment lint.
hkratz Nov 5, 2021
cba2546
Bump stage0 to stable 1.56.1
cuviper Nov 16, 2021
236bc61
Use ubuntu image to download openssl, curl sources, cacert.pem
hkratz Oct 31, 2021
69b4a85
Ignore files copied from previous stage when generating hash.
hkratz Nov 1, 2021
4d156c3
Android is not GNU
cuviper Nov 12, 2021
a4a72e7
Update llvm submodule
Amanieu Nov 16, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add more missing methods to IntraLinkCrateLoader
This helps with (but does not fix)
#84738. I tested on
jyn514/objr@edcee7b
and still hit ICEs.

(cherry picked from commit cdafe99)
  • Loading branch information
jyn514 authored and cuviper committed Nov 16, 2021
commit 640bfaf3c54ba294f3de46788998c05e50b84d72
31 changes: 27 additions & 4 deletions src/librustdoc/passes/collect_intra_doc_links/early.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use ast::visit;
use rustc_ast as ast;
use rustc_hir::def::Namespace::TypeNS;
use rustc_hir::def_id::{LocalDefId, CRATE_DEF_ID};
Expand All @@ -16,7 +17,7 @@ crate fn load_intra_link_crates(resolver: Resolver, krate: &ast::Crate) -> Resol
let mut loader = IntraLinkCrateLoader { current_mod: CRATE_DEF_ID, resolver };
// `walk_crate` doesn't visit the crate itself for some reason.
loader.load_links_in_attrs(&krate.attrs, krate.span);
ast::visit::walk_crate(&mut loader, krate);
visit::walk_crate(&mut loader, krate);
loader.resolver
}

Expand Down Expand Up @@ -54,7 +55,12 @@ impl IntraLinkCrateLoader {
}
}

impl ast::visit::Visitor<'_> for IntraLinkCrateLoader {
impl visit::Visitor<'_> for IntraLinkCrateLoader {
fn visit_foreign_item(&mut self, item: &ast::ForeignItem) {
self.load_links_in_attrs(&item.attrs, item.span);
visit::walk_foreign_item(self, item)
}

fn visit_item(&mut self, item: &ast::Item) {
use rustc_ast_lowering::ResolverAstLowering;

Expand All @@ -64,12 +70,29 @@ impl ast::visit::Visitor<'_> for IntraLinkCrateLoader {
let old_mod = mem::replace(&mut self.current_mod, new_mod);

self.load_links_in_attrs(&item.attrs, item.span);
ast::visit::walk_item(self, item);
visit::walk_item(self, item);

self.current_mod = old_mod;
} else {
self.load_links_in_attrs(&item.attrs, item.span);
ast::visit::walk_item(self, item);
visit::walk_item(self, item);
}
}

// NOTE: if doc-comments are ever allowed on function parameters, this will have to implement `visit_param` too.

fn visit_assoc_item(&mut self, item: &ast::AssocItem, ctxt: visit::AssocCtxt) {
self.load_links_in_attrs(&item.attrs, item.span);
visit::walk_assoc_item(self, item, ctxt)
}

fn visit_field_def(&mut self, field: &ast::FieldDef) {
self.load_links_in_attrs(&field.attrs, field.span);
visit::walk_field_def(self, field)
}

fn visit_variant(&mut self, v: &ast::Variant) {
self.load_links_in_attrs(&v.attrs, v.span);
visit::walk_variant(self, v)
}
}
1 change: 1 addition & 0 deletions src/test/rustdoc-ui/intra-doc/auxiliary/dep1.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// intentionally empty
1 change: 1 addition & 0 deletions src/test/rustdoc-ui/intra-doc/auxiliary/dep2.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// intentionally empty
1 change: 1 addition & 0 deletions src/test/rustdoc-ui/intra-doc/auxiliary/dep3.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// intentionally empty
1 change: 1 addition & 0 deletions src/test/rustdoc-ui/intra-doc/auxiliary/dep4.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// intentionally empty
26 changes: 26 additions & 0 deletions src/test/rustdoc-ui/intra-doc/extern-crate-load.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// check-pass
// aux-crate:dep1=dep1.rs
// aux-crate:dep2=dep2.rs
// aux-crate:dep3=dep3.rs
// aux-crate:dep4=dep4.rs
#![deny(rustdoc::broken_intra_doc_links)]

pub trait Trait {
/// [dep1]
type Item;
}

pub struct S {
/// [dep2]
pub x: usize,
}

extern "C" {
/// [dep3]
pub fn printf();
}

pub enum E {
/// [dep4]
A
}