diff options
| author | Oliver Schneider <git-spam-no-reply9815368754983@oli-obk.de> | 2018-01-31 15:06:45 +0100 |
|---|---|---|
| committer | Oliver Schneider <git-spam-no-reply9815368754983@oli-obk.de> | 2018-03-08 08:34:16 +0100 |
| commit | 8500c2fab2a7e93a4a918417c4f01d136247ef89 (patch) | |
| tree | 2d092b72bd2a799d21d0d6cf7d58f8902c1f9894 /src/librustc/mir/interpret | |
| parent | bd03371f711adcb7724c939ea053f4090e87c16f (diff) | |
| download | rust-8500c2fab2a7e93a4a918417c4f01d136247ef89.tar.gz rust-8500c2fab2a7e93a4a918417c4f01d136247ef89.zip | |
Const eval error refactoring
Diffstat (limited to 'src/librustc/mir/interpret')
| -rw-r--r-- | src/librustc/mir/interpret/error.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/librustc/mir/interpret/error.rs b/src/librustc/mir/interpret/error.rs index 90d10df1515..bb27628fa9c 100644 --- a/src/librustc/mir/interpret/error.rs +++ b/src/librustc/mir/interpret/error.rs @@ -124,6 +124,9 @@ pub enum EvalErrorKind<'tcx> { UnimplementedTraitSelection, /// Abort in case type errors are reached TypeckError, + /// Cannot compute this constant because it depends on another one + /// which already produced an error + ReferencedConstant, } pub type EvalResult<'tcx, T = ()> = Result<T, EvalError<'tcx>>; @@ -245,6 +248,8 @@ impl<'tcx> Error for EvalError<'tcx> { "there were unresolved type arguments during trait selection", TypeckError => "encountered constants with type errors, stopping evaluation", + ReferencedConstant => + "referenced constant has errors", } } } |
