Skip to content

Negative blanket OIBIT impl treated as positive #28475

Closed
@bluss

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

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, 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

    Issue actions