Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 17ca7a0

Browse files
committed
explain why we use def_span
1 parent 08ba014 commit 17ca7a0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/librustc_mir/transform/check_consts/validation.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ impl Validator<'mir, 'tcx> {
253253
let is_unleashable = O::IS_SUPPORTED_IN_MIRI;
254254

255255
if is_unleashable && self.tcx.sess.opts.debugging_opts.unleash_the_miri_inside_of_you {
256+
// Use `def_span` to deduplicate all warnings for the same const.
256257
self.tcx.sess.span_warn(self.tcx.def_span(self.def_id), "skipping const checks");
257258
if let Some(feature) = O::feature_gate() {
258259
self.tcx.sess.miri_unleashed_feature(feature);

0 commit comments

Comments
 (0)