Skip to content

re_rebalance_coherence doesn't properly account for fundamental types #64412

Closed

Description

As part of an effort to stabilize the re_rebalance_coherence RFC (#63599), I was creating tests trying to get more coverage of all possible scenarios, and I found that we don't seem to be handling fundamental types in the way that the RFC specifies.

In particular this test is presently accepted and yet ought to be rejected:

#![feature(re_rebalance_coherence)]

extern crate coherence_lib as lib;
use lib::*;
use std::rc::Rc;

struct Local;

impl<T> Remote1<Local> for Box<T> { /* should error */ }
impl<T> Remote1<Local> for &T { /* should error */ }

fn main() {}

I'll be adding this test (along with some others) in a PR soon with "FIXME" comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-traitsArea: Trait systemC-bugCategory: This is a bug.F-re_rebalance_coherence`#![feature(re_rebalance_coherence)]`I-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions