Skip to content

Commit 93ab930

Browse files
committed
Fix rst error
1 parent 8ba434b commit 93ab930

File tree

1 file changed

+28
-29
lines changed

1 file changed

+28
-29
lines changed

docs/HighLevelSILOptimizations.rst

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -348,42 +348,41 @@ releasenone
348348
visible release has happened (i.e it is allowed for a ``releasenone``
349349
function to allocate and destruct an object in its implementation as long as
350350
this is does not cause an release of an object visible outside of the
351-
implementation).
351+
implementation). Here are some examples::
352352

353-
Examples
354-
::
355-
class SomeObject {
356-
final var x: Int = 3
357-
}
358-
var global = SomeObject()
353+
class SomeObject {
354+
final var x: Int = 3
355+
}
356+
357+
var global = SomeObject()
359358

360-
class SomeOtherObject {
361-
var x: Int = 2
362-
deinit {
363-
global = SomeObject()
359+
class SomeOtherObject {
360+
var x: Int = 2
361+
deinit {
362+
global = SomeObject()
363+
}
364364
}
365-
}
366365

367-
@effects(releasenone)
368-
func validReleaseNoneFunction(x: Int) -> Int {
369-
global.x = 5
370-
return x + 2
371-
}
366+
@effects(releasenone)
367+
func validReleaseNoneFunction(x: Int) -> Int {
368+
global.x = 5
369+
return x + 2
370+
}
372371

373-
@effects(releasenone)
374-
func validReleaseNoneFunction(x: Int) -> Int {
375-
var notExternallyVisibleObject = SomeObject()
376-
return x + notExternallyVisibleObject.x
377-
}
372+
@effects(releasenone)
373+
func validReleaseNoneFunction(x: Int) -> Int {
374+
var notExternallyVisibleObject = SomeObject()
375+
return x + notExternallyVisibleObject.x
376+
}
378377

379-
func notAReleaseNoneFunction(x: Int, y: SomeObject) -> Int {
380-
return x + y.x
381-
}
378+
func notAReleaseNoneFunction(x: Int, y: SomeObject) -> Int {
379+
return x + y.x
380+
}
382381

383-
func notAReleaseNoneFunction(x: Int) -> Int {
384-
var releaseExternallyVisible = SomeOtherObject()
385-
return x + releaseExternallyVisible.x
386-
}
382+
func notAReleaseNoneFunction(x: Int) -> Int {
383+
var releaseExternallyVisible = SomeOtherObject()
384+
return x + releaseExternallyVisible.x
385+
}
387386

388387
readwrite
389388

0 commit comments

Comments
 (0)