Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 0 additions & 37 deletions changelog/2.072.0.dd
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ $(BUGSTITLE Language Changes,

$(BUGSTITLE Compiler Changes,
$(LI $(RELATIVE_LINK2 iteration_closure, `opApply` now conservatively allocates a closure unless marked `scope`))
$(LI $(RELATIVE_LINK2 dash_safe, Add `-transition=safe` switch to enable additional `@safe` checks.))
$(LI $(RELATIVE_LINK2 native_tls_osx, Native TLS on OS X 64 bit.))
$(LI $(RELATIVE_LINK2 deferred_alias, Analysis for aliases in imported modules is deferred.))
$(LI $(RELATIVE_LINK2 __FILE_FULL_PATH__, Special keyword replaced by the source file's absolute file name.))
Expand Down Expand Up @@ -250,42 +249,6 @@ $(BUGSTITLE Language Changes,
)

$(BUGSTITLE Compiler Changes,
$(LI $(LNAME2 iteration_closure, `opApply` now conservatively allocates a closure unless marked `scope`)

$(P This breaking change was required to fix bug with `@safe` violation: $(BUGZILLA 16193).)

$(P To list all places where closure may be allocated after the change, use `-transition=safe`
compiler switch.)

$(P Example:)

---
struct S1 {
int opApply(int delegate(int) dg);
}

struct S2 {
int opApply(scope int delegate(int) dg);
}

void foo() {
foreach(i; S1.init) { // will allocate closure
}
foreach(i; S2.init) { // won't allocate closure
}
}
---
)

$(LI $(LNAME2 dash_safe, Add `-transition=safe` switch to enable additional `@safe` checks.)
$(P Enables enhanced `@safe` checking, which will break some existing code.)
$(UL
$(LI Prevents dereferencing `array.ptr` because that bypasses array bounds check.)
$(LI Assumes opApply delegate parameter escapes unless marked `scope`. Escaping
delegates often require a GC allocated closure.)
)
)

$(LI $(LNAME2 native_tls_osx, Native TLS on OS X 64 bit.)

$(P
Expand Down