{"push_id":546056611,"size":20,"distinct_size":20,"ref":"refs/heads/new-dtor-semantics-5","head":"4b3692ba7c2c9deacb62a0f0b80f1b61b8bafff1","before":"f2cffa736ce36529981065e0c00b410d7304fcd7","commits":[{"sha":"e48786beffa2d5c4bc0d073aaac1bf0698e28e17","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"Refactored librustc_trans to avoid stack-crossing ref cycle.\n\nNamely, `BlockS` used to carry an `fcx: &'blk FunctionContext`, while\nthe `FunctionContext` carries a reference to the arena that holds the\nblocks.\n\nThis creates a chicken/egg problem where we are attempting to assign\nthe lifetime `'blk` to both the `FunctionContext` and to the arena's\nblocks, which does not work under the new lifetime rules for `Drop`,\nsince there has to be some order in which the two are torn down.\n\nTo resolve this, I removed the `fcx` from the `BlockS`, and instead\nturn the `Block` type (which was formerly `&'blk BlockS`) into a struct\ncarrying both the pointer to the `BlockS` as well as the `fcx`.","distinct":true,"url":"https://api.github.com/repos/pnkfelix/rust/commits/e48786beffa2d5c4bc0d073aaac1bf0698e28e17"},{"sha":"90542736d73161b2f683815cfcfa11e18fcb86d3","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"librustc_trans: accommodate `make tidy` post cycle-breaking refactoring.","distinct":true,"url":"https://api.github.com/repos/pnkfelix/rust/commits/90542736d73161b2f683815cfcfa11e18fcb86d3"},{"sha":"c5dde23c8d43b1ebf68b2cc2ad0d992c245d4996","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"improve `compiletest` error message when path option missing.\n\n(I often run `compiletest` by hand by cut-and-pasting from what `make`\nruns, but then I need to tweak it (cut out options) and its useful to\nbe told when I have removed an option that is actually required, such\nas `--android-cross-path=path`.)","distinct":true,"url":"https://api.github.com/repos/pnkfelix/rust/commits/c5dde23c8d43b1ebf68b2cc2ad0d992c245d4996"},{"sha":"56c39aec759db19be4a9f9f318a0c1f870992d38","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"fixes for new rules for lifetimes and destructors.\n\nnote that some of these cases may actually be fixes to latent bugs, in\nsome sense (depending on what our guarantees are about e.g. what a\nhashmap should be allowed to access in its own destructor).","distinct":true,"url":"https://api.github.com/repos/pnkfelix/rust/commits/56c39aec759db19be4a9f9f318a0c1f870992d38"},{"sha":"8ee3c94f4ebca092bda5a4ee78b44d1a6706dcc1","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"Moved bindings for `taken` and `life_giver` to suit new lifetime rules.","distinct":true,"url":"https://api.github.com/repos/pnkfelix/rust/commits/8ee3c94f4ebca092bda5a4ee78b44d1a6706dcc1"},{"sha":"9a3cb06670c4971096d17b4c3f140313b8048f2e","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"rustc_typeck::check::method::probe fixes for new lifetime/dtor rules.","distinct":true,"url":"https://api.github.com/repos/pnkfelix/rust/commits/9a3cb06670c4971096d17b4c3f140313b8048f2e"},{"sha":"2e6b6999b0d0d7059addc428fefadc5b3586188b","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"librustc_typeck::coherence accommodate new lifetime/dtor rules.","distinct":true,"url":"https://api.github.com/repos/pnkfelix/rust/commits/2e6b6999b0d0d7059addc428fefadc5b3586188b"},{"sha":"aee4a01e91b34cff4ef9347f2cbae541ec6ea6a8","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"rustc_resolve: shift bindings to accommodate new lifetime/dtor rules.","distinct":true,"url":"https://api.github.com/repos/pnkfelix/rust/commits/aee4a01e91b34cff4ef9347f2cbae541ec6ea6a8"},{"sha":"382c070c9ab54e7f55f0be89592148555c40b975","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"rustc_driver: accommodate new lifetime/dtor rules.","distinct":true,"url":"https://api.github.com/repos/pnkfelix/rust/commits/382c070c9ab54e7f55f0be89592148555c40b975"},{"sha":"591d8c8fc6c8562591b8d0b4ef238d623278a124","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"Add `CodeExtent::Remainder` variant to track a suffix of a block.\n\nAdded DestructionScope variant to CodeExtent, representing the area\nimmediately surrounding a node that is a terminating_scope\n(e.g. statements, looping forms) during which the destructors run (the\ndestructors for temporaries from the execution of that node, that is).\n\ninsert DestructionScope and block Remainder into enclosing CodeExtents hierarchy.\n\nSwitch to constructing DestructionScope rather than Misc in a number\nof places, mostly related to `ty::ReFree` creation, and use\ndestruction-scopes of node-ids at various calls to\nliberate_late_bound_regions.\n\nmiddle::resolve_lifetime: Map BlockScope to DestructionScope in `fn resolve_free_lifetime`.\n\nadd the InnermostDeclaringBlock and InnermostEnclosingExpr enums that\nare my attempt to clarify the region::Context structure, and that\nlater commmts build upon.\n\nExpanded region-inference graph with enclosing relationship as well as\nthe constraint edges.\n\nimprove the debug output for `CodeExtent` attached to `ty::Region::ReScope`.\n\nloosened an assertion in `rustc_trans::trans::cleanup` to account for\n`DestructionScope`.  (Perhaps this should just be switched entirely\nover to `DestructionScope`, rather than allowing for either `Misc` or\n`DestructionScope`.)\n\n----\n\nThe more fine-grained scopes introduced by this change break some code.  A simple\nexample can be seen in libregex/vm.rs, where two references `clist` and `nlist`\nneed to have the same lifetime lead to this code breaking:\n\n```rust\nlet mut clist = &mut Threads::new(self.which, ninsts, ncaps);\nlet mut nlist = &mut Threads::new(self.which, ninsts, ncaps);\n...\nmem::swap(&mut clist, &mut nlist);\n```\n\nThe reason for the breakage is that the thread-value associated with\n`nlist` has a strictly shorter lifetime than the `&mut`-reference for\n`clist`, but the code in question needs both `clist` and `list` to be\nassigned compatible lifetimes.  The usual fix is to revise the code as\nfollows, moving *both* of the thread values up above the creation of\nthe `&mut`-references, like so:\n\n```rust\nlet mut cthread = Threads::new(self.which, ninsts, ncaps);\nlet mut nthread = Threads::new(self.which, ninsts, ncaps);\nlet mut clist = &mut cthread;\nlet mut nlist = &mut nthread;\n...\nmem::swap(&mut clist, &mut nlist);\n```\n\nLikewise, there are other cases where the value needs to have a\nstrictly greater lifetime than the reference taken to that value, and\nthe typical solution is to create the value and bind it to a name in\nstatement preceding the creation of the reference.\n\n----\n\nDue to these (relatively rare) instances, this is a (wait for it)\n\n[breaking-change]","distinct":true,"url":"https://api.github.com/repos/pnkfelix/rust/commits/591d8c8fc6c8562591b8d0b4ef238d623278a124"},{"sha":"b3c8d2837f1dc95858a5a0a86765e2fa6a484520","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"Port of pcwalton's dtor checker, with following modifications.\n\nfix exponential time blowup on compile-fail/huge-struct.rs by keeping\nthe breadcrumbs until end of traversal.\n\nfactored drop-checking code out into dropck module.\n\nAdds `SafeDestructor` to enum `SubregionOrigin` (for error reporting).\n\n\"fix\" pcwalton changes to avoid premature return from regionck::visit_expr.\n\nincludes still more debug instrumentation, as well as a span_note in\nthe case that used to return prematurely.\n\n----\n\nSince this imposes restrictions on the lifetimes used in types with\ndestructors, this is a (wait for it)\n\n[breaking-change]","distinct":true,"url":"https://api.github.com/repos/pnkfelix/rust/commits/b3c8d2837f1dc95858a5a0a86765e2fa6a484520"},{"sha":"42618e7f50f591eb1054e205d519a67065d0fba1","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"checkpoint pcwalton test of new destructor static semantics.","distinct":true,"url":"https://api.github.com/repos/pnkfelix/rust/commits/42618e7f50f591eb1054e205d519a67065d0fba1"},{"sha":"2316d6c31436bec9ee7671ec2332eb1d4f97e184","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"a new regression test discovered during bootstrapping.\n\nmore regression tests extracted while bootstrapping.","distinct":true,"url":"https://api.github.com/repos/pnkfelix/rust/commits/2316d6c31436bec9ee7671ec2332eb1d4f97e184"},{"sha":"40b8428a35280b8725239d9446928c26476f0496","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"port of pcwalton removal of `#[unsafe_destructor]` check.\n\nSince the earlier commits impose rules on lifetimes that make\ndestructors safe, we no longer need the `#[unsafe_destructor]`\nattribute nor its associated check.\n\n----\n\nSince this is removing a (somewhat common albeit unsafe) attribute,\nthis is a (wait for it)\n\n[breaking-change]","distinct":true,"url":"https://api.github.com/repos/pnkfelix/rust/commits/40b8428a35280b8725239d9446928c26476f0496"},{"sha":"52d9590efe023480475636deef0ebf90c82536ec","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"region.rs: remove unused variant from `InnermostEnclosingExpr`.","distinct":true,"url":"https://api.github.com/repos/pnkfelix/rust/commits/52d9590efe023480475636deef0ebf90c82536ec"},{"sha":"964db8d77ce31ce380245c9ff9a037be13d01f11","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"librustc_typeck: remove unused imports","distinct":true,"url":"https://api.github.com/repos/pnkfelix/rust/commits/964db8d77ce31ce380245c9ff9a037be13d01f11"},{"sha":"99c6cc0dc9f4549928cfdbca5999481367126470","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"rustdoc: placate new scoping/drop rules.","distinct":true,"url":"https://api.github.com/repos/pnkfelix/rust/commits/99c6cc0dc9f4549928cfdbca5999481367126470"},{"sha":"4c12b4eb27abd6a1c6534aec6e88d29cd8d77fca","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"remove outdated compile-fail tests from when lifetime-parameteric dtors were disallowed/unsafe.","distinct":true,"url":"https://api.github.com/repos/pnkfelix/rust/commits/4c12b4eb27abd6a1c6534aec6e88d29cd8d77fca"},{"sha":"b72786ac76dd5dbde35bec9588647486f0c646d2","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"update test/compile-fail/destructor-restrictions since `box <expr>` is feature gated for alpha.","distinct":true,"url":"https://api.github.com/repos/pnkfelix/rust/commits/b72786ac76dd5dbde35bec9588647486f0c646d2"},{"sha":"4b3692ba7c2c9deacb62a0f0b80f1b61b8bafff1","author":{"email":"8de0203a6391036bc81ce266eefac1291b6bcb9a@pnkfx.org","name":"Felix S. Klock II"},"message":"Update some compile-fail tests to accommodate new scoping/dtor rules.","distinct":true,"url":"https://api.github.com/repos/pnkfelix/rust/commits/4b3692ba7c2c9deacb62a0f0b80f1b61b8bafff1"}]}