Skip to content

const_trait_impl: super trait not satisfied for generic impl #92230

Closed

Description

@fee1-dead

I tried this code:

#![feature(const_fn_trait_bound)]
#![feature(const_trait_impl)]

pub trait Super {}
pub trait Sub: Super {}

impl<A> const Super for &A where A: ~const Super {}

impl<A> const Sub for &A where A: ~const Sub {}

I expected to see this happen: the code compiles successfully

Instead, this happened: compiler errors saying that error[E0277]: the trait bound `A: Super` is not satisfied

cc @rust-lang/wg-const-eval

playground

Activity

  1. added
    C-bugCategory: This is a bug.
    requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.
    on Dec 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.F-const_trait_impl`#![feature(const_trait_impl)]`requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions