summary refs log tree commit diff
path: root/tests/ui/const-generics/generic_const_exprs
AgeCommit message (Collapse)AuthorLines
2025-06-18Rollup merge of #141610 - BoxyUwU:stabilize_generic_arg_infer, ↵Jakub Beránek-8/+4
r=lcnr,traviscross Stabilize `feature(generic_arg_infer)` Fixes rust-lang/rust#85077 r? lcnr cc ````@rust-lang/project-const-generics````
2025-06-11stabilize gaiBoxy-8/+4
2025-06-07rustc_resolve: Improve `resolve_const_param_in_non_trivial_anon_const` wordingMartin Nordholts-9/+52
In some contexts, const expressions are OK. Add a `here` to the error message to clarify this.
2025-06-02Clarify why we are talking about a failed const eval at a random placeOli Scherer-3/+3
2025-06-02Use the informative error as the main const eval error messageOli Scherer-9/+9
2025-05-23Do not try to confirm non-dyn compatible methodMichael Goulet-40/+3
2025-05-21Fix testsBoxy-10/+61
2025-05-05Do not gather local all together at the beginning of typeckMichael Goulet-17/+17
2025-05-01Set groundwork for proper const normalizationBoxy-10/+5
2025-04-13Rollup merge of #139607 - reddevilmidzy:add-regression-test, r=petrochenkovChris Denton-0/+39
Add regression test for #127424 Fixes: https://github.com/rust-lang/rust/issues/127424 This ICE no longer reproduces, so it appears to have already been fixed. This PR adds a regression test to ensure the issue doesn’t come back in the future. Please let me know if there's anything I should improve or revise!
2025-04-12Add regression test for #127424reddevilmidzy-0/+39
2025-04-07compiletest: Stricter parsing for diagnostic kindsVadim Petrochenkov-17/+17
2025-03-11Implement `#[define_opaque]` attribute for functions.Oli Scherer-4/+4
2025-03-03Don't typeck during WF, instead check outside of WF in check_crateMichael Goulet-6/+6
2025-02-14Trim suggestion parts to the subset that is purely additiveMichael Goulet-8/+8
2025-02-14Use underline suggestions for purely 'additive' replacementsMichael Goulet-24/+16
2025-02-14fallout :skull_emoji:lcnr-25/+25
2025-02-10Show diff suggestion format on verbose replacementEsteban Küber-20/+30
``` error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/attempted-access-non-fatal.rs:7:15 | LL | let _ = 2.l; | ^ | help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix | LL - let _ = 2.l; LL + let _ = 2.0f64; | ```
2025-01-31Rollup merge of #135860 - fmease:compiler-mv-obj-save-dyn-compat-ii, r=jieyouxuMatthias Krüger-5/+5
Compiler: Finalize dyn compatibility renaming Update the Reference link to use the new URL fragment from https://github.com/rust-lang/reference/pull/1666 (this change has finally hit stable). Fixes a FIXME. Follow-up to #130826. Part of #130852. ~~Blocking it on #133372.~~ (merged) r? ghost
2025-01-28Properly check that array length is valid type during built-in unsizing in indexMichael Goulet-0/+2
2025-01-26Compiler: Finalize dyn compatibility renamingLeón Orell Valerian Liehr-5/+5
2025-01-22Auto merge of #135896 - matthiaskrgr:rollup-g6rv7za, r=matthiaskrgrbors-1/+1
Rollup of 9 pull requests Successful merges: - #132983 (Edit dangling pointers ) - #135409 (Fix ICE-133117: multiple never-pattern arm doesn't have false_edge_start_block) - #135557 (Point at invalid utf-8 span on user's source code) - #135596 (Properly note when query stack is being cut off) - #135794 (Detect missing fields with default values and suggest `..`) - #135814 (ci: use ghcr buildkit image) - #135826 (Misc. `rustc_resolve` cleanups) - #135837 (Remove test panic from File::open) - #135856 (Library: Finalize dyn compatibility renaming) r? `@ghost` `@rustbot` modify labels: rollup
2025-01-22Refactor dyn-compatibility error and suggestionsTaylor Cramer-29/+34
This CL makes a number of small changes to dyn compatibility errors: - "object safety" has been renamed to "dyn-compatibility" throughout - "Convert to enum" suggestions are no longer generated when there exists a type-generic impl of the trait or an impl for `dyn OtherTrait` - Several error messages are reorganized for user readability Additionally, the dyn compatibility error creation code has been split out into functions. cc #132713 cc #133267
2025-01-16Properly note when query stack is being cut offMichael Goulet-1/+1
2025-01-11Remove a bunch of diagnostic stashing that doesn't do anythingMichael Goulet-5/+22
2025-01-09Always take the `Ok` path in `lit_to_const` and produce error constants insteadOli Scherer-0/+43
2025-01-01Try to write the panic message with a single `write_all` callJohn Kåre Alsaker-0/+1
2024-12-27Remove the `-test` suffix from normalize directivesZalathar-3/+3
2024-12-18add testslcnr-0/+30
2024-12-09fix ICE on type error in promotedRalf Jung-14/+0
2024-12-06Remove polymorphizationBen Kimock-46/+0
2024-12-01fix ICE when promoted has layout size overflowRalf Jung-0/+14
2024-11-27Rollup merge of #133518 - compiler-errors:structurally-resolve-never, r=lcnrMatthias Krüger-8/+8
Structurally resolve before checking `!` in HIR typeck Some more missing structural resolves in HIR typeck :> r? lcnr
2024-11-27Bless tests due to extra error reporting due to normalizing types that are ↵Michael Goulet-8/+8
not WF It's okay though b/c these are duplicated diagnostics.
2024-11-26Rollup merge of #133471 - lcnr:uwu-gamer, r=BoxyUwUMichael Goulet-0/+64
gce: fix typing_mode mismatch Fixes #133271 r? `@BoxyUwU`
2024-11-25fix gce typing_mode mismatchlcnr-0/+64
2024-11-24Simplify array length mismatch error reportingMichael Goulet-3/+1
2024-11-21Stop being so bail-y in candidate assemblyMichael Goulet-0/+36
2024-11-12Consolidate type system const evaluation under `traits::evaluate_const`Boxy-129/+0
mew
2024-11-03Yeet effects featureMichael Goulet-2/+2
2024-10-29Remove detail from label/note that is already available in other noteEsteban Küber-1/+1
Remove the "which is required by `{root_obligation}`" post-script in "the trait `X` is not implemented for `Y`" explanation in E0277. This information is already conveyed in the notes explaining requirements, making it redundant while making the text (particularly in labels) harder to read. ``` error[E0277]: the trait bound `NotCopy: Copy` is not satisfied --> $DIR/wf-static-type.rs:10:13 | LL | static FOO: IsCopy<Option<NotCopy>> = IsCopy { t: None }; | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `NotCopy` | = note: required for `Option<NotCopy>` to implement `Copy` note: required by a bound in `IsCopy` --> $DIR/wf-static-type.rs:7:17 | LL | struct IsCopy<T:Copy> { t: T } | ^^^^ required by this bound in `IsCopy` ``` vs the prior ``` error[E0277]: the trait bound `NotCopy: Copy` is not satisfied --> $DIR/wf-static-type.rs:10:13 | LL | static FOO: IsCopy<Option<NotCopy>> = IsCopy { t: None }; | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `NotCopy`, which is required by `Option<NotCopy>: Copy` | = note: required for `Option<NotCopy>` to implement `Copy` note: required by a bound in `IsCopy` --> $DIR/wf-static-type.rs:7:17 | LL | struct IsCopy<T:Copy> { t: T } | ^^^^ required by this bound in `IsCopy` ```
2024-10-26Deny calls to non-`#[const_trait]` methods in MIR constckDeadbeef-9/+21
2024-10-15stabilize `-Znext-solver=coherence`lcnr-20/+19
2024-10-11Don't assume traits used as type are trait objsVulnBandit-38/+5
2024-10-10UI tests: Rename "object safe" to "dyn compatible"León Orell Valerian Liehr-12/+12
2024-09-29fix(hir_analysis/wfcheck): don't leak {type error}Barrett Ray-3/+3
avoid `{type error}` being leaked in user-facing messages, particularly when using the `adt_const_params` feature
2024-09-27Rollup merge of #130826 - fmease:compiler-mv-obj-safe-dyn-compat, ↵Matthias Krüger-5/+5
r=compiler-errors Compiler: Rename "object safe" to "dyn compatible" Completed T-lang FCP: https://github.com/rust-lang/lang-team/issues/286#issuecomment-2338905118. Tracking issue: https://github.com/rust-lang/rust/issues/130852 Excludes `compiler/rustc_codegen_cranelift` (to be filed separately). Includes Stable MIR. Regarding https://github.com/rust-lang/rust/labels/relnotes, I guess I will manually open a https://github.com/rust-lang/rust/labels/relnotes-tracking-issue since this change affects everything (compiler, library, tools, docs, books, everyday language). r? ghost
2024-09-25Compiler: Rename "object safe" to "dyn compatible"León Orell Valerian Liehr-5/+5
2024-09-24Ban combination of GCE and new solverMichael Goulet-1/+9
2024-09-22Introduce structurally_normalize_const, use it in hir_typeckMichael Goulet-2/+2