-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
RFC 1214 warning in librustc_mir/repr.rs #28999
Comments
A reduction of the code in question is available here: https://play.rust-lang.org/?gist=9893feaa919468e9f534&version=nightly |
Further reduced: pub struct Xyz<'a, V> {
v: (V, &'a u32),
}
fn eq<'a, 's, 't, V>(this: &'s Xyz<'a, V>, other: &'t Xyz<'a, V>) -> bool
where V: PartialEq {
this.v == other.v
}
fn main() {} |
It looks like the borrow of |
arielb1
added a commit
to arielb1/rust
that referenced
this issue
Oct 12, 2015
This rather crucial requirement was not checked. In most cases, that didn't cause any trouble because the argument types are required to outlive the call and are subtypes of a subformula of the callee type. However, binary ops are taken by ref only indirectly, without it being marked in the argument types, which led to the argument types not being constrained anywhere causing spurious errors (as these are basically unconstrainable, I don't think this change can break code). Of course, the old way was also incorrent with contravariance, but that is still unsound for other reasons. This also improves rustc::front to get RUST_LOG to *somewhat* work. Fixes rust-lang#28999
Manishearth
added a commit
to Manishearth/rust
that referenced
this issue
Oct 14, 2015
…felix This rather crucial requirement was not checked. In most cases, that didn't cause any trouble because the argument types are required to outlive the call and are subtypes of a subformula of the callee type. However, binary ops are taken by ref only indirectly, without it being marked in the argument types, which led to the argument types not being constrained anywhere causing spurious errors (as these are basically unconstrainable, I don't think this change can break code). Of course, the old way was also incorrent with contravariance, but that is still unsound for other reasons. This also improves rustc::front to get RUST_LOG to *somewhat* work. Fixes rust-lang#28999. That issue is one of the several regression introduced by rust-lang#28669. r? @pnkfelix
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Building nightly yields
The text was updated successfully, but these errors were encountered: