rust/compiler
bors cd7cbe818e Auto merge of #142071 - lcnr:revealing-use, r=compiler-errors
`apply_member_constraints`: fix placeholder check

Checking whether the member region is *an existential region from a higher universe* is just wrong and I am pretty sure we've added that check by accident as the naming was just horribly confusing before rust-lang/rust#140466.

I've encountered this issue separately while working on rust-lang/rust#139587, but feel like it's probably easier to separately FCP this change. This allows the following code to compile
```rust
trait Proj<'a> {
    type Assoc;
}
impl<'a, 'b, F: FnOnce() -> &'b ()> Proj<'a> for F {
    type Assoc = ();
}

fn is_proj<F: for<'a> Proj<'a>>(f: F) {}
fn define<'a>() -> impl Sized + use<'a> {
    // This adds a use of `opaque::<'a>` with hidden type `&'unconstrained_b ()`.
    // 'unconstrained_b is an inference variable from a higher universe as it gets
    // created inside of the binder of `F: for<'a> Proj<'a>`. This previously
    // caused us to not apply member constraints. We now do, constraining
    // it to `'a`.
    is_proj(define::<'a>);
    &()
}

fn main() {}
```

This should not be breaking change, even in theory. Applying member constraints is incomplete in rare circumstances which means that applying them in more cases can cause spurious errors, cc rust-lang/rust#140569/rust-lang/rust#142073. However, as we always skipped these member regions in `apply_member_constraints` the skipped region is guaranteed to cause an error in `check_member_constraints` later on.
2025-08-15 18:52:12 +00:00
..
rustc rename stable_mir to rustc_public, and rustc_smir to rustc_public_bridge 2025-07-14 09:25:54 +00:00
rustc_abi Reuse sign_extend helper 2025-07-29 14:17:48 +00:00
rustc_arena Introduce Arena::try_alloc_from_iter. 2025-04-19 01:13:18 +00:00
rustc_ast Extract ast TraitImplHeader 2025-08-11 17:05:36 -05:00
rustc_ast_ir Tidy up Cargo.toml files. 2025-07-31 19:58:04 +10:00
rustc_ast_lowering Pass the target type down to parse_attribute_list 2025-08-14 18:11:56 +02:00
rustc_ast_passes Rollup merge of #143075 - workingjubilee:interrupts-may-return-nevermore, r=davidtwco 2025-08-15 16:16:31 +10:00
rustc_ast_pretty Extract ast TraitImplHeader 2025-08-11 17:05:36 -05:00
rustc_attr_parsing Specify the list of allowed targets per attribute 2025-08-14 18:18:22 +02:00
rustc_baked_icu_data Add unreachable_pub to RUSTC_LINT_FLAGS for compiler/ crates. 2025-03-11 13:14:21 +11:00
rustc_borrowck Auto merge of #142071 - lcnr:revealing-use, r=compiler-errors 2025-08-15 18:52:12 +00:00
rustc_builtin_macros Rollup merge of #142640 - Sa4dUs:ad-intrinsic, r=ZuseZ4 2025-08-15 16:16:30 +10:00
rustc_codegen_cranelift Port the #[linkage] attribute to the new attribute system 2025-08-13 21:01:37 +02:00
rustc_codegen_gcc Complete functionality and general cleanup 2025-08-14 16:30:15 +00:00
rustc_codegen_llvm Rollup merge of #145275 - StackOverflowExcept1on:fix-wasm32v1-none, r=alexcrichton 2025-08-15 16:16:38 +10:00
rustc_codegen_ssa Rollup merge of #145004 - bjorn3:remove_unused_fields, r=WaffleLapkin 2025-08-15 16:16:33 +10:00
rustc_const_eval Rollup merge of #145266 - camsteffen:reduce-queries, r=petrochenkov 2025-08-14 11:39:38 +02:00
rustc_data_structures Allow pretty printing paths with -Zself-profile-events=args 2025-07-25 22:24:21 +02:00
rustc_driver Remove recursion_limit increases. 2025-04-02 16:25:27 +11:00
rustc_driver_impl Tidy up Cargo.toml files. 2025-07-31 19:58:04 +10:00
rustc_error_codes Rollup merge of #144944 - He1pa:E0793, r=compiler-errors 2025-08-15 16:16:32 +10:00
rustc_error_messages Remove unused feature gates 2025-06-28 23:36:46 +00:00
rustc_errors Rollup merge of #137872 - estebank:extra-vert, r=compiler-errors 2025-08-14 21:48:41 +02:00
rustc_expand Rollup merge of #145153 - joshtriplett:macro-kinds-plural, r=petrochenkov 2025-08-13 18:43:01 +02:00
rustc_feature Stabilize sse4a and tbm target features 2025-08-14 02:07:40 +05:30
rustc_fluent_macro Remove all unused feature gates from the compiler 2025-06-08 14:50:42 +00:00
rustc_fs_util Retry if creating temp fails with access denied 2025-04-25 11:28:36 +00:00
rustc_graphviz Remove #![warn(unreachable_pub)] from all compiler/ crates. 2025-03-11 13:14:21 +11:00
rustc_hashes Revert "Use workspace lints for crates in compiler/ #138084" 2025-03-10 18:12:47 +08:00
rustc_hir Remove the old target checking logic 2025-08-14 18:18:42 +02:00
rustc_hir_analysis Rollup merge of #145235 - compiler-errors:comment, r=BoxyUwU 2025-08-15 16:16:38 +10:00
rustc_hir_pretty Propagate TraitImplHeader to hir 2025-08-11 17:05:42 -05:00
rustc_hir_typeck Rollup merge of #145235 - compiler-errors:comment, r=BoxyUwU 2025-08-15 16:16:38 +10:00
rustc_incremental Auto merge of #139758 - Zoxc:thread-local-graph, r=oli-obk 2025-05-07 12:39:54 +00:00
rustc_index Tidy up Cargo.toml files. 2025-07-31 19:58:04 +10:00
rustc_index_macros Tidy up Cargo.toml files. 2025-07-31 19:58:04 +10:00
rustc_infer remove from_forall 2025-08-11 09:18:46 +02:00
rustc_interface Fix parallel rustc not being reproducible due to unstable sorting of items. 2025-08-13 08:59:32 +08:00
rustc_lexer test(lexer): Add frontmatter unit test 2025-07-10 10:25:29 -05:00
rustc_lint Fix wrong spans with external macros in the dropping_copy_types lint 2025-08-15 11:59:23 +02:00
rustc_lint_defs Rollup merge of #144865 - WaffleLapkin:track-tail, r=lqd 2025-08-15 16:16:31 +10:00
rustc_llvm Auto merge of #145093 - nikic:dead-on-return, r=nnethercote 2025-08-13 04:18:43 +00:00
rustc_log Add documentation for init_logger_with_additional_layer 2025-06-12 12:11:15 +02:00
rustc_macros cleanup: Remove useless [T].iter().last() 2025-08-14 16:28:56 +00:00
rustc_metadata Switch to a bitflags MacroKinds to support macros with more than one kind 2025-08-12 09:24:45 -07:00
rustc_middle Auto merge of #145423 - Zalathar:rollup-9jtefpl, r=Zalathar 2025-08-15 09:13:10 +00:00
rustc_mir_build Auto merge of #145423 - Zalathar:rollup-9jtefpl, r=Zalathar 2025-08-15 09:13:10 +00:00
rustc_mir_dataflow Escape diff strings in graphviz 2025-08-08 00:20:55 -05:00
rustc_mir_transform Rollup merge of #145392 - Zalathar:create-mappings, r=petrochenkov 2025-08-15 16:16:43 +10:00
rustc_monomorphize Rollup merge of #144865 - WaffleLapkin:track-tail, r=lqd 2025-08-15 16:16:31 +10:00
rustc_next_trait_solver update comment 2025-08-14 16:07:24 +02:00
rustc_parse Rollup merge of #145378 - xizheyin:144968, r=davidtwco 2025-08-15 16:16:41 +10:00
rustc_parse_format update to literal-escaper-0.0.5 2025-07-08 10:16:44 +00:00
rustc_passes Remove the old target checking logic 2025-08-14 18:18:42 +02:00
rustc_pattern_analysis avoid unnecessary type sanity checks 2025-08-14 09:44:22 +02:00
rustc_privacy Propagate TraitImplHeader to hir 2025-08-11 17:05:42 -05:00
rustc_proc_macro Tidy up Cargo.toml files. 2025-07-31 19:58:04 +10:00
rustc_public fix missing parenthesis in pretty discriminant 2025-08-09 01:35:50 +08:00
rustc_public_bridge Remove useless lifetime parameter. 2025-07-23 23:54:37 +00:00
rustc_query_impl Remove unused allow attrs 2025-07-07 12:58:16 +00:00
rustc_query_system remove rustc_attr_data_structures 2025-07-31 14:19:27 +02:00
rustc_resolve Rollup merge of #145369 - estebank:issue-145367, r=compiler-errors 2025-08-15 16:16:40 +10:00
rustc_sanitizers rename TraitRef::from_method to from_assoc 2025-08-09 14:22:01 +08:00
rustc_serialize use div_ceil instead of manual logic 2025-07-05 10:55:42 +02:00
rustc_session Rollup merge of #145408 - Kobzol:deduplicate-search-paths, r=petrochenkov 2025-08-15 16:03:58 +02:00
rustc_span Basic implementation of autodiff intrinsic 2025-08-14 16:29:58 +00:00
rustc_symbol_mangling Rollup merge of #144949 - nnethercote:more-Printer-cleanups, r=davidtwco 2025-08-13 18:42:59 +02:00
rustc_target Rollup merge of #145004 - bjorn3:remove_unused_fields, r=WaffleLapkin 2025-08-15 16:16:33 +10:00
rustc_thread_pool Drop rust-version from rustc_thread_pool 2025-08-04 15:03:49 -07:00
rustc_trait_selection Rollup merge of #145235 - compiler-errors:comment, r=BoxyUwU 2025-08-15 16:16:38 +10:00
rustc_traits Auto merge of #144446 - nnethercote:opt-region-constraints, r=lcnr 2025-08-01 04:06:21 +00:00
rustc_transmute Tidy up Cargo.toml files. 2025-07-31 19:58:04 +10:00
rustc_ty_utils use ty::Value instead of manual pairs of types and valtrees 2025-08-14 09:44:22 +02:00
rustc_type_ir ignore head usages of ignored candidates 2025-08-14 14:38:00 +02:00
rustc_type_ir_macros Split TypeFolder and FallibleTypeFolder 2025-04-15 18:30:35 +00:00