Ralf Jung
3fd1af5fdb
let rustfmt undo most of my edits :(
2020-01-16 18:57:58 +01:00
Ralf Jung
9dee5d582f
fix rustfmt fallout
2020-01-16 18:43:51 +01:00
Mazdak Farrokhzad
03dfa642d9
lints: promote levels.rs to lint.rs & extract passes.rs
2020-01-11 07:42:26 +01:00
Mazdak Farrokhzad
8bd3d240e3
nix syntax::errors & prefer rustc_errors over errors
2020-01-10 07:41:30 +01:00
Mazdak Farrokhzad
2c3e5d3de0
- remove syntax::{span_warn!, span_err!, span_fatal!. struct_err!}
...
- 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-08 04:25:33 +01:00
Mazdak Farrokhzad
ebfd8673a7
Remove rustc_hir reexports in rustc::hir.
2020-01-05 12:49:22 +01:00
Mazdak Farrokhzad
4ff12ce4c1
Normalize syntax::symbol imports.
2020-01-02 13:57:04 +01:00
Vadim Petrochenkov
70f1d57048
Rename syntax_pos to rustc_span in source code
2020-01-01 09:15:18 +03:00
Oliver Scherer
a0bd1a695d
Prevent an ICE on invalid transmutes
2019-12-26 22:50:16 +01:00
Mark Rousskov
a06baa56b9
Format the world
2019-12-22 17:42:47 -05:00
bors
5c5c8eb864
Auto merge of #66927 - RalfJung:engines-dont-panic, r=oli-obk
...
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-07 14:46:30 +00:00
Ralf Jung
a725a15ce2
Miri core engine: use throw_ub instead of throw_panic
2019-12-01 12:08:05 +01:00
Ralf Jung
4b81dd43e0
add reusable MachineStop variant to Miri engine error enum
2019-12-01 11:49:40 +01:00
Mazdak Farrokhzad
d91e63b7a2
Rollup merge of #66832 - RalfJung:const-prop-no-alloc, r=oli-obk
...
const_prop: detect and avoid catching Miri errors that require allocation
r? @wesleywiser @oli-obk
2019-12-01 04:49:27 +01:00
Ralf Jung
5d23518a12
const_prop: detect and avoid catching Miri errors that require allocation
2019-11-28 09:03:00 +01:00
David Haig
eda2d416f6
Removed FIXME comment
2019-11-28 07:43:53 +00:00
David Haig
6ef625fb41
Remove duplication using single variant for error
2019-11-28 07:43:53 +00:00
David Haig
ec41fda58b
Squash
2019-11-28 07:43:53 +00:00
Brian Wignall
16fabd8efd
Fix spelling typos
2019-11-26 22:19:54 -05:00
Mazdak Farrokhzad
2f00e86cb5
Introduce MIR optimizations for simplifying x? on Results.
...
This optimization depends on inlining for the identity
conversions introduced by the lowering of the `?`.
To take advantage of `SimplifyArmIdentity`, `-Z mir-opt-level=2`
is required because that triggers the inlining MIR optimization.
2019-11-21 20:05:16 +01:00
Guillaume Gomez
798e389e57
Update to use new librustc_error_codes library
2019-11-14 13:05:42 +01:00
Wesley Wiser
b71ea80172
Don't ICE when evaluating writes to uninhabited enum variants
2019-10-18 19:16:49 -04:00
Oliver Scherer
4eb5fcb09c
Compute the layout of uninhabited structs
2019-10-02 10:59:50 +02:00
Wesley Wiser
dcc6c28c53
Introduce a ConstPropMachine
...
This allows us to avoid changing things directly in the miri engine just
for const prop.
2019-09-27 20:11:13 -04:00
Wesley Wiser
4e58e2e3a3
Work around for #64506
2019-09-27 20:11:13 -04:00
Wesley Wiser
bc17936c8a
[const-prop] Replace eval_place() with use of InterpCx
2019-09-27 20:11:12 -04:00
Tyler Mandry
f8b6e26cfb
Rollup merge of #64541 - RalfJung:miri-errors, r=oli-obk
...
document Miri error categories
r? @oli-obk
2019-09-17 14:10:55 -07:00
Oliver Scherer
0de9485038
Get rid of special const intrinsic query in favour of const_eval
2019-09-17 16:31:55 +02:00
Ralf Jung
daafeb35b7
document Miri error categories
2019-09-17 08:58:51 +02:00
Alexander Regueiro
c1d29ee3c7
Aggregation of cosmetic changes made during work on REPL PRs: librustc
2019-09-07 16:27:19 +01:00
Alexander Regueiro
022d9c8eb5
Fixed grammar/style in error messages and reblessed tests.
2019-09-06 03:46:08 +01:00
Ralf Jung
440a5c8100
rename RUST_CTFE_BACKTRACE to RUSTC_CTFE_BACKTRACE
2019-08-10 16:37:40 +02:00
bors
5421d94960
Auto merge of #63152 - estebank:big-array, r=oli-obk
...
Always error on `SizeOverflow` during mir evaluation
Fix #55878 , fix #25116 .
r? @oli-obk
2019-08-07 04:28:08 +00:00
Esteban Küber
bdd79b849e
tweak output and tests
2019-08-04 12:23:05 -07:00
Ralf Jung
b9d4c759f3
AssumptionNotHeld is used only once in Miri and never caught... remove from enum
2019-08-04 11:59:14 +02:00
Ralf Jung
18daa766f0
move AssumptionNotHeld to UB
2019-08-04 11:21:41 +02:00
Esteban Küber
2c5684208c
avoid mutable state and override main message
2019-08-03 13:37:44 -07:00
Ralf Jung
89a370db0f
add variant for experimental UB (like Stacked Borrows)
2019-08-03 20:36:05 +02:00
Ralf Jung
1e24c73ae5
dedup free-form Unsupported errors; add macros for free-form UB and Unsupported cases
2019-08-02 23:41:24 +02:00
Ralf Jung
1b132a2f41
be less British
2019-08-02 23:31:21 +02:00
Esteban Küber
d3da411a08
Nicer labels for type layout errors
2019-08-02 12:33:58 -07:00
Esteban Küber
58bd8786e8
Do not lint on SizeOverflow, always error
2019-08-02 12:31:31 -07:00
Esteban Küber
83b5eb9615
Always error on SizeOverflow during mir evaluation
2019-08-02 12:30:46 -07:00
Saleem Jaffer
152f0d347e
code review fixes
2019-07-31 12:48:54 +05:30
Saleem Jaffer
fc5df1dfbf
renaming err to err_unsup
2019-07-30 16:08:32 +05:30
Saleem Jaffer
69daf844da
adding throw_ and err_ macros for InterpError
2019-07-30 15:25:12 +05:30
Saleem Jaffer
9f8b099846
code review fixes
2019-07-29 20:17:52 +05:30
Saleem Jaffer
03d47be8f0
code review fixes
2019-07-29 13:41:32 +05:30
Saleem Jaffer
654519d3c5
use PanicInfo and UnsupportedOpInfo
2019-07-29 13:35:59 +05:30
Saleem Jaffer
9782b373b3
implementing Debug for UnsupportedInfo
2019-07-29 13:35:10 +05:30