Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix minor typo in docs. #64116

Merged
merged 3 commits into from Sep 14, 2019
Merged
Changes from 2 commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -17,8 +17,8 @@ pub struct RawConst<'tcx> {
pub ty: Ty<'tcx>,
}

/// Represents a constant value in Rust. `Scalar` and `ScalarPair` are optimizations that
/// match the `LocalState` optimizations for easy conversions between `Value` and `ConstValue`.
/// Represents a constant value in Rust. `Scalar` and `Slice` are optimizations that
/// match the `LocalState` optimizations for easy conversions between `Operand` and `ConstValue`.
This conversation was marked as resolved by goddessfreya

This comment has been minimized.

Copy link
@oli-obk

oli-obk Sep 5, 2019

Contributor

Oh this comment is entirely outdated. The conversion is actually not what we're optimizing for anymore. These two variants are optimizations for array length computations, enum discriminants and the pattern matching logic

#[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord,
RustcEncodable, RustcDecodable, Hash, HashStable)]
pub enum ConstValue<'tcx> {
@@ -589,7 +589,7 @@ pub fn const_eval_provider<'tcx>(
tcx: TyCtxt<'tcx>,
key: ty::ParamEnvAnd<'tcx, GlobalId<'tcx>>,
) -> ::rustc::mir::interpret::ConstEvalResult<'tcx> {
// see comment in const_eval_provider for what we're doing here
// see comment in const_eval_raw_provider for what we're doing here
if key.param_env.reveal == Reveal::All {
let mut key = key.clone();
key.param_env.reveal = Reveal::UserFacing;
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.