diff options
| author | bors <bors@rust-lang.org> | 2023-05-07 11:18:22 +0000 | 
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-05-07 11:18:22 +0000 | 
| commit | 0dddad0dc5d614f799d7e04de4895e7a7418eccb (patch) | |
| tree | c9d6db616e9b3a2d0259767a10a52f011564b9df /compiler/rustc_trait_selection/src/traits/mod.rs | |
| parent | 8660707bb22b2fa0ef6e2d37c60da20d9cf3d7b9 (diff) | |
| parent | 76802e31a131d2ac5933b8283a292735b6ab8366 (diff) | |
| download | rust-0dddad0dc5d614f799d7e04de4895e7a7418eccb.tar.gz rust-0dddad0dc5d614f799d7e04de4895e7a7418eccb.zip  | |
Auto merge of #111161 - compiler-errors:rtn-super, r=cjgillot
Support return-type bounds on associated methods from supertraits Support `T: Trait<method(): Bound>` when `method` comes from a supertrait, aligning it with the behavior of associated type bounds (both equality and trait bounds). The only wrinkle is that I have to extend `super_predicates_that_define_assoc_type` to look for *all* items, not just `AssocKind::Ty`. This will also be needed to support `feature(associated_const_equality)` as well, which is subtly broken when it comes to supertraits, though this PR does not fix those yet. There's a slight chance there's a perf regression here, in which case I guess I could split it out into a separate query.
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits/mod.rs')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/mod.rs | 2 | 
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/mod.rs b/compiler/rustc_trait_selection/src/traits/mod.rs index 8b8c50f6b83..d8e5725d3ca 100644 --- a/compiler/rustc_trait_selection/src/traits/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/mod.rs @@ -62,7 +62,7 @@ pub use self::util::elaborate; pub use self::util::{expand_trait_aliases, TraitAliasExpander}; pub use self::util::{get_vtable_index_of_object_method, impl_item_is_final, upcast_choices}; pub use self::util::{ - supertrait_def_ids, supertraits, transitive_bounds, transitive_bounds_that_define_assoc_type, + supertrait_def_ids, supertraits, transitive_bounds, transitive_bounds_that_define_assoc_item, SupertraitDefIds, };  | 
