Skip to content

Commit

Permalink
add docs per sunfishcode's code review
Browse files Browse the repository at this point in the history
  • Loading branch information
Pat Hickey committed Feb 23, 2019
1 parent 090fd1a commit 8aa9550
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/artifact/decl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ pub enum Scope {
/// Available only inside the defining component
Local,
/// Available to all modules, but only selected if a Global
/// definition is not found
/// definition is not found. No conflict if there are multiple
/// weak symbols.
Weak,
}

Expand Down Expand Up @@ -67,7 +68,7 @@ macro_rules! scope_methods {
pub fn set_scope(&mut self, scope: Scope) {
self.scope = scope;
}
/// Check if scope is `Scope::Global`
/// Check if scope is `Scope::Global`. False if set to Local or Weak.
pub fn is_global(&self) -> bool {
self.scope == Scope::Global
}
Expand Down Expand Up @@ -120,7 +121,7 @@ macro_rules! visibility_methods {
pub enum DataType {
/// Ordinary raw bytes
Bytes,
/// 0-terminated ascii string
/// 0-terminated C-style string.
String,
}

Expand All @@ -144,7 +145,8 @@ macro_rules! datatype_methods {

macro_rules! align_methods {
() => {
/// Build alignment
/// Build alignment. Size is in bytes. If None, a default is chosen
/// in the backend.
pub fn with_align(mut self, align: Option<usize>) -> Self {
self.align = align;
self
Expand Down

0 comments on commit 8aa9550

Please sign in to comment.