-
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
Implement better object defaults (RFC #1156) #26370
Implement better object defaults (RFC #1156) #26370
Conversation
aabe806
to
325f468
Compare
I went ahead and made the warning more targeted. It was bugging me. |
cc me |
ee09ce4
to
b4bbc66
Compare
RFC is merged. |
☔ The latest upstream changes (presumably #24527) made this pull request unmergeable. Please resolve the merge conflicts. |
b4bbc66
to
9b55ed3
Compare
@pnkfelix ping (I'll rebase on Fri at the latest...) |
@nikomatsakis okay it all looks good to me, sorry it took me so long to get around to it. |
fc1731a
to
0ab544a
Compare
region-bound is expected to change in Rust 1.3, but don't use it for anything in this commit. Note that this is not a "significant" part of the type (it's not part of the formal model) so we have to normalize this away or trans starts to get confused because two equal types wind up with distinct LLVM types.
bound that is likely to change. In that case, it will change to 'static, so then scan down the graph to see whether there are any hard constraints that would prevent 'static from being a valid value here. Report a warning.
0ab544a
to
db5f3bc
Compare
marks as beta-accepted |
@bors r+ p=1 |
📌 Commit db5f3bc has been approved by |
…komatsakis This is an implementation of RFC rust-lang/rfcs#1156. It includes the code to implement the new rules, but that code is currently disabled. It also includes code to issue warnings when the change will cause breakage. These warnings try hard to be targeted but are also somewhat approximate. They could, with some effort, be made *more* targeted by adjusting the code in ty_relate that propagates the "will change" flag to consider the specific operation. Might be worth doing. r? @pnkfelix (I think you understand region inference best)
This is an implementation of RFC rust-lang/rfcs#1156. It includes the code to implement the new rules, but that code is currently disabled. It also includes code to issue warnings when the change will cause breakage. These warnings try hard to be targeted but are also somewhat approximate. They could, with some effort, be made more targeted by adjusting the code in ty_relate that propagates the "will change" flag to consider the specific operation. Might be worth doing.
r? @pnkfelix (I think you understand region inference best)