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:
authorAaron Hill <aa1ronham@gmail.com>2020-03-11 15:35:46 -0400
committerAaron Hill <aa1ronham@gmail.com>2020-03-11 15:35:46 -0400
commitff65bffe2b143528ff90d5226b18ceca750d7c02 (patch)
tree81460c9fb685036177271c12ca252802dbbf8290 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
parentc20d7eecbc0928b57da8fe30b2ef8528e2bdd5be (diff)
downloadrust-ff65bffe2b143528ff90d5226b18ceca750d7c02.tar.gz
rust-ff65bffe2b143528ff90d5226b18ceca750d7c02.zip
Fix cycle error when emitting suggestion for mismatched `fn` type
Fixes #66667

Previously, we called `tcx.typeck_tables_of` when determining whether or
not to emit a suggestion for a type error. However, we might already be
type-checking the `DefId` we pass to `typeck_tables_of` (it could be
anywhere in the query stack).

Fortunately, we only need the function signature, not the entire
`TypeckTables`. By using `tcx.fn_sig`, we avoid the possibility of cycle
errors while retaining the ability to emit a suggestion.
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions