Skip to content

Commit

Permalink
Remove mention of simd_shuffle promotion from comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ecstatic-morse committed Feb 19, 2020
1 parent d194676 commit f581b55
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/librustc_mir/const_eval/eval_queries.rs
Expand Up @@ -72,8 +72,8 @@ fn eval_body_using_ecx<'mir, 'tcx>(
Ok(ret)
}

/// The `InterpCx` is only meant to be used to do field and index projections into constants for
/// `simd_shuffle` and const patterns in match arms.
/// The `InterpCx` is only meant to be used to do field and index projections into promoteds
/// and const patterns in match arms.
///
/// The function containing the `match` that is currently being analyzed may have generic bounds
/// that inform us about the generic bounds of the constant. E.g., using an associated constant
Expand Down
12 changes: 5 additions & 7 deletions src/librustc_mir/transform/promote_consts.rs
Expand Up @@ -105,11 +105,10 @@ pub enum Candidate {
/// Promotion of the `x` in `[x; 32]`.
Repeat(Location),

/// 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.
/// Function calls where the callee has the unstable
/// `#[rustc_args_required_const]` attribute. The attribute requires that
/// the arguments be constant, usually because they are encoded as an
/// immediate operand in a platform intrinsic.
Argument { bb: BasicBlock, index: usize },
}

Expand Down Expand Up @@ -718,8 +717,7 @@ pub fn validate_candidates(
.filter(|&candidate| {
validator.explicit = candidate.forces_explicit_promotion();

// FIXME(eddyb) also emit the errors for shuffle indices
// and `#[rustc_args_required_const]` arguments here.
// FIXME(eddyb) also emit the errors for `#[rustc_args_required_const]` arguments here.

let is_promotable = validator.validate_candidate(candidate).is_ok();
match candidate {
Expand Down

0 comments on commit f581b55

Please sign in to comment.