pub enum CollectionMode {
UsedItems,
MentionedItems,
}
Expand description
See module-level docs of rustc_monomorphize::collector
on some context for “mentioned” items.
Variants§
UsedItems
Collect items that are used, i.e., actually needed for codegen.
Which items are used can depend on optimization levels, as MIR optimizations can remove uses.
MentionedItems
Collect items that are mentioned. The goal of this mode is that it is independent of optimizations: the set of “mentioned” items is computed before optimizations are run.
The exact contents of this set are not a stable guarantee. (For instance, it is currently computed after drop-elaboration. If we ever do some optimizations even in debug builds, we might decide to run them before computing mentioned items.) The key property of this set is that it is optimization-independent.
Auto Trait Implementations§
impl Freeze for CollectionMode
impl RefUnwindSafe for CollectionMode
impl Send for CollectionMode
impl Sync for CollectionMode
impl Unpin for CollectionMode
impl UnwindSafe for CollectionMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more