Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 9 pull requests #109130

Merged
merged 23 commits into from
Mar 14, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c0afabb
Support for Fuchsia RISC-V target
petrhosek Mar 2, 2023
8a5574b
Remove tests/ui/impl-trait/in-trait/new-lowering-strategy in favor of…
spastorino Mar 7, 2023
07e018d
Run existing async in traits tests using -Zlower-impl-trait-in-trait-…
spastorino Mar 7, 2023
b82d6a2
Run existing impl trait in traits tests using -Zlower-impl-trait-in-t…
spastorino Mar 8, 2023
b2f3198
Filter out RPITITs in astconv when checking for missing associated types
spastorino Mar 7, 2023
fa421ec
Filter out RPITITs in object_safety_violations_for_trait
spastorino Mar 7, 2023
8b9344a
Fix object safety checks for new RPITITs
spastorino Mar 8, 2023
0bb876e
Layout of `&dyn Trait<[type error]>` is still wide
compiler-errors Mar 13, 2023
8a53570
Don't ICE for late-bound consts across AnonConstBoundary
compiler-errors Mar 13, 2023
b535da6
Get impl defaultness using query
spastorino Mar 8, 2023
a4e4037
Make fns from other crates with RPITIT work
spastorino Mar 8, 2023
4824363
Remove some direct calls to local_def_id_to_hir_id on diagnostics
spastorino Mar 9, 2023
6a2a6fe
Emit "modifies receiver" diagnostic when no method is found
MaciejWas Mar 14, 2023
b36bbb0
Don't codegen impossible to satisfy impls
compiler-errors Mar 14, 2023
e006ee9
Rollup merge of #108722 - petrhosek:fuchsia-riscv, r=petrochenkov
matthiaskrgr Mar 14, 2023
5037836
Rollup merge of #108880 - spastorino:new-rpitit-6, r=compiler-errors
matthiaskrgr Mar 14, 2023
48934c4
Rollup merge of #108909 - spastorino:new-rpitit-7, r=compiler-errors
matthiaskrgr Mar 14, 2023
6e3a3de
Rollup merge of #108915 - spastorino:new-rpitit-8, r=compiler-errors
matthiaskrgr Mar 14, 2023
21d15db
Rollup merge of #108923 - spastorino:new-rpitit-9, r=compiler-errors
matthiaskrgr Mar 14, 2023
1f159b4
Rollup merge of #109101 - compiler-errors:layout-err, r=michaelwoerister
matthiaskrgr Mar 14, 2023
4c6b680
Rollup merge of #109105 - compiler-errors:late-ct-in-anon-ct, r=oli-obk
matthiaskrgr Mar 14, 2023
b88c675
Rollup merge of #109110 - compiler-errors:impossible-impl-mono, r=jac…
matthiaskrgr Mar 14, 2023
b17ee10
Rollup merge of #109116 - MaciejWas:add-modifies-receiver-diagn-when-…
matthiaskrgr Mar 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make fns from other crates with RPITIT work
  • Loading branch information
spastorino committed Mar 14, 2023
commit a4e40370d018bf2a5c5a9713a7532638838f740d
6 changes: 5 additions & 1 deletion compiler/rustc_hir/src/definitions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,12 @@ impl DefPathData {
match *self {
TypeNs(name) | ValueNs(name) | MacroNs(name) | LifetimeNs(name) => Some(name),

// We use this name when collecting `ModChild`s.
// FIXME this could probably be removed with some refactoring to the name resolver.
ImplTraitAssocTy => Some(kw::Empty),

Impl | ForeignMod | CrateRoot | Use | GlobalAsm | ClosureExpr | Ctor | AnonConst
| ImplTrait | ImplTraitAssocTy => None,
| ImplTrait => None,
}
}

Expand Down
6 changes: 6 additions & 0 deletions compiler/rustc_ty_utils/src/assoc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,9 @@ fn impl_associated_item_for_impl_trait_in_trait(
// `opt_local_def_id_to_hir_id` with `None`.
impl_assoc_ty.opt_local_def_id_to_hir_id(None);

// Copy span of the opaque.
impl_assoc_ty.def_ident_span(Some(span));

impl_assoc_ty.associated_item(ty::AssocItem {
name: kw::Empty,
kind: ty::AssocKind::Type,
Expand All @@ -342,6 +345,9 @@ fn impl_associated_item_for_impl_trait_in_trait(
// extra predicates to assume.
impl_assoc_ty.param_env(tcx.param_env(impl_fn_def_id));

// Copy visility of the containing function.
impl_assoc_ty.visibility(tcx.visibility(impl_fn_def_id));

// Copy impl_defaultness of the containing function.
impl_assoc_ty.impl_defaultness(tcx.impl_defaultness(impl_fn_def_id));

Expand Down
2 changes: 2 additions & 0 deletions tests/ui/impl-trait/in-trait/foreign.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// check-pass
// aux-build: rpitit.rs
// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
// revisions: current next

extern crate rpitit;

Expand Down