Skip to content

figure out how to integrate constants and the MIR type checker #46702

Closed
@nikomatsakis

Description

@nikomatsakis
Contributor

Currently the MIR type checker has some kind of hacky code to figure out what sorts of well-formedness constraints are present on a constant. The values of constants now are "post normalization" and don't give us ready access to what we need. As the comment from the code says:

                // FIXME(#46702) -- We need some way to get the predicates
                // associated with the "pre-evaluated" form of the
                // constant. For example, consider that the constant
                // may have associated constant projections (`<Foo as
                // Trait<'a, 'b>>::SOME_CONST`) that impose
                // constraints on `'a` and `'b`. These constraints
                // would be lost if we just look at the normalized
                // value.

Activity

added
A-NLLArea: Non-lexical lifetimes (NLL)
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
on Dec 13, 2017
added
C-enhancementCategory: An issue proposing an enhancement or a PR with one.
on Mar 26, 2018
nikomatsakis

nikomatsakis commented on Jul 3, 2018

@nikomatsakis
ContributorAuthor

I'm not really aware of any actual problems linked to this code, but I'll push it to the release milestone.

added this to the Rust 2018 Release milestone on Jul 3, 2018
pnkfelix

pnkfelix commented on Jul 24, 2018

@pnkfelix
Member

visited for triage. @nikomatsakis believes this continues to be a potential issue of (potentially bad) interaction between miri integration and MIR/NLL. tagging as NLL-deferred

pnkfelix

pnkfelix commented on Nov 8, 2018

@pnkfelix
Member

Visited for T-compiler triage. I cannot imagine us blocking the release on this, given that there are not known bugs linked directly to this code...

I-nominating for discussion at next WG-compiler-nll meeting. Removing from Release milestone.

removed this from the Rust 2018 Release milestone on Nov 8, 2018
pnkfelix

pnkfelix commented on Nov 29, 2018

@pnkfelix
Member

unnominating. We'll get to this when we get to all the NLL-deferred issues, and right now its just clogging up T-compiler process.

18 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

A-NLLArea: Non-lexical lifetimes (NLL)C-enhancementCategory: An issue proposing an enhancement or a PR with one.NLL-soundWorking towards the "invalid code does not compile" goalP-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @nikomatsakis@pnkfelix@oli-obk@XAMPPRocky@matthewjasper

      Issue actions

        figure out how to integrate constants and the MIR type checker · Issue #46702 · rust-lang/rust