about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/interpret
AgeCommit message (Collapse)AuthorLines
2022-12-13Rename `assert_uninit_valid` intrinsicNilstrieb-2/+4
It's not about "uninit" anymore but about "filling with 0x01 bytes" so the name should at least try to reflect that.
2022-12-12interpret: add read_machine_[ui]size convenience methodsRalf Jung-6/+17
2022-12-11Rollup merge of #105537 - kadiwa4:remove_some_imports, r=fee1-deadMatthias Krüger-9/+0
compiler: remove unnecessary imports and qualified paths Some of these imports were necessary before Edition 2021, others were already in the prelude. I hope it's fine that this PR is so spread-out across files :/
2022-12-10compiler: remove unnecessary imports and qualified pathsKaDiWa-9/+0
2022-12-09Remove unneeded field from `SwitchTargets`Jakob Degen-2/+1
2022-12-09Auto merge of #104449 - oli-obk:unhide_unknown_spans, r=estebank,RalfJungbors-15/+3
Start emitting labels even if their pointed to file is not available locally r? `@estebank` cc `@RalfJung` fixes #97699
2022-12-06Remove now-redundant file/line info from const backtracesOli Scherer-15/+3
2022-12-06make retagging work even with 'unstable' placesRalf Jung-6/+49
2022-12-03interpret: clobber return place when calling functionRalf Jung-0/+4
2022-11-28Rollup merge of #104982 - RalfJung:norun, r=oli-obkMatthias Krüger-5/+0
interpret: get rid of run() function Miri needs its own loop anyway, so there's not much of a point in trying to share this code.
2022-11-27Rollup merge of #104976 - WaffleLapkin:move_comments, r=cjgillotMatthias Krüger-5/+5
Prefer doc comments over `//`-comments in compiler Doc comments are generally nicer: they show up in the documentation, they are shown in IDEs when you hover other mentions of items, etc. Thus it makes sense to use them instead of `//`-comments.
2022-11-27interpret: get rid of run() functionRalf Jung-5/+0
2022-11-27Prefer doc comments over `//`-comments in compilerMaybe Waffle-5/+5
2022-11-27Auto merge of #103917 - oli-obk:layout_math, r=RalfJung,lcnrbors-12/+4
Various cleanups around scalar layout restrictions Pulled out of https://github.com/rust-lang/rust/pull/103724
2022-11-25add FIXME'sBoxy-0/+1
2022-11-25Add empty ConstKind::Abstractkadmin-0/+1
Initial pass at expr/abstract const/s Address comments Switch to using a list instead of &[ty::Const], rm `AbstractConst` Remove try_unify_abstract_consts Update comments Add edits Recurse more More edits Prevent equating associated consts Move failing test to ui Changes this test from incremental to ui, and mark it as failing and a known bug. Does not cause the compiler to ICE, so should be ok.
2022-11-25Move a comment to the right placeOli Scherer-3/+3
2022-11-25`rustc_layout_scalar_valid_range` can be applied to scalar pairs and affects ↵Oli Scherer-9/+1
teh first scalar
2022-11-20Rollup merge of #104564 - RalfJung:either, r=oli-obkMatthias Krüger-55/+65
interpret: use Either over Result when it is not representing an error condition r? `@oli-obk`
2022-11-19constify `exact_div` intrinsicLukas Markeffsky-0/+5
2022-11-19Rollup merge of #104411 - lcnr:bivariance-nll, r=compiler-errorsDylan DPC-3/+3
nll: correctly deal with bivariance fixes #104409 when in a bivariant context, relating stuff should always trivially succeed. Also changes the mir validator to correctly deal with higher ranked regions. r? types cc ``@RalfJung``
2022-11-18review feedbackRalf Jung-7/+7
2022-11-18interpret: use Either over Result when it is not representing an error conditionRalf Jung-55/+65
2022-11-16cleanup and dedupe CTFE and Miri error reportingRalf Jung-48/+70
2022-11-15Auto merge of #104054 - RalfJung:byte-provenance, r=oli-obkbors-25/+20
interpret: support for per-byte provenance Also factors the provenance map into its own module. The third commit does the same for the init mask. I can move it in a separate PR if you prefer. Fixes https://github.com/rust-lang/miri/issues/2181 r? `@oli-obk`
2022-11-15mv utility methods into separate modulelcnr-2/+2
2022-11-15nll: correctly deal with bivariancelcnr-3/+3
2022-11-14Rollup merge of #104356 - RalfJung:interpret-check-mplace, r=oli-obkMatthias Krüger-9/+9
interpret: make check_mplace public This helps avoid code duplication in https://github.com/rust-lang/miri/pull/2661.
2022-11-14Rollup merge of #104349 - rustaceanclub:master, r=oli-obkMatthias Krüger-1/+1
fix some typos in comments
2022-11-14assert that we are (de)seiralizing ProvenanceMap correctlyRalf Jung-2/+2
2022-11-13interpret: make check_mplace publicRalf Jung-9/+9
2022-11-13add is_sized method on Abi and Layout, and use itRalf Jung-11/+11
2022-11-13fix some typos in commentscui fliter-1/+1
Signed-off-by: cui fliter <imcusg@gmail.com>
2022-11-06move InitMask to its own moduleRalf Jung-3/+3
2022-11-06interpret: support for per-byte provenanceRalf Jung-22/+17
2022-11-04Rollup merge of #103915 - chenyukang:yukang/fix-103874, r=lcnrMatthias Krüger-2/+2
Improve use of ErrorGuaranteed and code cleanup Part of #103874
2022-11-02deprecate DelaySpanBugEmitted and use ErrorGuaranteed directlyyukang-2/+2
2022-11-01Rollup merge of #103729 - RalfJung:align-of-val-packed, r=oli-obkDylan DPC-1/+8
interpret: fix align_of_val on packed types Fixes https://github.com/rust-lang/miri/issues/2632 r? `@oli-obk`
2022-10-31interpret: move type_name implementation to an interpreter-independent ↵Ralf Jung-204/+11
helper file
2022-10-30All verbosity checks in `PrettyPrinter` now go through ↵Sarthak Singh-4/+7
`PrettyPrinter::should_print_verbose`
2022-10-29interpret: fix align_of_val on packed typesRalf Jung-1/+8
2022-10-29Rollup merge of #103625 - WaffleLapkin:no_tyctxt_dogs_allowed, r=compiler-errorsGuillaume Gomez-4/+3
Accept `TyCtxt` instead of `TyCtxtAt` in `Ty::is_*` functions Functions in answer: - `Ty::is_freeze` - `Ty::is_sized` - `Ty::is_unpin` - `Ty::is_copy_modulo_regions` This allows to remove a lot of useless `.at(DUMMY_SP)`, making the code a bit nicer :3 r? `@compiler-errors`
2022-10-28Auto merge of #102674 - CastilloDel:master, r=oli-obkbors-6/+6
Remove allow(rustc::potential_query_instability) in rustc_const_eval The use of FxHashMap has been replaced with FxIndexMap. Related to #84447
2022-10-27Accept `TyCtxt` instead of `TyCtxtAt` in `Ty::is_*` functionsMaybe Waffle-4/+3
Functions in answer: - `Ty::is_freeze` - `Ty::is_sized` - `Ty::is_unpin` - `Ty::is_copy_modulo_regions`
2022-10-26Rollup merge of #103546 - RalfJung:cast, r=oli-obkDylan DPC-31/+30
interpret: a bit of cast cleanup r? `@oli-obk`
2022-10-26Rollup merge of #103428 - SarthakSingh31:issue-94187, r=compiler-errorsDylan DPC-2/+4
Removed verbose printing from the `PrettyPrinter` when printing constants Partially solves #94187 by completing the first step described in [this comment](https://github.com/rust-lang/rust/issues/94187#issuecomment-1282339909).
2022-10-26Auto merge of #103562 - Dylan-DPC:rollup-sheepp5, r=Dylan-DPCbors-4/+4
Rollup of 10 pull requests Successful merges: - #102951 (suggest type annotation for local statement initialed by ref expression) - #103209 (Diagnostic derives: allow specifying multiple alternative suggestions) - #103287 (Use a faster allocation size check in slice::from_raw_parts) - #103416 (Name the `impl Trait` in region bound suggestions) - #103430 (Workaround unstable stmt_expr_attributes for method receiver expressions) - #103444 (Remove extra type error after missing semicolon error) - #103520 (rustc_middle: Rearrange resolver outputs structures slightly) - #103533 (Use &self instead of &mut self for cast methods) - #103536 (Remove `rustc_driver::set_sigpipe_handler()`) - #103542 (Pinning tests for some `macro_rules!` errors discussed in the lang meeting) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-10-26Auto merge of #103279 - compiler-errors:normalize-hack-back, r=lcnrbors-1/+8
Add eval hack in `super_relate_consts` back Partially reverts 01adb7e98d5656c06497f33dd2747df144e78356. This extra eval call *still* needs to happen, for example, in `normalize_param_env_or_error` when a param-env predicate has an unnormalized constant, since the param-env candidates never get normalized during candidate assembly (everywhere else we can assume that they are normalized fully). r? `@lcnr,` though I feel like I've assigned quite a few PRs to you in the last few days, so feel free to reassign to someone else familiar with this code if you're busy! cc #103243 (fixes the issue, but don't want to auto-close that until a backport is performed).
2022-10-25interpret: a bit of cast cleanupRalf Jung-31/+30
2022-10-25Use &self instead of &mut self for cast methodsJannis Christopher Köhl-4/+4