about summary refs log tree commit diff
path: root/tests/crashes
AgeCommit message (Collapse)AuthorLines
2025-07-18Rollup merge of #143271 - cjgillot:gvn-types, r=oli-obkMatthias Krüger-28/+0
Store the type of each GVN value MIR is fully typed, so type information is an integral part of what defines a value. GVN currently tries to circumvent storing types, which creates all sorts of complexities. This PR stores the type along with the enum `Value` when defining a value index. This allows to simplify a lot of code. Fixes rust-lang/rust#128094 Fixes rust-lang/rust#135128 r? ``````@ghost`````` for perf
2025-07-17parse `const trait Trait`Deadbeef-2/+1
2025-07-17Rollup merge of #143895 - compiler-errors:trait-wc-item-bound-host-eff, ↵León Orell Valerian Liehr-28/+0
r=oli-obk Dont collect assoc ty item bounds from trait where clause for host effect predicates For background, we uplift `where Self::Assoc: Trait` bounds in a trait's where clauses into *item bounds* on `type Assoc;`. This is because before we *had* syntactical item bounds, users would express their item bounds like so. Let's opt out of doing this same behavior for `HostEffect` predicates like `where Self::Assoc: [const] Trait`. I left a comment in the code: ```rust // FIXME(const_trait_impl): We *could* uplift the // `where Self::Assoc: [const] Trait` bounds from the parent trait // here too, but we'd need to split `const_conditions` into two // queries (like we do for `trait_explicit_predicates_and_bounds`) // since we need to also filter the predicates *out* of the const // conditions or they lead to cycles in the trait solver when // utilizing these bounds. For now, let's do nothing. ``` As an aside, this was an ICE that was only triggerable when building libraries and not binaries because we never were calling `tcx.ensure_ok().explicit_implied_const_bounds(def_id);` on associated types like we should have been. I adjusted the calls to `ensure_ok` to make sure this happens, so we catch bugs like this in the future more easily. As another aside, I fixed the bound uplifting logic for *always const* predicates, since those act like normal clauses and have no notion of conditional constness. r? ```@oli-obk``` ```@fee1-dead``` or anyone really Fixes rust-lang/rust#133275
2025-07-16const heap: fix ICE on forgotten make_globalRalf Jung-11/+0
2025-07-13Dont collect assoc ty item bounds from trait where clause for host effect ↵Michael Goulet-28/+0
predicates
2025-07-02Move crashes tests.Camille GILLOT-28/+0
2025-07-01Remove support for dyn*Michael Goulet-32/+0
2025-06-28Do not freshen ReErrorMichael Goulet-13/+0
2025-06-27gce: don't ICE on non-local constYotam Ofek-15/+0
2025-06-27Auto merge of #143074 - compiler-errors:rollup-cv64hdh, r=compiler-errorsbors-6/+0
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-26Rollup merge of #142647 - compiler-errors:less-work-in-coherence, r=lcnrMichael Goulet-6/+0
[perf] Compute hard errors without diagnostics in impl_intersection_has_impossible_obligation First compute hard errors without diagnostics, then ambiguities with diagnostics since we need to know if any of them overflowed.
2025-06-26Rollup merge of #142393 - compiler-errors:nofield, r=petrochenkovMatthias Krüger-9/+0
Don't give APITs names with macro expansion placeholder fragments in it The `DefCollector` previously called `pprust::ty_to_string` to construct a name for APITs (arg-position impl traits). The `ast::Ty` that was being formatted however has already had its macro calls replaced with "placeholder fragments", which end up rendering like `!()` (or ICEing, in the case of rust-lang/rust#140333, since it led to a placeholder struct field with no name). Instead, collect the name of the APIT *before* we visit its macros and replace them with placeholders in the macro expander. This makes the implementation a bit more involved, but AFAICT there's no better way to do this since we can't do a reverse mapping from placeholder fragment -> original macro call AST. Fixes rust-lang/rust#140333
2025-06-25Rollup merge of #142976 - compiler-errors:coerce-ice, r=fee1-deadJana Dönszelmann-58/+0
Check CoerceUnsized impl validity before coercing Self-explanatory from the title. Fixes rust-lang/rust#126982 Fixes rust-lang/rust#131048 Fixes rust-lang/rust#134217 Fixes rust-lang/rust#126269 Fixes rust-lang/rust#138265
2025-06-25Don't give APITs names with macro expansion placeholder fragments in itMichael Goulet-9/+0
2025-06-25Compute hard errors without diagnostics in ↵Michael Goulet-6/+0
impl_intersection_has_impossible_obligation
2025-06-25tests: s/C-cmse/cmse/Jubilee Young-2/+2
2025-06-24Check CoerceUnsized impl validity before coercingMichael Goulet-58/+0
2025-06-23tests: Adopt ABI transmute tests from crashtestsJubilee Young-7/+0
2025-06-23tests: Enhance unsupported ABI testsJubilee Young-10/+0
We have fairly different error messages now and handle more cases, so we augment the test in tests/ui/abi/unsupported.rs with more examples to handle structs, traits, and impls on same when those feature the unsupported ABIs of interest.
2025-06-21Auto merge of #142546 - cjgillot:reachable-jump, r=compiler-errorsbors-9/+0
Only traverse reachable blocks in JumpThreading. Fixes https://github.com/rust-lang/rust/issues/131451 We only compute loop headers for reachable blocks. We shouldn't try to perform an opt on unreachable blocks anyway.
2025-06-18Rollup merge of #140247 - BoxyUwU:iats_no_query_cycles, r=lcnrTrevor Gross-48/+0
Don't build `ParamEnv` and do trait solving in `ItemCtxt`s when lowering IATs Fixes rust-lang/rust#108491 Fixes rust-lang/rust#125879 This was due to updating inhabited predicate stuff which I had to do to make constructing ADTs with IATs in fields not ICE Fixes rust-lang/rust#136678 (but no test added, I don't rly care about weird IAT edge cases under GCE) Fixes rust-lang/rust#138131 Avoids doing "fully correct" candidate selection for IATs during hir ty lowering when in item signatures as it almost always leads to a query cycle from trying to build a `ParamEnv`. I replaced it with a use `DeepRejectCtxt` which should be able to handle this kind of conservative "could these types unify" while in a context where we don't want to do type equality. This is a relatively simple scheme and should be forwards compatible with doing something more complex/powerful. I'm not really sure how this interacts with rust-lang/rust#126651, though I'm also not really sure its super important to support projecting IATs from IAT self types given we don't even support `T::Assoc::Other` for trait-associated types so didn't give much thought to how this might fit in with that. r? `@compiler-errors` cc `@fmease`
2025-06-18Rollup merge of #141610 - BoxyUwU:stabilize_generic_arg_infer, ↵Jakub Beránek-1/+1
r=lcnr,traviscross Stabilize `feature(generic_arg_infer)` Fixes rust-lang/rust#85077 r? lcnr cc ````@rust-lang/project-const-generics````
2025-06-17Dont replace escaping bound vars in item sigsBoxy-15/+0
2025-06-17Don't build `ParamEnv` and do trait solving in `ItemCtxt`sBoxy-39/+6
2025-06-16tests: `{Meta,Pointee}Sized` in non-minicore testsDavid Wood-2/+4
As before, add `MetaSized` and `PointeeSized` traits to all of the non-minicore `no_core` tests so that they don't fail for lack of language items.
2025-06-15Rollup merge of #142347 - azhogin:azhogin/async-drop-storage-live-dead-fix, ↵León Orell Valerian Liehr-13/+0
r=oli-obk Async drop - fix for StorageLive/StorageDead codegen for pinned future Fixes: rust-lang/rust#140429, Fixes: rust-lang/rust#140531, Fixes: rust-lang/rust#141761, Fixes: rust-lang/rust#141409. StorageLive/StorageDead codegen is corrected for pinned async drop future.
2025-06-15Only traverse reachable blocks in JumpThreading.Camille GILLOT-9/+0
2025-06-14Rollup merge of #141811 - mejrs:bye_locals, r=compiler-errorsMatthias Krüger-16/+0
Unimplement unsized_locals Implements https://github.com/rust-lang/compiler-team/issues/630 Tracking issue here: https://github.com/rust-lang/rust/issues/111942 Note that this just removes the feature, not the implementation, and does not touch `unsized_fn_params`. This is because it is required to support `Box<dyn FnOnce()>: FnOnce()`. There may be more that should be removed (possibly in follow up prs) - the `forget_unsized` function and `forget` intrinsic. - the `unsized_locals` test directory; I've just fixed up the tests for now - various codegen support for unsized values and allocas cc ``@JakobDegen`` ``@oli-obk`` ``@Noratrieb`` ``@programmerjake`` ``@bjorn3`` ``@rustbot`` label F-unsized_locals Fixes rust-lang/rust#79409
2025-06-14Async drop - fix for StorageLive/StorageDead codegen for pinned async drop ↵Andrew Zhogin-13/+0
future
2025-06-13Require generic params for const generic paramsOli Scherer-38/+0
2025-06-13Unimplement unsized_localsmejrs-16/+0
2025-06-11stabilize gaiBoxy-1/+1
2025-06-10Rollup merge of #142240 - fee1-dead-contrib:push-zkkzoxlymslv, r=oli-obkLeón Orell Valerian Liehr-5/+0
deduplicate the rest of AST walker functions After this, we can tidy things up and deduplicate the visitor traits themselves too. Fixes rust-lang/rust#139825, apparently r? ``@oli-obk``
2025-06-09deduplicate the rest of AST walker functionsDeadbeef-5/+0
2025-06-09early return in trait detection for non-trait itembohan-10/+0
2025-06-08Auto merge of #142074 - oli-obk:its-finally-gone, r=petrochenkovbors-14/+0
Remove CollectItemTypesVisitor I always felt like we were very unnecessarily walking the HIR, let's see if perf agrees There is lots to ~~improve~~ consolidate further here, as we still have 3 item wfchecks: * check_item (matching on the hir::ItemKind) * actually doing trait solver based checks (by using HIR spans) * lower_item (matching on the hir::ItemKind after loading it again??) * just ensure_ok-ing a bunch of queries * check_item_type (matching on DefKind) * some type based checks, mostly ensure_ok-ing a bunch of queries fixes rust-lang/rust#121429
2025-06-06Treat normalizing consts like normalizing types in deeply normalizeMichael Goulet-14/+0
2025-06-05Move generic arg checks from the hir item types visitor to ty wfcheckOli Scherer-14/+0
2025-06-04Rollup merge of #141932 - azhogin:azhogin/async-drop-inside-asyncgen-fix, ↵Matthias Krüger-8/+0
r=oli-obk Fix for async drop inside async gen fn Return value (for yield) is corrected for async drop inside async gen function. In CFG, when internal async drop future is polled and returned `Poll<()>::Pending`, then async gen resume function returns `Poll<(OptRet)>::Pending`. Fixes rust-lang/rust#140530
2025-06-04Fix for async drop inside async gen fnAndrew Zhogin-8/+0
2025-06-03Rollup merge of #141677 - ↵Matthias Krüger-28/+0
azhogin:azhogin/async-drop-unexpected-type-instead-of-drop-fn-fix, r=oli-obk Async drop - type instead of async drop fn, fixes #140484 Fixes: rust-lang/rust#140484 Fixes: rust-lang/rust#140500 Fixes ICE, when type is provided in AsyncDrop trait instead of `async fn drop()`. Fixes ICE, when async drop fn has wrong signature.
2025-06-02allow macro_use as first segmentbohan-3/+0
2025-06-01Async drop - type instead of async drop fn and incorrect drop signature ↵Andrew Zhogin-28/+0
don't ICE now
2025-05-30Rollup merge of #141004 - matthewjasper:unicode-before-expansion, r=davidtwcoMatthias Krüger-18/+0
Report text_direction_codepoint_in_literal when parsing The lint is now reported in code that gets removed/modified/duplicated by macro expansion, and spans are more accurate so we don't get ICEs from trying to split a span in the middle of a character. This removes support for lint level attributes for `text_direction_codepoint_in_literal` except at the crate level, I don't think that there's an easy way around this when the lint can be reported on code that's removed by `cfg` or that is only in the input of a macro. Fixes #140281
2025-05-28Fix ICE in tokenstream with contracts from parser recoveryyukang-5/+0
2025-05-27Warn on non-crate level text direction lintsMatthew Jasper-18/+0
2025-05-23Auto merge of #140553 - BoxyUwU:defer_type_system_ctfe, r=compiler-errorsbors-50/+0
Defer evaluating type system constants when they use infers or params Split out of #137972, the parts necessary for associated const equality and min generic const args to make progress and have correct semantics around when CTFE is invoked. According to a [previous perf run](https://perf.rust-lang.org/compare.html?start=93257e2d20809d82d1bc0fcc1942480d1a66d7cd&end=01b4cbf0f47c3f782330db88fa5ba199bba1f8a2&stat=instructions:u) of adding the new `const_arg_kind` query we should expect minor regressions here. I think this is acceptable as we should be able to remove this query relatively soon once mgca is more complete as we'll then be able to implement GCE in terms of mgca and rip out `GCEConst` at which point it's trivial to determine what kind of anon const we're dealing with (either it has generics and is a repeat expr hack, or it doesnt and is a normal anon const). This should only affect unstable code as we handle repeat exprs specially and those are the only kinds of type system consts that are allowed to make use of generic parameters. Fixes #133066 Fixes #133199 Fixes #136894 Fixes #137813 r? compiler-errors
2025-05-22Auto merge of #141396 - matthiaskrgr:rollup-feg050g, r=matthiaskrgrbors-14/+0
Rollup of 7 pull requests Successful merges: - #135562 (Add ignore value suggestion in closure body) - #139635 (Finalize repeat expr inference behaviour with inferred repeat counts) - #139668 (Handle regions equivalent to 'static in non_local_bounds) - #140218 (HIR ty lowering: Clean up & refactor the lowering of type-relative paths) - #140435 (use uX::from instead of _ as uX in non - const contexts) - #141130 (rustc_on_unimplemented cleanups) - #141286 (Querify `coroutine_hidden_types`) Failed merges: - #140247 (Don't build `ParamEnv` and do trait solving in `ItemCtxt`s when lowering IATs) r? `@ghost` `@rustbot` modify labels: rollup
2025-05-22Rollup merge of #141362 - BoxyUwU:correct_error_term_kind, r=lcnrMatthias Krüger-8/+0
Normalize aliases to correct kind of error term Fixes #140642 When normalizing an alias to an error in the old solver, normalize to the same term kind as the alias being normalized instead of always to a type error. r? lcnr
2025-05-22Rollup merge of #139668 - matthewjasper:upper-bound-fix, r=compiler-errorsMatthias Krüger-14/+0
Handle regions equivalent to 'static in non_local_bounds `non_local_bounds` would only find non local bounds that strictly bound a given region, but it's possible that a local region is equated to 'static when showing a type referencing a locally bound lifetime, such as `dyn Any + 'a` in the tests added, is well-formed. In this case we should return 'static. closes #122704 closes #139004