Apply suggestions from code review
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
This commit is contained in:
parent
e636805eee
commit
7428e2d134
|
@ -293,7 +293,7 @@ impl Item {
|
||||||
|
|
||||||
/// See the documentation for [`next_def_id()`].
|
/// 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 {
|
crate fn is_fake(&self) -> bool {
|
||||||
MAX_DEF_ID.with(|m| {
|
MAX_DEF_ID.with(|m| {
|
||||||
m.borrow().get(&self.def_id.krate).map(|id| self.def_id >= *id).unwrap_or(false)
|
m.borrow().get(&self.def_id.krate).map(|id| self.def_id >= *id).unwrap_or(false)
|
||||||
|
|
|
@ -123,7 +123,7 @@ impl<'tcx> DocContext<'tcx> {
|
||||||
/// Create a new "fake" [`DefId`].
|
/// Create a new "fake" [`DefId`].
|
||||||
///
|
///
|
||||||
/// This is an ugly hack, but it's the simplest way to handle synthetic impls without greatly
|
/// 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
|
/// 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.
|
/// in a [`RefCell`], decreasing the performance for normal compilation for very little gain.
|
||||||
///
|
///
|
||||||
|
|
Loading…
Reference in New Issue