summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ty/consts
AgeCommit message (Collapse)AuthorLines
2024-11-12Consolidate type system const evaluation under `traits::evaluate_const`Boxy-35/+1
mew
2024-11-03compiler: Directly use rustc_abi in metadata and middleJubilee Young-1/+1
Stop reexporting ReprOptions from middle::ty
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-9/+6
2024-08-11Use assert_matches around the compilerMichael Goulet-4/+6
2024-08-01interpret: simplify pointer arithmetic logicRalf Jung-2/+2
2024-07-29Reformat `use` declarations.Nicholas Nethercote-5/+9
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-07-06Uplift push_outlives_componentsMichael Goulet-0/+7
2024-06-11interpret: ensure we check bool/char for validity when they are used in a castRalf Jung-10/+5
2024-06-10ScalarInt: size mismatches are a bug, do not delay the panicRalf Jung-125/+106
2024-06-05ty::Expr reviewsBoxy-3/+5
2024-06-04Downsize `ty::Expr`Boxy-7/+118
2024-05-13Uplift AliasTyMichael Goulet-26/+4
2024-04-29Remove `extern crate rustc_data_structures` from numerous crates.Nicholas Nethercote-1/+1
2024-04-29Remove `extern crate rustc_macros` from `rustc_middle`.Nicholas Nethercote-1/+1
2024-04-19Auto merge of #124113 - RalfJung:interpret-scalar-ops, r=oli-obkbors-37/+63
interpret: use ScalarInt for bin-ops; avoid PartialOrd for ScalarInt Best reviewed commit-by-commit r? `@oli-obk`
2024-04-19avoid PartialOrd on ScalarIntRalf Jung-2/+2
we don't know their sign so we cannot, in general, order them properly
2024-04-19ScalarInt: add methods to assert being a (u)int of given sizeRalf Jung-28/+39
2024-04-18interpret/binary_int_op: avoid dropping to raw ints until we determined the signRalf Jung-8/+23
2024-04-18Simplify `static_assert_size`s.Nicholas Nethercote-4/+1
We want to run them on all 64-bit platforms.
2024-04-03Check `x86_64` size assertions on `aarch64`, tooZalathar-2/+2
This makes it easier for contributors on aarch64 workstations (e.g. Macs) to notice when these assertions have been violated.
2024-03-27Remove `Ord` from `Ty`, `Const`, and `Region`Oli Scherer-2/+2
2024-03-14Add compiler support for parsing `f16` and `f128`Trevor Gross-1/+43
2024-03-11Rename `IntoDiagnosticArg` as `IntoDiagArg`.Nicholas Nethercote-6/+6
Also rename `into_diagnostic_arg` as `into_diag_arg`, and `NotIntoDiagnosticArg` as `NotInotDiagArg`.
2024-02-28Rename `DiagnosticArg{,Map,Name,Value}` as `DiagArg{,Map,Name,Value}`.Nicholas Nethercote-4/+4
2024-02-15Replace `NonZero::<_>::new` with `NonZero::new`.Markus Reiter-13/+10
2024-02-15Use generic `NonZero` internally.Markus Reiter-12/+15
2024-02-05Rollup merge of #116284 - RalfJung:no-nan-match, r=cjgillotMatthias Krüger-27/+44
make matching on NaN a hard error, and remove the rest of illegal_floating_point_literal_pattern These arms would never be hit anyway, so the pattern makes little sense. We have had a future-compat lint against float matches in general for a *long* time, so I hope we can get away with immediately making this a hard error. This is part of implementing https://github.com/rust-lang/rfcs/pull/3535. Closes https://github.com/rust-lang/rust/issues/41620 by removing the lint. https://github.com/rust-lang/reference/pull/1456 updates the reference to match.
2024-01-30Remove the lifetime from `DiagnosticArgValue`.Nicholas Nethercote-2/+2
Because it's almost always static. This makes `impl IntoDiagnosticArg for DiagnosticArgValue` trivial, which is nice. There are a few diagnostics constructed in `compiler/rustc_mir_build/src/check_unsafety.rs` and `compiler/rustc_mir_transform/src/errors.rs` that now need symbols converted to `String` with `to_string` instead of `&str` with `as_str`, but that' no big deal, and worth it for the simplifications elsewhere.
2024-01-26make matching on NaN a hard errorRalf Jung-27/+44
2023-12-15Annotate some more bugsMichael Goulet-2/+2
2023-12-07ctfe interpreter: extend provenance so that it can track whether a pointer ↵Ralf Jung-2/+2
is immutable
2023-11-20Uplift InferConst to rustc_type_irMichael Goulet-26/+0
2023-10-24Get rid of 'tcx on ConstVid, EffectVidMichael Goulet-4/+4
2023-09-18Remove unused `Lift` derives.Nicholas Nethercote-1/+1
I found these by commenting out all `Lift` derives and then adding back the ones that were necessary to successfully compile.
2023-09-14found another place where we can eval() a const, and go through valtreesRalf Jung-5/+0
2023-09-13restore the old logic adjusting ty::UnevaluatedConst before evaluationRalf Jung-1/+34
2023-09-11Rollup merge of #115727 - fee1-dead-contrib:effect-fallback, r=oli-obkMatthias Krüger-1/+8
Implement fallback for effect param r? `@oli-obk` or `@lcnr` tracking issue for this ongoing work: https://github.com/rust-lang/rust/issues/110395
2023-09-10Implement fallback for effect paramDeadbeef-1/+8
2023-09-06Support a few more rvalues.Camille GILLOT-0/+5
2023-07-30inline format!() args up to and including rustc_middleMatthias Krüger-2/+2
2023-07-17Rollup merge of #113539 - agnarrarendelle:master, r=workingjubileeMatthias Krüger-1/+1
fixed typo Hi, I have fixed a few typos in commands. Please review my pr.
2023-07-14refactor(rustc_middle): Substs -> GenericArgMahdi Dibaiee-5/+5
2023-07-12Re-format let-else per rustfmt updateMark Rousskov-1/+1
2023-07-12fixed typosagnarrarendelle-1/+1
2023-07-06Add a new trait to `Debug` things with an infcx availableBoxy-2/+2
2023-07-05Deal with falloutBoxy-8/+1
2023-07-05move `ConstKind` to typeir and move inherent impls to `Const`Boxy-194/+3
2023-06-01Use translatable diagnostics in `rustc_const_eval`Deadbeef-0/+9
2023-05-16format `Const`'s less verboselyBoxy-2/+2
2023-05-15Suppress "erroneous constant used" for constants tainted by errorsTomasz Miąsko-2/+2
When constant evaluation fails because its MIR is tainted by errors, suppress note indicating that erroneous constant was used, since those errors have to be fixed regardless of the constant being used or not.