Unused druntime code: Barrier, ReadWriteMutex, Condition

Nick Treleaven nick at geany.org
Wed Jun 17 19:19:41 UTC 2026


On Tuesday, 16 June 2026 at 10:41:00 UTC, Richard (Rikki) Andrew 
Cattermole wrote:
> ```d
> version(NoBarrier) {
> 	@disable
> 	class Barrier {}
> } else {
> ```

`@disable` doesn't work with types. You can do `@disable new();` 
though.

The spec should be clearer:

> A reference to a declaration marked with the @disable attribute 
> causes a compile time error.

https://dlang.org/spec/attribute.html#disable




More information about the Digitalmars-d mailing list