Skip to content

Regression for well known trait impls for builtin types #590

Closed
@jackh726

Description

@jackh726

So, this regression happened sometime between 0.14 and 0.20.

Basically, if we have a goal like

Canonical {
  value: InEnvironment {
    environment: Env([]),
    goal: Implemented(Ty(^0.0): TraitId(DefId(2:1942 ~ core[d282]::marker[0]::Sized[0]))),
  },
  binders: [U0 with kind integer type],
}

then we don't generate the clause for Sized impl (at least with SLG).

We pass Implemented(Ty(?0i): TraitId(DefId(2:1942 ~ core[d282]::marker[0]::Sized[0]))) to program_clauses_for_goal; the ?0i self type is not covered in add_sized_program_clauses. I haven't tested Copy/Clone, but I'm almost certain the same problem occurs. Edit: forgot that these are in libcore, so aren't builtin for ints/floats.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions