Skip to content

Negative blanket OIBIT impl treated as positive #28475

Description

@bluss

impl !Pod for .. {} looks like it produces a positive impl.

(playpen)

#![feature(optin_builtin_traits)]

unsafe trait Pod {}

unsafe impl !Pod for .. {}

struct Foo<X, Y>(X, Y);

fn is_pod<T: Pod>(_: &T) { }

fn main() {
    is_pod(&Foo(0, 0));
}

cc @nikomatsakis

OIBIT tracker issue: #13231

Activity

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

    A-type-systemArea: Type systemC-bugCategory: This is a bug.P-mediumMedium priorityT-langRelevant to the language team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions