Enum rustc_mir::transform::promote_consts::Candidate [−][src]
pub enum Candidate {
Ref(Location),
Argument {
bb: BasicBlock,
index: usize,
},
}Expand description
A “root candidate” for promotion, which will become the returned value in a promoted MIR, unless it’s a subset of a larger candidate.
Variants
Ref(Location)Expand description
Borrow of a constant temporary, candidate for lifetime extension.
Expand description
Currently applied to function calls where the callee has the unstable
#[rustc_args_required_const] attribute as well as the SIMD shuffle
intrinsic. The intrinsic requires the arguments are indeed constant and
the attribute currently provides the semantic requirement that arguments
must be constant.
Show fields
Fields of Argument
bb: BasicBlockindex: usizeImplementations
impl Candidate[src]
impl Candidate[src]fn forces_explicit_promotion(&self) -> bool[src]
fn forces_explicit_promotion(&self) -> bool[src]Returns true if we should use the “explicit” rules for promotability for this Candidate.
fn source_info(&self, body: &Body<'_>) -> SourceInfo[src]
Trait Implementations
impl Copy for Candidate[src]
impl Eq for Candidate[src]
impl StructuralEq for Candidate[src]
impl StructuralPartialEq for Candidate[src]
Auto Trait Implementations
impl RefUnwindSafe for Candidate
impl Send for Candidate
impl Sync for Candidate
impl Unpin for Candidate
impl UnwindSafe for Candidate
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> WithConstness for T[src]
impl<T> WithConstness for T[src]