Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upBounds seem to be ignored in negative impls #23072
Comments
This comment has been minimized.
This comment has been minimized.
|
Yeah, hmm, this is caused by the way that trait dispatch picks a concrete impl if its the only thing available without recursively evaluating the bounds. Hmm. It makes sense for positive impls but for negative impls doesn't seem quite right. Niko -------- Original message -------- #![feature(optin_builtin_traits)] use std::marker::MarkerTrait; unsafe trait Pod: MarkerTrait {} trait Bound: MarkerTrait {} // it seems that the bound is ignored here, i.e. this gets treated as fn is_pod<T: Pod>(_: T) {} fn main() { — |
kmcallister
added
the
A-traits
label
Mar 5, 2015
flaper87
referenced this issue
Mar 10, 2015
Open
opt-in built-in bounds traits RFC tracker (optin_builtin_traits) #13231
flaper87
self-assigned this
Mar 25, 2015
This comment has been minimized.
This comment has been minimized.
|
This turns out to be a deeper issue. We should hold off on removing feature-gate for negative impls until it is resolved. The core issue that that negative impls with extra bounds become effectively negative bounds:
Now |
This comment has been minimized.
This comment has been minimized.
kdeeee
commented
Sep 30, 2016
•
|
error still persist in
|
This comment has been minimized.
This comment has been minimized.
|
triage: OIBITs cannot have bounds anymore. yay. |
japaric commentedMar 5, 2015
cc @nikomatsakis @flaper87