Skip to content

Commit b9c752b

Browse files
authored
Rollup merge of #61618 - RalfJung:error, r=oli-obk
make the backtrace field of EvalError private This also makes sure people don't contruct these the wrong way (i.e., not through the `From` instance). r? @oli-obk
2 parents 9bbdc40 + 524f146 commit b9c752b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/librustc/mir/interpret/error.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,15 @@ pub fn struct_error<'a, 'gcx, 'tcx>(
179179
struct_span_err!(tcx.sess, tcx.span, E0080, "{}", msg)
180180
}
181181

182+
/// Packages the kind of error we got from the const code interpreter
183+
/// up with a Rust-level backtrace of where the error occured.
184+
/// Thsese should always be constructed by calling `.into()` on
185+
/// a `InterpError`. In `librustc_mir::interpret`, we have the `err!`
186+
/// macro for this
182187
#[derive(Debug, Clone)]
183188
pub struct EvalError<'tcx> {
184189
pub kind: InterpError<'tcx, u64>,
185-
pub backtrace: Option<Box<Backtrace>>,
190+
backtrace: Option<Box<Backtrace>>,
186191
}
187192

188193
impl<'tcx> EvalError<'tcx> {

0 commit comments

Comments
 (0)