]> git.lizzy.rs Git - rust.git/commit
Auto merge of #75396 - RalfJung:miri-spans, r=oli-obk
authorbors <bors@rust-lang.org>
Wed, 12 Aug 2020 20:44:19 +0000 (20:44 +0000)
committerbors <bors@rust-lang.org>
Wed, 12 Aug 2020 20:44:19 +0000 (20:44 +0000)
commit576d27c5a6c80cd39ef57d7398831d8e177573cc
tree1f0e3dcc72af97506603e0f7af42cff55b2e42e0
parentef1d58e7c90aa9885c906a6eb7398a2b6256d075
parentfd32fe9bb9cc97a5a3d97ab0f6ab673d8c81fa88
Auto merge of #75396 - RalfJung:miri-spans, r=oli-obk

Miri: improve spans of required_const failures

In https://github.com/rust-lang/rust/pull/75339 I added a loop evaluating all consts required by a function body. Unfortunately, if one of their evaluations fails, then the span used for that was that of the first statement in the function body, which happened to work form some existing test but is not sensible in general.

This PR changes it to point to the whole function instead, which is at least not wrong.

r? @oli-obk