-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Fix issue #9243 #9570
Fix issue #9243 #9570
Conversation
Thanks for the patch! The tests and the code all look good to me. That being said, I think that this is a deeper issue which needs discussion before merging. I was under the impression that it wasn't clear what it meant to create a static variable with a destructor. Does this mean that the destructor is never run? Does this produce unsound behavior? Also what if it's a I think that this needs to be discussed further to hammer down the semantics of statics with destructors before we can decide on a course of action. |
cc @pcwalton, it was my impression that we didn't want this sort of thing |
Agree that #9243 has a lot of subtlety that needs to be ironed out before moving forward. |
Thanks for the review Alex. I took the issue more or less at random, and just went on to fix it, but i see your point. |
Hm I'm not sure why, but this is causing bors some trouble. I'm closing temporarily to see if this un-sticks bors. |
Nope, didn't help |
Thanks again for this, but we decided in the 10/15/13 meeting that we shouldn't be allowing statics with destructors. |
…ction, r=llogiq feat: lint unchecked subtraction of a 'Duration' from an 'Instant' Hello all, I tried to tackle the open issue rust-lang#9371 and this is what I came up with. I have a difficulty currently - some tests are failing: ``` failures: [ui] ui/manual_instant_elapsed.rs ``` The `manual_instant_elapsed` is failing because of `Instant::now() - duration` test, this now gets also picked by `unchecked_duration_subtraction` lint. What is the correct way to proceed in this case? Simply update the `.stderr` file for `manual_instant_elapsed` lint? changelog: [`unchecked_duration_subtraction`]: Add lint for unchecked subtraction of a `Duration` from an `Instant`. fixes rust-lang#9371
No description provided.