Improve docs from feedback

This commit is contained in:
Mark McCaskey
2019-09-27 10:15:40 -07:00
parent dc1744560c
commit 871310a851
5 changed files with 25 additions and 16 deletions

View File

@ -22,7 +22,7 @@ pub mod sys {
}
pub use crate::sig_registry::SigRegistry;
/// Enum used to select which compiler should be used to generate code
/// Enum used to select which compiler should be used to generate code.
#[derive(Serialize, Deserialize, Debug, Copy, Clone, PartialEq, Eq)]
pub enum Backend {
Cranelift,
@ -31,7 +31,7 @@ pub enum Backend {
}
impl Backend {
/// Get a list of the currently enabled (via feature flag) backends
/// Get a list of the currently enabled (via feature flag) backends.
pub fn variants() -> &'static [&'static str] {
&[
#[cfg(feature = "backend-cranelift")]
@ -43,8 +43,8 @@ impl Backend {
]
}
/// Stable string representation of the backend
/// can be used as part of a cache key, for example
/// Stable string representation of the backend.
/// It can be used as part of a cache key, for example.
pub fn to_string(&self) -> &'static str {
match self {
Backend::Cranelift => "cranelift",
@ -113,7 +113,7 @@ impl Default for MemoryBoundCheckMode {
}
}
/// Controls which experimental features will be enabled
/// Controls which experimental features will be enabled.
#[derive(Debug, Default)]
pub struct Features {
pub simd: bool,