summary refs log tree commit diff stats
path: root/doc/destructors.rst
diff options
context:
space:
mode:
Diffstat (limited to 'doc/destructors.rst')
-rw-r--r--doc/destructors.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/destructors.rst b/doc/destructors.rst
index ff6ceaf5e..98926435f 100644
--- a/doc/destructors.rst
+++ b/doc/destructors.rst
@@ -37,7 +37,7 @@ written as:
 
   proc `=destroy`*[T](x: var myseq[T]) =
     if x.data != nil:
-      for i in 0..<x.len: `=destroy`(x[i])
+      for i in 0..<x.len: `=destroy`(x.data[i])
       dealloc(x.data)
 
   proc `=copy`*[T](a: var myseq[T]; b: myseq[T]) =