rust/compiler/rustc_middle/src
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
..
dep_graph Move DepKind to rustc_query_system and define it as u16 2023-09-21 17:06:14 +02:00
hir Auto merge of #116849 - oli-obk:error_shenanigans, r=cjgillot 2023-10-23 09:59:40 +00:00
hooks Rename hook. 2023-11-01 16:49:18 +00:00
infer No lifetime on PlaceholderConst 2023-11-04 17:36:44 +00:00
middle Add method for checking if deprecation is a rustc version 2023-10-30 17:13:38 -07:00
mir Auto merge of #117507 - nnethercote:rustc_span, r=Nilstrieb 2023-11-03 14:57:40 +00:00
query Turn const_caller_location from a query to a hook 2023-10-31 16:15:18 +00:00
thir Address review comments 2023-10-16 15:58:01 +00:00
traits Auto merge of #117507 - nnethercote:rustc_span, r=Nilstrieb 2023-11-03 14:57:40 +00:00
ty Auto merge of #117589 - compiler-errors:global-vars-bug, r=jackh726 2023-11-05 03:58:09 +00:00
util Merge ExternProviders into the general Providers struct 2023-09-22 20:15:34 +00:00
arena.rs use global cache when computing proof trees 2023-11-02 10:41:27 +01:00
error.rs don't point at const usage site for resolution-time errors 2023-09-14 22:34:05 +02:00
lib.rs s/generator/coroutine/ 2023-10-20 21:14:01 +00:00
lint.rs Remove support for compiler plugins. 2023-11-04 08:50:46 +11:00
macros.rs Rename CloneLiftImpls as TrivialLiftImpls. 2023-09-18 09:37:09 +10:00
metadata.rs rustc_metadata: Remove Span from ModChild 2023-04-18 17:25:04 +03:00
tests.rs
thir.rs Auto merge of #114208 - GKFX:offset_of_enum, r=wesleywiser 2023-11-01 14:17:56 +00:00
values.rs Format all the let chains in compiler 2023-10-13 08:59:36 +00:00