about summary refs log tree commit diff
path: root/src/librustc/mir/interpret/error.rs
AgeCommit message (Collapse)AuthorLines
2020-03-30rustc -> rustc_middle part 1Mazdak Farrokhzad-577/+0
2020-03-25Rollup merge of #70373 - Centril:canon-imports, r=Mark-SimulacrumMazdak Farrokhzad-1/+1
normalize some imports & prefer direct ones r? @Mark-Simulacrum
2020-03-24normalize some imports, prefer direct ones.Mazdak Farrokhzad-1/+1
2020-03-24move ModifiedStatic error to ConstEval errors, and generally adjust ↵Ralf Jung-9/+0
terminology from "static" to "global" where appropriate
2020-03-24Rollup merge of #70267 - RalfJung:const-prop-unsup, r=oli-obk,wesleywiserMazdak Farrokhzad-11/+29
get rid of ConstPropUnsupported; use ZST marker structs instead This gets rid of yet another machine-specific error variant. r? @oli-obk
2020-03-24Rollup merge of #70087 - ecstatic-morse:remove-const-eval-loop-detector, ↵Mazdak Farrokhzad-7/+7
r=RalfJung Remove const eval loop detector Now that there is a configurable instruction limit for CTFE (see #67260), we can replace the loop detector with something much simpler. See #66946 for more discussion about this. Although the instruction limit is nightly-only, the only practical way to reach the default limit uses nightly-only features as well (although CTFE will still execute code using such features inside an array initializer on stable). This will at the very least require a crater run, since it will result in an error wherever the "long running const eval" warning appeared before. We may need to increase the default for `const_eval_limit` to work around this. Resolves #54384 cc #49980 r? @oli-obk cc @RalfJung
2020-03-23make sure we are checking the size of the right thingRalf Jung-1/+1
2020-03-23add macro to reduce boilerplate and keep readable messagesRalf Jung-1/+1
2020-03-22remove UbExperimental variantRalf Jung-5/+2
2020-03-22avoid unsafe code, use upcasting-trait instead (trick by oli)Ralf Jung-25/+16
2020-03-22Rename `TimeLimitReached` -> `StepLimitReached`Dylan MacKenzie-2/+4
2020-03-22get rid of ConstPropUnsupported; use ZST marker structs insteadRalf Jung-11/+38
2020-03-17Use `const_eval_limit` instead of infinite loop detectorDylan MacKenzie-7/+5
2020-03-11fmtRalf Jung-1/+1
2020-03-11make error message less confusingRalf Jung-2/+2
2020-03-11generalize InvalidNullPointerUsage to InvalidIntPointerUsageRalf Jung-9/+4
2020-03-11fmt, tweak messages and blessRalf Jung-20/+25
2020-03-11miri: categorize errors into "unsupported" and "UB"Ralf Jung-182/+113
Also slightly refactor pointer bounds checks to avoid creating unnecessary temporary Errors
2020-03-10[Miri] Use a session variable instead of checking for an env var alwaysWesley Wiser-13/+20
In CTFE heavy code, checking the env var everytime is inefficient. We can do a lot better by using a `Session` variable instead.
2020-03-08use static strings instead of tcxRalf Jung-5/+5
2020-03-08Fix typoRalf Jung-2/+2
Co-Authored-By: bjorn3 <bjorn3@users.noreply.github.com>
2020-03-08fix some cases of unexpected exceptions leaving validationRalf Jung-5/+8
2020-03-08move error allocation test to error.rsRalf Jung-1/+17
2020-02-28use is_empty() instead of len() == x to determine if structs are empty.Matthias Krüger-1/+1
2020-02-15Change const eval to return `ConstValue`, instead of `Const` as the type ↵Ben Lewis-1/+2
inside it shouldn't be used.
2020-02-13improve comments:Ralf Jung-0/+1
- comment for special handling of Shl/Shr - reference a PR
2020-02-13small cleanup in ConstEvalErr::struct_genericRalf Jung-31/+40
2020-02-13move PanicInfo to mir moduleRalf Jung-57/+0
2020-02-13remove PanicInfo::Panic variant that MIR does not use or needRalf Jung-7/+2
2020-02-13remove Panic variant from InterpErrorRalf Jung-7/+15
2020-02-12Fix outdated doc comment.jumbatm-4/+3
2020-02-11Run RustFmtjumbatm-9/+8
2020-02-11Invert control in struct_lint_level.jumbatm-31/+50
Caller now passes in a `decorate` function, which is only run if the lint is allowed.
2020-01-18remove rustc_error_codes deps except in rustc_driverMazdak Farrokhzad-2/+0
2020-01-16let rustfmt undo most of my edits :(Ralf Jung-2/+1
2020-01-16fix rustfmt falloutRalf Jung-2/+3
2020-01-11lints: promote levels.rs to lint.rs & extract passes.rsMazdak Farrokhzad-1/+1
2020-01-10nix syntax::errors & prefer rustc_errors over errorsMazdak Farrokhzad-1/+1
2020-01-08- remove syntax::{span_warn!, span_err!, span_fatal!. struct_err!}Mazdak Farrokhzad-1/+1
- remove syntax::{help!, span_help!, span_note!} - remove unused syntax::{struct_span_fatal, struct_span_err_or_warn!, span_err_or_warn!} - lintify check_for_bindings_named_same_as_variants + conflicting_repr_hints - inline syntax::{struct_span_warn!, diagnostic_used!} - stringify_error_code! -> error_code! & use it more. - find_plugin_registrar: de-fatalize an error - de-fatalize metadata errors - move type_error_struct! to rustc_typeck - struct_span_err! -> rustc_errors
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-1/+1
2020-01-02Normalize `syntax::symbol` imports.Mazdak Farrokhzad-1/+1
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-1/+1
2019-12-26Prevent an ICE on invalid transmutesOliver Scherer-0/+6
2019-12-22Format the worldMark Rousskov-219/+201
2019-12-07Auto merge of #66927 - RalfJung:engines-dont-panic, r=oli-obkbors-2/+19
Miri core engine: use throw_ub instead of throw_panic See https://github.com/rust-lang/rust/issues/66902 for context: panicking is not really an "interpreter error", but just part of a normal Rust execution. This is a first step towards removing the `InterpError::Panic` variant: the core Miri engine does not use it any more. ConstProp and ConstEval still use it, though. This will be addressed in future PRs. From what I can tell, all the error messages this removes are actually duplicates. r? @oli-obk @wesleywiser
2019-12-01Miri core engine: use throw_ub instead of throw_panicRalf Jung-2/+19
2019-12-01add reusable MachineStop variant to Miri engine error enumRalf Jung-16/+12
2019-12-01Rollup merge of #66832 - RalfJung:const-prop-no-alloc, r=oli-obkMazdak Farrokhzad-7/+13
const_prop: detect and avoid catching Miri errors that require allocation r? @wesleywiser @oli-obk
2019-11-28const_prop: detect and avoid catching Miri errors that require allocationRalf Jung-7/+13
2019-11-28Removed FIXME commentDavid Haig-2/+0