explain why we use def_span

This commit is contained in:
Ralf Jung 2020-05-02 13:35:17 +02:00
parent 08ba0145c7
commit 17ca7a0e48

View File

@ -253,6 +253,7 @@ impl Validator<'mir, 'tcx> {
let is_unleashable = O::IS_SUPPORTED_IN_MIRI;
if is_unleashable && self.tcx.sess.opts.debugging_opts.unleash_the_miri_inside_of_you {
// Use `def_span` to deduplicate all warnings for the same const.
self.tcx.sess.span_warn(self.tcx.def_span(self.def_id), "skipping const checks");
if let Some(feature) = O::feature_gate() {
self.tcx.sess.miri_unleashed_feature(feature);