-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Closed
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.
Description
A type like MutexArc could be annotated with an attribute enabling a cycle detection lint:
#[cycle_check]
struct MutexArc<T> { ... }The lint would do a walk of the type and check for a reference to itself. This isn't good enough for an immutable type like Rc because it only needs to warn if the type can contain itself and T is non-Freeze, but that's easy enough to solve. There's also the issue of how Rc cycles may interact with the current managed pointer annihilator and a future garbage collector.
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.