Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing_doc warning #414

Merged
merged 1 commit into from Nov 1, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/device/attrib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

//! Vertex attribute types.

#![allow(missing_doc)]
#![allow(missing_docs)]

use shade;

Expand Down
2 changes: 1 addition & 1 deletion src/device/draw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ impl DataBuffer {
}
}

#[allow(missing_doc)] //TODO
#[allow(missing_docs)] //TODO
pub trait CommandBuffer {
/// An empty constructor
fn new() -> Self;
Expand Down
8 changes: 4 additions & 4 deletions src/device/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#![crate_type = "lib"]

#![feature(phase)]
#![deny(missing_doc)]
#![deny(missing_docs)]

//! Graphics device. Not meant for direct use.

Expand Down Expand Up @@ -163,7 +163,7 @@ pub fn with_slice<T: Copy, R>(slice: &[T], fun: |&[u8]| -> R) -> R {

/// Features that the device supports.
#[deriving(Show)]
#[allow(missing_doc)] // pretty self-explanatory fields!
#[allow(missing_docs)] // pretty self-explanatory fields!
pub struct Capabilities {
pub shader_model: shade::ShaderModel,
pub max_draw_buffers : uint,
Expand Down Expand Up @@ -235,7 +235,7 @@ pub struct BufferInfo {
/// While this is supposed to be an internal detail of a device,
/// this particular representation may be used by different backends,
/// such as OpenGL (prior to GLNG) and DirectX (prior to DX12)
#[allow(missing_doc)]
#[allow(missing_docs)]
#[deriving(Show)]
pub enum Command {
BindProgram(back::Program),
Expand Down Expand Up @@ -272,7 +272,7 @@ pub enum Command {
// CommandBuffer is really an associated type, so will look much better when
// Rust supports this natively.
/// An interface for performing draw calls using a specific graphics API
#[allow(missing_doc)]
#[allow(missing_docs)]
pub trait Device<C: draw::CommandBuffer> {
/// Returns the capabilities available to the specific API implementation
fn get_capabilities<'a>(&'a self) -> &'a Capabilities;
Expand Down
14 changes: 7 additions & 7 deletions src/device/shade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

//! Shader handling.

#![allow(missing_doc)]
#![allow(missing_docs)]

use std::fmt;

Expand Down Expand Up @@ -65,7 +65,7 @@ pub enum SamplerType {
}

/// Base type of this shader parameter.
#[allow(missing_doc)]
#[allow(missing_docs)]
#[deriving(Clone, PartialEq, Show)]
pub enum BaseType {
BaseF32,
Expand All @@ -89,7 +89,7 @@ pub enum ContainerType {
// Describing object data

/// Which program stage this shader represents.
#[allow(missing_doc)]
#[allow(missing_docs)]
#[deriving(Clone, PartialEq, Show)]
pub enum Stage {
Vertex,
Expand All @@ -104,7 +104,7 @@ pub type Location = uint;

// unable to derive anything for fixed arrays
/// A value that can be uploaded to the device as a uniform.
#[allow(missing_doc)]
#[allow(missing_docs)]
pub enum UniformValue {
ValueI32(i32),
ValueF32(f32),
Expand Down Expand Up @@ -314,7 +314,7 @@ impl UniformVar {
}

/// Like `MaybeOwned` but for u8.
#[allow(missing_doc)]
#[allow(missing_docs)]
#[deriving(Show, PartialEq, Clone)]
pub enum Bytes {
StaticBytes(&'static [u8]),
Expand All @@ -332,7 +332,7 @@ impl Bytes {
}

/// A type storing shader source for different graphics APIs and versions.
#[allow(missing_doc)]
#[allow(missing_docs)]
#[deriving(Clone, PartialEq, Show)]
pub struct ShaderSource {
pub glsl_120: Option<Bytes>,
Expand All @@ -352,7 +352,7 @@ pub enum CreateShaderError {
}

/// Shader model supported by the device, corresponds to the HLSL shader models.
#[allow(missing_doc)]
#[allow(missing_docs)]
#[deriving(Clone, PartialEq, PartialOrd, Show)]
pub enum ShaderModel {
ModelUnsupported,
Expand Down
26 changes: 13 additions & 13 deletions src/device/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,21 @@ pub enum WindingOrder {

/// Width of a line.
pub type LineWidth = f32;
#[allow(missing_doc)]
#[allow(missing_docs)]
pub type OffsetFactor = f32;
#[allow(missing_doc)]
#[allow(missing_docs)]
pub type OffsetUnits = u32;

/// How to offset vertices in screen space, if at all.
#[allow(missing_doc)]
#[allow(missing_docs)]
#[deriving(Clone, PartialEq, Show)]
pub enum OffsetType {
NoOffset,
Offset(OffsetFactor, OffsetUnits),
}

/// Which face, if any, to cull.
#[allow(missing_doc)]
#[allow(missing_docs)]
#[deriving(Clone, PartialEq, Show)]
pub enum CullMode {
CullNothing,
Expand Down Expand Up @@ -125,7 +125,7 @@ pub enum Comparison {
}

/// Stencil mask operation.
#[allow(missing_doc)]
#[allow(missing_docs)]
#[deriving(Eq, Ord, PartialEq, PartialOrd, Hash, Clone, Show)]
pub enum StencilOp {
/// Keep the current value in the stencil buffer (no change).
Expand Down Expand Up @@ -181,7 +181,7 @@ impl Default for StencilSide {
}

/// Complete stencil state, specifying how to handle the front and back side of a face.
#[allow(missing_doc)]
#[allow(missing_docs)]
#[deriving(Eq, Ord, PartialEq, PartialOrd, Hash, Clone, Show)]
pub struct Stencil {
pub front: StencilSide,
Expand All @@ -206,7 +206,7 @@ impl Default for Depth {
}
}

#[allow(missing_doc)]
#[allow(missing_docs)]
#[deriving(Eq, Ord, PartialEq, PartialOrd, Hash, Clone, Show)]
pub enum Equation {
FuncAdd,
Expand All @@ -216,14 +216,14 @@ pub enum Equation {
FuncMax,
}

#[allow(missing_doc)]
#[allow(missing_docs)]
#[deriving(Eq, Ord, PartialEq, PartialOrd, Hash, Clone, Show)]
pub enum InverseFlag {
Normal,
Inverse,
}

#[allow(missing_doc)]
#[allow(missing_docs)]
#[deriving(Eq, Ord, PartialEq, PartialOrd, Hash, Clone, Show)]
pub enum BlendValue {
Zero,
Expand All @@ -236,11 +236,11 @@ pub enum BlendValue {
ConstAlpha,
}

#[allow(missing_doc)]
#[allow(missing_docs)]
#[deriving(Eq, Ord, PartialEq, PartialOrd, Hash, Clone, Show)]
pub struct Factor(pub InverseFlag, pub BlendValue);

#[allow(missing_doc)]
#[allow(missing_docs)]
#[deriving(Eq, Ord, PartialEq, PartialOrd, Hash, Clone, Show)]
pub struct BlendChannel {
pub equation: Equation,
Expand All @@ -258,7 +258,7 @@ impl Default for BlendChannel {
}
}

#[allow(missing_doc)]
#[allow(missing_docs)]
pub struct Blend {
pub color: BlendChannel,
pub alpha: BlendChannel,
Expand Down Expand Up @@ -302,7 +302,7 @@ impl fmt::Show for Blend {

#[deriving(Clone, PartialEq)]
bitflags!(
#[allow(missing_doc)]
#[allow(missing_docs)]
flags ColorMask: u32 { //u8 is preferred, but doesn't seem to work well
const RED = 0x1,
const GREEN = 0x2,
Expand Down
4 changes: 2 additions & 2 deletions src/device/target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub type Depth = f32;
pub type Stencil = u8;

/// A screen space rectangle
#[allow(missing_doc)]
#[allow(missing_docs)]
#[deriving(Clone, PartialEq, Show)]
pub struct Rect {
pub x: u16,
Expand All @@ -42,7 +42,7 @@ pub type ColorValue = [f32, ..4];

#[deriving(Clone, PartialEq)]
bitflags!(
#[allow(missing_doc)]
#[allow(missing_docs)]
flags Mask: u32 { //u8 is preferred, but doesn't seem to work well
const COLOR = 0x01,
const COLOR0 = 0x01,
Expand Down
6 changes: 3 additions & 3 deletions src/device/tex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ impl Format {
pub static RGBA8: Format = Unsigned(RGBA, 8, ::attrib::IntNormalized);

/// Describes the storage of a surface
#[allow(missing_doc)]
#[allow(missing_docs)]
#[deriving(Eq, Ord, PartialEq, PartialOrd, Hash, Clone, Show)]
pub struct SurfaceInfo {
pub width: u16,
Expand Down Expand Up @@ -233,7 +233,7 @@ impl TextureKind {
///
/// Textures larger than 1024px in any dimension are unlikely to be supported
/// by mobile platforms.
#[allow(missing_doc)]
#[allow(missing_docs)]
#[deriving(Eq, Ord, PartialEq, PartialOrd, Hash, Clone, Show)]
pub struct TextureInfo {
pub width: u16,
Expand All @@ -249,7 +249,7 @@ pub struct TextureInfo {
}

/// Describes a subvolume of a texture, which image data can be uploaded into.
#[allow(missing_doc)]
#[allow(missing_docs)]
#[deriving(Eq, Ord, PartialEq, PartialOrd, Hash, Clone, Show)]
pub struct ImageInfo {
pub xoffset: u16,
Expand Down
2 changes: 1 addition & 1 deletion src/gl_device/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//! OpenGL implementation of a device, striving to support OpenGL 2.0 with at
//! least VAOs, but using newer extensions when available.

#![allow(missing_doc)]
#![allow(missing_docs)]
#![experimental]

extern crate libc;
Expand Down
2 changes: 1 addition & 1 deletion src/render/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#![comment = "A platform independent renderer for gfx-rs."]
#![license = "ASL2"]
#![crate_type = "lib"]
#![deny(missing_doc)]
#![deny(missing_docs)]
#![feature(macro_rules, phase)]

#[phase(plugin, link)] extern crate log;
Expand Down