Skip to content

incorrect FromEnv predicates around supertraits #49953

Closed
@nikomatsakis

Description

@nikomatsakis

The predicates for supertraits look wrong, as you can see from this example:

#![feature(rustc_attrs)]
#![allow(dead_code)]

trait Foo { }

#[rustc_dump_program_clauses] //~ ERROR program clause dump
trait Bar: Foo { }

I see this:

error: program clause dump
  --> lower_env1.rs:16:1
   |
16 | #[rustc_dump_program_clauses] //~ ERROR program clause dump
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: Implemented(Self: Bar) :- FromEnv(Self: Bar).
   = note: FromEnv(Self: Bar) :- FromEnv(Self: Bar).

But I expect FromEnv(Self: Foo) :- FromEnv(Self: Bar).

cc @rust-lang/wg-traits

Metadata

Metadata

Assignees

Labels

A-trait-systemArea: Trait systemC-enhancementCategory: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.WG-traitsWorking group: Traits, https://internals.rust-lang.org/t/announcing-traits-working-group/6804

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions