We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e1eef73 commit 14ccea4Copy full SHA for 14ccea4
compiler/rustc_const_eval/src/const_eval/error.rs
@@ -111,6 +111,10 @@ pub fn get_span_and_frames<'tcx>(
111
add_frame(frame);
112
}
113
114
+
115
+ // In `rustc`, we present const-eval errors from the outer-most place first to the inner-most.
116
+ // So we reverse the frames here. The first frame will be the same as the span from the current
117
+ // `TyCtxtAt<'_>`, so we remove it as it would be redundant.
118
frames.reverse();
119
if frames.len() > 0 {
120
frames.remove(0);
0 commit comments