diff options
| author | bors <bors@rust-lang.org> | 2023-01-19 16:49:06 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-01-19 16:49:06 +0000 |
| commit | 4c83bd03a9d94af35c97a6b8b595d40e291af84a (patch) | |
| tree | a6e6436760b003ddd16d6e6b9f67f3f7ecfa340c /compiler/rustc_middle | |
| parent | 19423b59440f464c6cbe6be442d447e37b50fe3c (diff) | |
| parent | 7e0b1f11154bc5e9af996b821b2c28680c3f46c8 (diff) | |
| download | rust-4c83bd03a9d94af35c97a6b8b595d40e291af84a.tar.gz rust-4c83bd03a9d94af35c97a6b8b595d40e291af84a.zip | |
Auto merge of #107038 - compiler-errors:dont-wfcheck-non-local-rpit, r=oli-obk
Don't wf-check non-local RPITs We were using `ty::is_impl_trait_defn(..).is_none()` to check if we need to add WF obligations for an opaque type. This is *supposed* to be checking if the type is a TAIT, since RPITs' wfness is implied by wf checking its parent item, but since `is_impl_trait_defn` returns `None` for non-local RPIT and async futures, we unnecessarily consider wf predicates for an RPIT if it is coming from a foreign crate. Fixes #107036 r? `@oli-obk` but feel free to reassign
Diffstat (limited to 'compiler/rustc_middle')
| -rw-r--r-- | compiler/rustc_middle/src/query/mod.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/ty/parameterized.rs | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs index 0ec6f481af1..6bbf7fa3914 100644 --- a/compiler/rustc_middle/src/query/mod.rs +++ b/compiler/rustc_middle/src/query/mod.rs @@ -177,6 +177,12 @@ rustc_queries! { separate_provide_extern } + query is_type_alias_impl_trait(key: DefId) -> bool + { + desc { "determine whether the opaque is a type-alias impl trait" } + separate_provide_extern + } + query analysis(key: ()) -> Result<(), ErrorGuaranteed> { eval_always desc { "running analysis passes on this crate" } diff --git a/compiler/rustc_middle/src/ty/parameterized.rs b/compiler/rustc_middle/src/ty/parameterized.rs index e32a7ee1c35..24f3d1acff1 100644 --- a/compiler/rustc_middle/src/ty/parameterized.rs +++ b/compiler/rustc_middle/src/ty/parameterized.rs @@ -52,6 +52,7 @@ trivially_parameterized_over_tcx! { usize, (), u32, + bool, std::string::String, crate::metadata::ModChild, crate::middle::codegen_fn_attrs::CodegenFnAttrs, |
