]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Auto merge of #95880 - cjgillot:def-ident-span, r=petrochenkov
authorbors <bors@rust-lang.org>
Sat, 11 Jun 2022 20:08:48 +0000 (20:08 +0000)
committerbors <bors@rust-lang.org>
Sat, 11 Jun 2022 20:08:48 +0000 (20:08 +0000)
commit99930ac7f8cbb5d9b319b2e2e92794fd6f24f556
tree0e19dae48348252b6fd12d3ddb97044d51002205
parentc08b235a5ce10167632bb0fddcd0c5d67f2d42e3
parent1a881a487b3f217bb1e47a8a16925ca519051583
Auto merge of #95880 - cjgillot:def-ident-span, r=petrochenkov

Handle `def_ident_span` like `def_span`.

`def_ident_span` had an ad-hoc status in the compiler.

This PR refactors it to be a first-class citizen like `def_span`:
- it gets encoded in the main metadata loop, instead of the visitor;
- its implementation is updated to mirror the one of `def_span`.

We do not remove the `Option` in the return type, since some items do not have an ident, AnonConsts for instance.
compiler/rustc_metadata/src/rmeta/decoder.rs
compiler/rustc_metadata/src/rmeta/encoder.rs
compiler/rustc_middle/src/hir/map/mod.rs