Skip to content

Commit b7d10d5

Browse files
committed
doc(kernel): multiple CfgBuilders may now be created, but they all must be canonical
1 parent 6b24a41 commit b7d10d5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/r3_kernel/src/cfg.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -345,10 +345,11 @@ impl<Traits: KernelTraits> CfgBuilder<Traits> {
345345
///
346346
/// # Safety
347347
///
348-
/// This is only meant to be used by [`build!`]. For a particular system
349-
/// type, there can be only one fully-constructed instance of `CfgBuilder`,
350-
/// to which all defined kernel objects must belong. For example, swapping
351-
/// a given `CfgBuilder` with another one can be used to circumvent the
348+
/// This is only meant to be used by [`build!`]. Every instance of
349+
/// `CfgBuilder` destined for a particular kernel trait type and exposed to
350+
/// user code must be built through the same sequence of configuration
351+
/// operations. An instance of `CfgBuilder` violating this principle could
352+
/// be used to create object handles with arbitrary values to circumvent the
352353
/// compile-time access control of kernel objects.
353354
#[doc(hidden)]
354355
pub const unsafe fn new(allocator: &ConstAllocator) -> Self {

0 commit comments

Comments
 (0)