]> git.lizzy.rs Git - rust.git/commit
rustc: Change the return of a query's `try_get`
authorAlex Crichton <alex@alexcrichton.com>
Wed, 23 Aug 2017 19:53:29 +0000 (12:53 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Fri, 25 Aug 2017 23:08:35 +0000 (16:08 -0700)
commit97f2c37435b76c59ff60164b30a02f09641f798f
treef7c3f44c48d2b1470b14bce97aab4f910a1c8cd9
parent64b0b2bfebf857f25f826ca9ebb07630287bc4d0
rustc: Change the return of a query's `try_get`

This alters the return value of the `try_get` function so the error contains a
diagnostic rather than a `CycleError`. This way consumers are forced to take
*some* action (else they get a bug to an un-emitted diagnostic). This action
could be to emit the error itself, or in some cases delay the diagnostic as a
bug and continue.
src/librustc/ty/maps.rs