]> git.lizzy.rs Git - rust.git/commit
Auto merge of #51316 - oli-obk:const_err, r=nikomatsakis
authorbors <bors@rust-lang.org>
Wed, 6 Jun 2018 11:17:15 +0000 (11:17 +0000)
committerbors <bors@rust-lang.org>
Wed, 6 Jun 2018 11:17:15 +0000 (11:17 +0000)
commit9ac372568b0a63c0abb8953431fa6a392de040a3
treed92b896d058959a52902ace421a5be9b5a71dd32
parent685faa2c3ee062aaf30ddf6d3daf4ef3b576979b
parent14d08e53710f8be52734ad285d221b224415dc15
Auto merge of #51316 - oli-obk:const_err, r=nikomatsakis

Refactor the const eval diagnostic API

* no longer report "const eval error" for things that have typeck errors
* errors and lints have saner spans and messages
* unified the diagnostic logic (const eval errors were slightly different depending on where they were reported, and there was also code duplication between the different reporters)
* report errors if an erroneous constant is used inside a promoted (fixes most of #50814)