]> git.lizzy.rs Git - rust.git/commit
mir: Fix DefiningTy::Const
authorbobtwinkles <srkoser+GitHub@gmail.com>
Fri, 2 Feb 2018 03:26:48 +0000 (22:26 -0500)
committerbobtwinkles <srkoser+github@gmail.com>
Wed, 7 Feb 2018 04:42:05 +0000 (23:42 -0500)
commit5de094e579f8fa6c32df0690fd3e47a33c1cb6ef
treeefd0d425708ee6439e6e270bf4aeabc1fa85e310
parentbd98fe0c05601d8a318a709adc4263f3348ea8d4
mir: Fix DefiningTy::Const

Fixes #47590 by fixing the way DefiningTy represents constants. Previously,
constants were represented using just the type of the variable. However, this
will fail to capture early-bound regions as NLL inference vars, resulting in an
ICE when we try to compute region VIDs a little bit later in the universal
region resolution process.
src/librustc_mir/borrow_check/nll/region_infer/annotation.rs
src/librustc_mir/borrow_check/nll/universal_regions.rs
src/test/ui/nll/trait-associated-constant.rs [new file with mode: 0644]
src/test/ui/nll/trait-associated-constant.stderr [new file with mode: 0644]