about summary refs log tree commit diff
path: root/tests/ui/const-generics/generic_const_exprs
AgeCommit message (Collapse)AuthorLines
2025-07-29Add a regression test for an ICE with the `generic_const_exprs` feature ↵Jacob Adam-0/+42
attribute. It ensures that using the `generic_const_exprs` feature in a library crate without enabling it in a dependent crate does not lead to an ICE.
2025-07-20Consider parent predicates in ImpossiblePredicates pass.Camille GILLOT-9/+17
2025-06-30Unconditionally run `check_item_type` on all itemsOli Scherer-13/+27
2025-06-27gce: don't ICE on non-local constYotam Ofek-0/+20
2025-06-27Auto merge of #143074 - compiler-errors:rollup-cv64hdh, r=compiler-errorsbors-4/+40
Rollup of 18 pull requests Successful merges: - rust-lang/rust#137843 (make RefCell unstably const) - rust-lang/rust#140942 (const-eval: allow constants to refer to mutable/external memory, but reject such constants as patterns) - rust-lang/rust#142549 (small iter.intersperse.fold() optimization) - rust-lang/rust#142637 (Remove some glob imports from the type system) - rust-lang/rust#142647 ([perf] Compute hard errors without diagnostics in impl_intersection_has_impossible_obligation) - rust-lang/rust#142700 (Remove incorrect comments in `Weak`) - rust-lang/rust#142927 (Add note to `find_const_ty_from_env`) - rust-lang/rust#142967 (Fix RwLock::try_write documentation for WouldBlock condition) - rust-lang/rust#142986 (Port `#[export_name]` to the new attribute parsing infrastructure) - rust-lang/rust#143001 (Rename run always ) - rust-lang/rust#143010 (Update `browser-ui-test` version to `0.20.7`) - rust-lang/rust#143015 (Add `sym::macro_pin` diagnostic item for `core::pin::pin!()`) - rust-lang/rust#143033 (Expand const-stabilized API links in relnotes) - rust-lang/rust#143041 (Remove cache for citool) - rust-lang/rust#143056 (Move an ACE test out of the GCI directory) - rust-lang/rust#143059 (Fix 1.88 relnotes) - rust-lang/rust#143067 (Tracking issue number for `iter_macro`) - rust-lang/rust#143073 (Fix some fixmes that were waiting for let chains) Failed merges: - rust-lang/rust#143020 (codegen_fn_attrs: make comment more precise) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-26const-eval: allow constants to refer to mutable/external memory, but reject ↵Ralf Jung-4/+40
such constants as patterns
2025-06-24Make missing lifetime suggestion verboseMichael Goulet-2/+5
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