Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir_ty/src/tests/traits.rs')
-rw-r--r--crates/hir_ty/src/tests/traits.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/hir_ty/src/tests/traits.rs b/crates/hir_ty/src/tests/traits.rs
index 2e074410cd..9531be760e 100644
--- a/crates/hir_ty/src/tests/traits.rs
+++ b/crates/hir_ty/src/tests/traits.rs
@@ -2100,7 +2100,8 @@ fn test() {
#[test]
fn unselected_projection_in_trait_env_cycle_1() {
- // this is a legitimate cycle
+ // This is not a cycle, because the `T: Trait2<T::Item>` bound depends only on the `T: Trait`
+ // bound, not on itself (since only `Trait` can define `Item`).
check_types(
r#"
trait Trait {
@@ -2111,7 +2112,7 @@ trait Trait2<T> {}
fn test<T: Trait>() where T: Trait2<T::Item> {
let x: T::Item = no_matter;
-} //^^^^^^^^^ {unknown}
+} //^^^^^^^^^ Trait::Item<T>
"#,
);
}