Apply suggestions from code review

Co-authored-by: Joshua Nelson <joshua@yottadb.com>
This commit is contained in:
Camelid 2021-01-05 19:46:51 -08:00 committed by GitHub
parent e636805eee
commit 7428e2d134
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -293,7 +293,7 @@ impl Item {
/// See the documentation for [`next_def_id()`].
///
/// [`next_def_id()`]: crate::core::DocContext::next_def_id()
/// [`next_def_id()`]: DocContext::next_def_id()
crate fn is_fake(&self) -> bool {
MAX_DEF_ID.with(|m| {
m.borrow().get(&self.def_id.krate).map(|id| self.def_id >= *id).unwrap_or(false)

View File

@ -123,7 +123,7 @@ impl<'tcx> DocContext<'tcx> {
/// Create a new "fake" [`DefId`].
///
/// This is an ugly hack, but it's the simplest way to handle synthetic impls without greatly
/// refactoring either `librustdoc` or [`rustc_middle`]. In particular, allowing new [`DefId`]s
/// refactoring either rustdoc or [`rustc_middle`]. In particular, allowing new [`DefId`]s
/// to be registered after the AST is constructed would require storing the [`DefId`] mapping
/// in a [`RefCell`], decreasing the performance for normal compilation for very little gain.
///