mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 11:44:28 +00:00
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()`].
|
||||
///
|
||||
/// [`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)
|
||||
|
@ -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.
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user