about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-03-19 09:18:49 +0000
committerbors <bors@rust-lang.org>2020-03-19 09:18:49 +0000
commit3c6f982cc908aacc39c3ac97f31c989f81cc213c (patch)
tree721005f395aaf957869f5cd3f991f434792bd627 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
parent6724d584b8e3b5fa5e06466d1e900cdd60953707 (diff)
parent16e25f0ea3cb93cac85f6107ce62a5d4adbb3e84 (diff)
downloadrust-3c6f982cc908aacc39c3ac97f31c989f81cc213c.tar.gz
rust-3c6f982cc908aacc39c3ac97f31c989f81cc213c.zip
Auto merge of #66131 - eddyb:local-def-id, r=petrochenkov
rustc: use LocalDefId instead of DefIndex where possible.

That is, wherever `DefIndex` always referred to a "def" in the local crate, I replaced it with `LocalDefId`.
While `LocalDefId` already existed, it wasn't used a lot, but I hope I'm on the right track.

Unresolved questions:
* [x] ~~should `LocalDefId` implement `rustc_index::Idx`?~~
  * ~~this would get rid of a couple more `DefIndex` uses~~
* [x] ~~should `LocalDefId` be encoded/decoded as just a `DefIndex`?~~
  * ~~right now it's a bit messy, `LocalDefId` encodes/decodes like `DefId`~~
* [x] ~~should `DefId::assert_local` be named something else, like `expect_local`?~~

A future PR should change `tcx.hir().local_def_id(...)` to return `LocalDefId` instead of `DefId`, as changing it in this PR would be too noisy.

r? @michaelwoerister cc @nikomatsakis @petrochenkov @Zoxc
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions