Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

re_rebalance_coherence doesn't properly account for fundamental types #64412

Closed
nikomatsakis opened this issue Sep 12, 2019 · 0 comments · Fixed by #64546
Closed

re_rebalance_coherence doesn't properly account for fundamental types #64412

nikomatsakis opened this issue Sep 12, 2019 · 0 comments · Fixed by #64546
Labels
A-traits Area: Trait system C-bug Category: This is a bug. F-re_rebalance_coherence `#![feature(re_rebalance_coherence)]` I-unsound Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@nikomatsakis
Copy link
Contributor

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.

@nikomatsakis nikomatsakis added A-traits Area: Trait system T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. I-unsound Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness labels Sep 12, 2019
@jonas-schievink jonas-schievink added F-re_rebalance_coherence `#![feature(re_rebalance_coherence)]` C-bug Category: This is a bug. requires-nightly This issue requires a nightly compiler in some way. labels Sep 12, 2019
Centril added a commit to Centril/rust that referenced this issue Sep 20, 2019
…e-tests, r=nikomatsakis

Bugfix/rfc 2451 rerebalance tests

r? @nikomatsakis

Fixes rust-lang#64412
Depends/Contains on rust-lang#64414

cc rust-lang#55437 and rust-lang#63599
tmandry added a commit to tmandry/rust that referenced this issue Sep 20, 2019
…e-tests, r=nikomatsakis

Bugfix/rfc 2451 rerebalance tests

r? @nikomatsakis

Fixes rust-lang#64412
Depends/Contains on rust-lang#64414

cc rust-lang#55437 and rust-lang#63599
tmandry added a commit to tmandry/rust that referenced this issue Sep 20, 2019
…e-tests, r=nikomatsakis

Bugfix/rfc 2451 rerebalance tests

r? @nikomatsakis

Fixes rust-lang#64412
Depends/Contains on rust-lang#64414

cc rust-lang#55437 and rust-lang#63599
tmandry added a commit to tmandry/rust that referenced this issue Sep 20, 2019
…e-tests, r=nikomatsakis

Bugfix/rfc 2451 rerebalance tests

r? @nikomatsakis

Fixes rust-lang#64412
Depends/Contains on rust-lang#64414

cc rust-lang#55437 and rust-lang#63599
tmandry added a commit to tmandry/rust that referenced this issue Sep 20, 2019
…e-tests, r=nikomatsakis

Bugfix/rfc 2451 rerebalance tests

r? @nikomatsakis

Fixes rust-lang#64412
Depends/Contains on rust-lang#64414

cc rust-lang#55437 and rust-lang#63599
tmandry added a commit to tmandry/rust that referenced this issue Sep 21, 2019
…e-tests, r=nikomatsakis

Bugfix/rfc 2451 rerebalance tests

r? @nikomatsakis

Fixes rust-lang#64412
Depends/Contains on rust-lang#64414

cc rust-lang#55437 and rust-lang#63599
Centril added a commit to Centril/rust that referenced this issue Sep 22, 2019
…e-tests, r=nikomatsakis

Bugfix/rfc 2451 rerebalance tests

r? @nikomatsakis

Fixes rust-lang#64412
Depends/Contains on rust-lang#64414

cc rust-lang#55437 and rust-lang#63599
Centril added a commit to Centril/rust that referenced this issue Sep 24, 2019
…e-tests, r=nikomatsakis

Bugfix/rfc 2451 rerebalance tests

r? @nikomatsakis

Fixes rust-lang#64412
Depends/Contains on rust-lang#64414

cc rust-lang#55437 and rust-lang#63599
Centril added a commit to Centril/rust that referenced this issue Sep 27, 2019
…e-tests, r=nikomatsakis

Bugfix/rfc 2451 rerebalance tests

r? @nikomatsakis

Fixes rust-lang#64412
Depends/Contains on rust-lang#64414

cc rust-lang#55437 and rust-lang#63599
Centril added a commit to Centril/rust that referenced this issue Sep 28, 2019
…e-tests, r=nikomatsakis

Bugfix/rfc 2451 rerebalance tests

r? @nikomatsakis

Fixes rust-lang#64412
Depends/Contains on rust-lang#64414

cc rust-lang#55437 and rust-lang#63599
Centril added a commit to Centril/rust that referenced this issue Sep 28, 2019
…e-tests, r=nikomatsakis

Bugfix/rfc 2451 rerebalance tests

r? @nikomatsakis

Fixes rust-lang#64412
Depends/Contains on rust-lang#64414

cc rust-lang#55437 and rust-lang#63599
bors added a commit that referenced this issue Sep 29, 2019
…nikomatsakis

Bugfix/rfc 2451 rerebalance tests

r? @nikomatsakis

Fixes #64412
Depends/Contains on #64414

cc #55437 and #63599
@bors bors closed this as completed in 3f004a1 Sep 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-traits Area: Trait system C-bug Category: This is a bug. F-re_rebalance_coherence `#![feature(re_rebalance_coherence)]` I-unsound Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants