rust/compiler
bors f64d028196 Auto merge of #117589 - compiler-errors:global-vars-bug, r=jackh726
Make sure that predicates with unmentioned bound vars are still considered global in the old solver

In the old solver, we consider predicates with late-bound vars to not be "global":
9c8a2694fa/compiler/rustc_trait_selection/src/traits/select/mod.rs (L1840-L1844)

The implementation of `has_late_bound_vars` was modified in #115834 so that we'd properly anonymize binders that had late-bound vars but didn't reference them. This fixed an ICE.

However, this also led to a behavioral change in https://github.com/rust-lang/rust/issues/117056#issuecomment-1775014545 for a couple of crates, which now consider `for<'a> GL33: Shader` (note the binder var that is *not* used in the predicate) to not be "global". This forces associated types to not be normalizable due to the old trait solver being dumb.

This PR distinguishes types which *reference* late-bound vars and binders which *have* late-bound vars. The latter is represented with the new type flag `TypeFlags::HAS_BINDER_VARS`, which is used when we only care about knowing whether binders have vars in their bound var list (even if they're not used, like for binder anonymization).

This should fix (after beta backport) the `luminance-gl` and `luminance-webgl` crates in #117056.

r? types
**(priority is kinda high on a review here given beta becomes stable on November 16.)**
2023-11-05 03:58:09 +00:00
..
rustc Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_abi Update MIR tests for offset_of 2023-10-31 23:26:02 +00:00
rustc_arena Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_ast Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_ast_lowering Minimize pub usage in source_map.rs. 2023-11-02 19:35:00 +11:00
rustc_ast_passes Test the multispan case in tests.ui/bounds-lifetime.rs. 2023-10-31 08:01:02 +11:00
rustc_ast_pretty Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_attr Auto merge of #117377 - dtolnay:deprecatedsince, r=cjgillot 2023-10-31 10:42:24 +00:00
rustc_baked_icu_data Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_borrowck Minimize pub usage in source_map.rs. 2023-11-02 19:35:00 +11:00
rustc_builtin_macros Minimize pub usage in source_map.rs. 2023-11-02 19:35:00 +11:00
rustc_codegen_cranelift Remove support for compiler plugins. 2023-11-04 08:50:46 +11:00
rustc_codegen_gcc Remove libc dependency in cg_gcc alloc_system example 2023-11-02 21:03:27 +01:00
rustc_codegen_llvm Rollup merge of #117554 - durin42:llvm-delete-dead-zext-code, r=nikic 2023-11-04 12:44:45 +09:00
rustc_codegen_ssa Minimize pub usage in source_map.rs. 2023-11-02 19:35:00 +11:00
rustc_const_eval Auto merge of #117507 - nnethercote:rustc_span, r=Nilstrieb 2023-11-03 14:57:40 +00:00
rustc_data_structures Use filter_map in try_par_for_each_in 2023-11-03 09:17:16 -07:00
rustc_driver Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_driver_impl Remove support for compiler plugins. 2023-11-04 08:50:46 +11:00
rustc_error_codes Remove support for compiler plugins. 2023-11-04 08:50:46 +11:00
rustc_error_messages Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_errors Rollup merge of #117397 - compiler-errors:dont-emit-good-path-on-panic, r=TaKO8Ki 2023-11-01 11:29:41 +01:00
rustc_expand Replace two create_default_session_if_not_set_then uses. 2023-11-02 19:35:04 +11:00
rustc_feature Remove support for compiler plugins. 2023-11-04 08:50:46 +11:00
rustc_fluent_macro Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_fs_util Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_graphviz Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_hir Replace two create_default_session_if_not_set_then uses. 2023-11-02 19:35:04 +11:00
rustc_hir_analysis Auto merge of #117540 - matthiaskrgr:baby_dont_clone_me_dont_clone_me_no_more, r=est31 2023-11-04 00:29:52 +00:00
rustc_hir_pretty Rollup merge of #117068 - nnethercote:clean-up-Cargo-toml, r=wesleywiser 2023-10-30 17:33:15 +01:00
rustc_hir_typeck Minimize pub usage in source_map.rs. 2023-11-02 19:35:00 +11:00
rustc_incremental Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_index Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_infer fallback for construct_generic_bound_failure 2023-11-04 22:15:22 +08:00
rustc_interface Remove support for compiler plugins. 2023-11-04 08:50:46 +11:00
rustc_lexer Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_lint Remove support for compiler plugins. 2023-11-04 08:50:46 +11:00
rustc_lint_defs Remove support for compiler plugins. 2023-11-04 08:50:46 +11:00
rustc_llvm Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_log Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_macros Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_metadata Remove support for compiler plugins. 2023-11-04 08:50:46 +11:00
rustc_middle Auto merge of #117589 - compiler-errors:global-vars-bug, r=jackh726 2023-11-05 03:58:09 +00:00
rustc_mir_build Suggest to set lint level on whole match 2023-11-04 14:44:00 +01:00
rustc_mir_dataflow Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_mir_transform Auto merge of #113343 - saethlin:looser-alignment, r=RalfJung 2023-11-04 19:17:02 +00:00
rustc_monomorphize Minimize pub usage in source_map.rs. 2023-11-02 19:35:00 +11:00
rustc_parse Auto merge of #117507 - nnethercote:rustc_span, r=Nilstrieb 2023-11-03 14:57:40 +00:00
rustc_parse_format Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_passes Remove support for compiler plugins. 2023-11-04 08:50:46 +11:00
rustc_privacy Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_query_impl Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_query_system Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_resolve Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_serialize Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_session Auto merge of #117507 - nnethercote:rustc_span, r=Nilstrieb 2023-11-03 14:57:40 +00:00
rustc_smir Auto merge of #114208 - GKFX:offset_of_enum, r=wesleywiser 2023-11-01 14:17:56 +00:00
rustc_span Auto merge of #117507 - nnethercote:rustc_span, r=Nilstrieb 2023-11-03 14:57:40 +00:00
rustc_symbol_mangling Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_target Auto merge of #117307 - taiki-e:espidf-atomic-64, r=Amanieu 2023-11-01 16:39:22 +00:00
rustc_trait_selection Rollup merge of #117583 - compiler-errors:placeholderconst-lifetime, r=cjgillot 2023-11-04 21:38:30 +01:00
rustc_traits Auto merge of #117507 - nnethercote:rustc_span, r=Nilstrieb 2023-11-03 14:57:40 +00:00
rustc_transmute Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_ty_utils review + add tests 2023-11-02 18:16:37 +01:00
rustc_type_ir Make sure that predicates with unmentioned bound vars are still considered global in the old solver 2023-11-04 20:36:21 +00:00
stable_mir Auto merge of #114208 - GKFX:offset_of_enum, r=wesleywiser 2023-11-01 14:17:56 +00:00