From 067378ba3708fce5c673d260dbb2341623b7165c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96zg=C3=BCr?= Date: Sat, 28 Feb 2026 02:07:24 +0300 Subject: [PATCH] Fix syntax errors in docs observe examples (#6813) --- docs/design/generics/details.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/design/generics/details.md b/docs/design/generics/details.md index 9b88badda2c2..c4006229afd8 100644 --- a/docs/design/generics/details.md +++ b/docs/design/generics/details.md @@ -3189,7 +3189,7 @@ fn G[T:! Transitive](t: T) { // ❌ Illegal: only the current type is // searched for interface implementations. - a.(Q.InQ()); + a.(Q.InQ)(); // ✅ Allowed: values of type `T.A` may be cast // to `T.B`, which extends and implements `Q`. @@ -3197,7 +3197,7 @@ fn G[T:! Transitive](t: T) { // ✅ Allowed: `T.A` == `T.B` that implements `Q`. observe T.A == T.B impls Q; - a.(Q.InQ()); + a.(Q.InQ)(); // ❌ Illegal: `T.A` still does not extend `Q`. a.InQ(); @@ -5913,10 +5913,10 @@ impl forall [T:! A] T as B { } impl forall [T:! B] T as C { } impl forall [T:! C] T as D { } -fn RequiresD(T:! D)(x: T); -fn RequiresB(T:! B)(x: T); +fn RequiresD[T:! D](x: T); +fn RequiresB[T:! B](x: T); -fn RequiresA(T:! A)(x: T) { +fn RequiresA[T:! A](x: T) { // ✅ Allowed: There is a blanket implementation // of `B` for types implementing `A`. RequiresB(x);