rustdoc: Switch field privacy as necessary
This commit is contained in:
parent
f0ee509229
commit
eb08e8fec2
10 changed files with 258 additions and 250 deletions
|
@ -64,9 +64,9 @@ impl<T: Clean<U>, U> Clean<Vec<U>> for syntax::owned_slice::OwnedSlice<T> {
|
||||||
|
|
||||||
#[deriving(Clone, Encodable, Decodable)]
|
#[deriving(Clone, Encodable, Decodable)]
|
||||||
pub struct Crate {
|
pub struct Crate {
|
||||||
name: ~str,
|
pub name: ~str,
|
||||||
module: Option<Item>,
|
pub module: Option<Item>,
|
||||||
externs: Vec<(ast::CrateNum, ExternalCrate)> ,
|
pub externs: Vec<(ast::CrateNum, ExternalCrate)>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Clean<Crate> for visit_ast::RustdocVisitor<'a> {
|
impl<'a> Clean<Crate> for visit_ast::RustdocVisitor<'a> {
|
||||||
|
@ -92,8 +92,8 @@ impl<'a> Clean<Crate> for visit_ast::RustdocVisitor<'a> {
|
||||||
|
|
||||||
#[deriving(Clone, Encodable, Decodable)]
|
#[deriving(Clone, Encodable, Decodable)]
|
||||||
pub struct ExternalCrate {
|
pub struct ExternalCrate {
|
||||||
name: ~str,
|
pub name: ~str,
|
||||||
attrs: Vec<Attribute> ,
|
pub attrs: Vec<Attribute>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Clean<ExternalCrate> for cstore::crate_metadata {
|
impl Clean<ExternalCrate> for cstore::crate_metadata {
|
||||||
|
@ -113,13 +113,13 @@ impl Clean<ExternalCrate> for cstore::crate_metadata {
|
||||||
#[deriving(Clone, Encodable, Decodable)]
|
#[deriving(Clone, Encodable, Decodable)]
|
||||||
pub struct Item {
|
pub struct Item {
|
||||||
/// Stringified span
|
/// Stringified span
|
||||||
source: Span,
|
pub source: Span,
|
||||||
/// Not everything has a name. E.g., impls
|
/// Not everything has a name. E.g., impls
|
||||||
name: Option<~str>,
|
pub name: Option<~str>,
|
||||||
attrs: Vec<Attribute> ,
|
pub attrs: Vec<Attribute> ,
|
||||||
inner: ItemEnum,
|
pub inner: ItemEnum,
|
||||||
visibility: Option<Visibility>,
|
pub visibility: Option<Visibility>,
|
||||||
id: ast::NodeId,
|
pub id: ast::NodeId,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Item {
|
impl Item {
|
||||||
|
@ -192,8 +192,8 @@ pub enum ItemEnum {
|
||||||
|
|
||||||
#[deriving(Clone, Encodable, Decodable)]
|
#[deriving(Clone, Encodable, Decodable)]
|
||||||
pub struct Module {
|
pub struct Module {
|
||||||
items: Vec<Item> ,
|
pub items: Vec<Item>,
|
||||||
is_crate: bool,
|
pub is_crate: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Clean<Item> for doctree::Module {
|
impl Clean<Item> for doctree::Module {
|
||||||
|
@ -289,9 +289,10 @@ impl<'a> attr::AttrMetaMethods for &'a Attribute {
|
||||||
|
|
||||||
#[deriving(Clone, Encodable, Decodable)]
|
#[deriving(Clone, Encodable, Decodable)]
|
||||||
pub struct TyParam {
|
pub struct TyParam {
|
||||||
name: ~str,
|
pub name: ~str,
|
||||||
id: ast::NodeId,
|
pub id: ast::NodeId,
|
||||||
bounds: Vec<TyParamBound> }
|
pub bounds: Vec<TyParamBound>,
|
||||||
|
}
|
||||||
|
|
||||||
impl Clean<TyParam> for ast::TyParam {
|
impl Clean<TyParam> for ast::TyParam {
|
||||||
fn clean(&self) -> TyParam {
|
fn clean(&self) -> TyParam {
|
||||||
|
@ -338,8 +339,9 @@ impl Clean<Lifetime> for ast::Lifetime {
|
||||||
// maybe use a Generic enum and use ~[Generic]?
|
// maybe use a Generic enum and use ~[Generic]?
|
||||||
#[deriving(Clone, Encodable, Decodable)]
|
#[deriving(Clone, Encodable, Decodable)]
|
||||||
pub struct Generics {
|
pub struct Generics {
|
||||||
lifetimes: Vec<Lifetime> ,
|
pub lifetimes: Vec<Lifetime>,
|
||||||
type_params: Vec<TyParam> }
|
pub type_params: Vec<TyParam>,
|
||||||
|
}
|
||||||
|
|
||||||
impl Clean<Generics> for ast::Generics {
|
impl Clean<Generics> for ast::Generics {
|
||||||
fn clean(&self) -> Generics {
|
fn clean(&self) -> Generics {
|
||||||
|
@ -352,10 +354,10 @@ impl Clean<Generics> for ast::Generics {
|
||||||
|
|
||||||
#[deriving(Clone, Encodable, Decodable)]
|
#[deriving(Clone, Encodable, Decodable)]
|
||||||
pub struct Method {
|
pub struct Method {
|
||||||
generics: Generics,
|
pub generics: Generics,
|
||||||
self_: SelfTy,
|
pub self_: SelfTy,
|
||||||
purity: ast::Purity,
|
pub purity: ast::Purity,
|
||||||
decl: FnDecl,
|
pub decl: FnDecl,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Clean<Item> for ast::Method {
|
impl Clean<Item> for ast::Method {
|
||||||
|
@ -390,10 +392,10 @@ impl Clean<Item> for ast::Method {
|
||||||
|
|
||||||
#[deriving(Clone, Encodable, Decodable)]
|
#[deriving(Clone, Encodable, Decodable)]
|
||||||
pub struct TyMethod {
|
pub struct TyMethod {
|
||||||
purity: ast::Purity,
|
pub purity: ast::Purity,
|
||||||
decl: FnDecl,
|
pub decl: FnDecl,
|
||||||
generics: Generics,
|
pub generics: Generics,
|
||||||
self_: SelfTy,
|
pub self_: SelfTy,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Clean<Item> for ast::TypeMethod {
|
impl Clean<Item> for ast::TypeMethod {
|
||||||
|
@ -447,9 +449,9 @@ impl Clean<SelfTy> for ast::ExplicitSelf {
|
||||||
|
|
||||||
#[deriving(Clone, Encodable, Decodable)]
|
#[deriving(Clone, Encodable, Decodable)]
|
||||||
pub struct Function {
|
pub struct Function {
|
||||||
decl: FnDecl,
|
pub decl: FnDecl,
|
||||||
generics: Generics,
|
pub generics: Generics,
|
||||||
purity: ast::Purity,
|
pub purity: ast::Purity,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Clean<Item> for doctree::Function {
|
impl Clean<Item> for doctree::Function {
|
||||||
|
@ -471,13 +473,14 @@ impl Clean<Item> for doctree::Function {
|
||||||
|
|
||||||
#[deriving(Clone, Encodable, Decodable)]
|
#[deriving(Clone, Encodable, Decodable)]
|
||||||
pub struct ClosureDecl {
|
pub struct ClosureDecl {
|
||||||
sigil: ast::Sigil,
|
pub sigil: ast::Sigil,
|
||||||
region: Option<Lifetime>,
|
pub region: Option<Lifetime>,
|
||||||
lifetimes: Vec<Lifetime> ,
|
pub lifetimes: Vec<Lifetime>,
|
||||||
decl: FnDecl,
|
pub decl: FnDecl,
|
||||||
onceness: ast::Onceness,
|
pub onceness: ast::Onceness,
|
||||||
purity: ast::Purity,
|
pub purity: ast::Purity,
|
||||||
bounds: Vec<TyParamBound> }
|
pub bounds: Vec<TyParamBound>,
|
||||||
|
}
|
||||||
|
|
||||||
impl Clean<ClosureDecl> for ast::ClosureTy {
|
impl Clean<ClosureDecl> for ast::ClosureTy {
|
||||||
fn clean(&self) -> ClosureDecl {
|
fn clean(&self) -> ClosureDecl {
|
||||||
|
@ -498,14 +501,15 @@ impl Clean<ClosureDecl> for ast::ClosureTy {
|
||||||
|
|
||||||
#[deriving(Clone, Encodable, Decodable)]
|
#[deriving(Clone, Encodable, Decodable)]
|
||||||
pub struct FnDecl {
|
pub struct FnDecl {
|
||||||
inputs: Arguments,
|
pub inputs: Arguments,
|
||||||
output: Type,
|
pub output: Type,
|
||||||
cf: RetStyle,
|
pub cf: RetStyle,
|
||||||
attrs: Vec<Attribute> }
|
pub attrs: Vec<Attribute>,
|
||||||
|
}
|
||||||
|
|
||||||
#[deriving(Clone, Encodable, Decodable)]
|
#[deriving(Clone, Encodable, Decodable)]
|
||||||
pub struct Arguments {
|
pub struct Arguments {
|
||||||
values: Vec<Argument> ,
|
pub values: Vec<Argument>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Clean<FnDecl> for ast::FnDecl {
|
impl Clean<FnDecl> for ast::FnDecl {
|
||||||
|
@ -523,9 +527,9 @@ impl Clean<FnDecl> for ast::FnDecl {
|
||||||
|
|
||||||
#[deriving(Clone, Encodable, Decodable)]
|
#[deriving(Clone, Encodable, Decodable)]
|
||||||
pub struct Argument {
|
pub struct Argument {
|
||||||
type_: Type,
|
pub type_: Type,
|
||||||
name: ~str,
|
pub name: ~str,
|
||||||
id: ast::NodeId
|
pub id: ast::NodeId,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Clean<Argument> for ast::Arg {
|
impl Clean<Argument> for ast::Arg {
|
||||||
|
@ -555,9 +559,9 @@ impl Clean<RetStyle> for ast::RetStyle {
|
||||||
|
|
||||||
#[deriving(Clone, Encodable, Decodable)]
|
#[deriving(Clone, Encodable, Decodable)]
|
||||||
pub struct Trait {
|
pub struct Trait {
|
||||||
methods: Vec<TraitMethod> ,
|
pub methods: Vec<TraitMethod>,
|
||||||
generics: Generics,
|
pub generics: Generics,
|
||||||
parents: Vec<Type> ,
|
pub parents: Vec<Type>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Clean<Item> for doctree::Trait {
|
impl Clean<Item> for doctree::Trait {
|
||||||
|
@ -626,17 +630,17 @@ impl Clean<TraitMethod> for ast::TraitMethod {
|
||||||
pub enum Type {
|
pub enum Type {
|
||||||
/// structs/enums/traits (anything that'd be an ast::TyPath)
|
/// structs/enums/traits (anything that'd be an ast::TyPath)
|
||||||
ResolvedPath {
|
ResolvedPath {
|
||||||
path: Path,
|
pub path: Path,
|
||||||
typarams: Option<Vec<TyParamBound> >,
|
pub typarams: Option<Vec<TyParamBound>>,
|
||||||
id: ast::NodeId,
|
pub id: ast::NodeId,
|
||||||
},
|
},
|
||||||
/// Same as above, but only external variants
|
/// Same as above, but only external variants
|
||||||
ExternalPath {
|
ExternalPath {
|
||||||
path: Path,
|
pub path: Path,
|
||||||
typarams: Option<Vec<TyParamBound> >,
|
pub typarams: Option<Vec<TyParamBound>>,
|
||||||
fqn: Vec<~str> ,
|
pub fqn: Vec<~str>,
|
||||||
kind: TypeKind,
|
pub kind: TypeKind,
|
||||||
krate: ast::CrateNum,
|
pub krate: ast::CrateNum,
|
||||||
},
|
},
|
||||||
// I have no idea how to usefully use this.
|
// I have no idea how to usefully use this.
|
||||||
TyParamBinder(ast::NodeId),
|
TyParamBinder(ast::NodeId),
|
||||||
|
@ -662,7 +666,11 @@ pub enum Type {
|
||||||
Unique(~Type),
|
Unique(~Type),
|
||||||
Managed(~Type),
|
Managed(~Type),
|
||||||
RawPointer(Mutability, ~Type),
|
RawPointer(Mutability, ~Type),
|
||||||
BorrowedRef { lifetime: Option<Lifetime>, mutability: Mutability, type_: ~Type},
|
BorrowedRef {
|
||||||
|
pub lifetime: Option<Lifetime>,
|
||||||
|
pub mutability: Mutability,
|
||||||
|
pub type_: ~Type,
|
||||||
|
},
|
||||||
// region, raw, other boxes, mutable
|
// region, raw, other boxes, mutable
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -707,7 +715,7 @@ impl Clean<Type> for ast::Ty {
|
||||||
|
|
||||||
#[deriving(Clone, Encodable, Decodable)]
|
#[deriving(Clone, Encodable, Decodable)]
|
||||||
pub struct StructField {
|
pub struct StructField {
|
||||||
type_: Type,
|
pub type_: Type,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Clean<Item> for ast::StructField {
|
impl Clean<Item> for ast::StructField {
|
||||||
|
@ -739,10 +747,10 @@ impl Clean<Option<Visibility>> for ast::Visibility {
|
||||||
|
|
||||||
#[deriving(Clone, Encodable, Decodable)]
|
#[deriving(Clone, Encodable, Decodable)]
|
||||||
pub struct Struct {
|
pub struct Struct {
|
||||||
struct_type: doctree::StructType,
|
pub struct_type: doctree::StructType,
|
||||||
generics: Generics,
|
pub generics: Generics,
|
||||||
fields: Vec<Item> ,
|
pub fields: Vec<Item>,
|
||||||
fields_stripped: bool,
|
pub fields_stripped: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Clean<Item> for doctree::Struct {
|
impl Clean<Item> for doctree::Struct {
|
||||||
|
@ -768,9 +776,9 @@ impl Clean<Item> for doctree::Struct {
|
||||||
/// only as a variant in an enum.
|
/// only as a variant in an enum.
|
||||||
#[deriving(Clone, Encodable, Decodable)]
|
#[deriving(Clone, Encodable, Decodable)]
|
||||||
pub struct VariantStruct {
|
pub struct VariantStruct {
|
||||||
struct_type: doctree::StructType,
|
pub struct_type: doctree::StructType,
|
||||||
fields: Vec<Item> ,
|
pub fields: Vec<Item>,
|
||||||
fields_stripped: bool,
|
pub fields_stripped: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Clean<VariantStruct> for syntax::ast::StructDef {
|
impl Clean<VariantStruct> for syntax::ast::StructDef {
|
||||||
|
@ -785,9 +793,9 @@ impl Clean<VariantStruct> for syntax::ast::StructDef {
|
||||||
|
|
||||||
#[deriving(Clone, Encodable, Decodable)]
|
#[deriving(Clone, Encodable, Decodable)]
|
||||||
pub struct Enum {
|
pub struct Enum {
|
||||||
variants: Vec<Item> ,
|
pub variants: Vec<Item>,
|
||||||
generics: Generics,
|
pub generics: Generics,
|
||||||
variants_stripped: bool,
|
pub variants_stripped: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Clean<Item> for doctree::Enum {
|
impl Clean<Item> for doctree::Enum {
|
||||||
|
@ -809,7 +817,7 @@ impl Clean<Item> for doctree::Enum {
|
||||||
|
|
||||||
#[deriving(Clone, Encodable, Decodable)]
|
#[deriving(Clone, Encodable, Decodable)]
|
||||||
pub struct Variant {
|
pub struct Variant {
|
||||||
kind: VariantKind,
|
pub kind: VariantKind,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Clean<Item> for doctree::Variant {
|
impl Clean<Item> for doctree::Variant {
|
||||||
|
@ -851,11 +859,11 @@ impl Clean<VariantKind> for ast::VariantKind {
|
||||||
|
|
||||||
#[deriving(Clone, Encodable, Decodable)]
|
#[deriving(Clone, Encodable, Decodable)]
|
||||||
pub struct Span {
|
pub struct Span {
|
||||||
filename: ~str,
|
pub filename: ~str,
|
||||||
loline: uint,
|
pub loline: uint,
|
||||||
locol: uint,
|
pub locol: uint,
|
||||||
hiline: uint,
|
pub hiline: uint,
|
||||||
hicol: uint,
|
pub hicol: uint,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Clean<Span> for syntax::codemap::Span {
|
impl Clean<Span> for syntax::codemap::Span {
|
||||||
|
@ -876,8 +884,8 @@ impl Clean<Span> for syntax::codemap::Span {
|
||||||
|
|
||||||
#[deriving(Clone, Encodable, Decodable)]
|
#[deriving(Clone, Encodable, Decodable)]
|
||||||
pub struct Path {
|
pub struct Path {
|
||||||
global: bool,
|
pub global: bool,
|
||||||
segments: Vec<PathSegment> ,
|
pub segments: Vec<PathSegment>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Clean<Path> for ast::Path {
|
impl Clean<Path> for ast::Path {
|
||||||
|
@ -891,9 +899,9 @@ impl Clean<Path> for ast::Path {
|
||||||
|
|
||||||
#[deriving(Clone, Encodable, Decodable)]
|
#[deriving(Clone, Encodable, Decodable)]
|
||||||
pub struct PathSegment {
|
pub struct PathSegment {
|
||||||
name: ~str,
|
pub name: ~str,
|
||||||
lifetimes: Vec<Lifetime> ,
|
pub lifetimes: Vec<Lifetime>,
|
||||||
types: Vec<Type> ,
|
pub types: Vec<Type>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Clean<PathSegment> for ast::PathSegment {
|
impl Clean<PathSegment> for ast::PathSegment {
|
||||||
|
@ -930,8 +938,8 @@ impl Clean<~str> for ast::Ident {
|
||||||
|
|
||||||
#[deriving(Clone, Encodable, Decodable)]
|
#[deriving(Clone, Encodable, Decodable)]
|
||||||
pub struct Typedef {
|
pub struct Typedef {
|
||||||
type_: Type,
|
pub type_: Type,
|
||||||
generics: Generics,
|
pub generics: Generics,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Clean<Item> for doctree::Typedef {
|
impl Clean<Item> for doctree::Typedef {
|
||||||
|
@ -952,10 +960,10 @@ impl Clean<Item> for doctree::Typedef {
|
||||||
|
|
||||||
#[deriving(Clone, Encodable, Decodable)]
|
#[deriving(Clone, Encodable, Decodable)]
|
||||||
pub struct BareFunctionDecl {
|
pub struct BareFunctionDecl {
|
||||||
purity: ast::Purity,
|
pub purity: ast::Purity,
|
||||||
generics: Generics,
|
pub generics: Generics,
|
||||||
decl: FnDecl,
|
pub decl: FnDecl,
|
||||||
abi: ~str
|
pub abi: ~str,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Clean<BareFunctionDecl> for ast::BareFnTy {
|
impl Clean<BareFunctionDecl> for ast::BareFnTy {
|
||||||
|
@ -974,12 +982,12 @@ impl Clean<BareFunctionDecl> for ast::BareFnTy {
|
||||||
|
|
||||||
#[deriving(Clone, Encodable, Decodable)]
|
#[deriving(Clone, Encodable, Decodable)]
|
||||||
pub struct Static {
|
pub struct Static {
|
||||||
type_: Type,
|
pub type_: Type,
|
||||||
mutability: Mutability,
|
pub mutability: Mutability,
|
||||||
/// It's useful to have the value of a static documented, but I have no
|
/// It's useful to have the value of a static documented, but I have no
|
||||||
/// desire to represent expressions (that'd basically be all of the AST,
|
/// desire to represent expressions (that'd basically be all of the AST,
|
||||||
/// which is huge!). So, have a string.
|
/// which is huge!). So, have a string.
|
||||||
expr: ~str,
|
pub expr: ~str,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Clean<Item> for doctree::Static {
|
impl Clean<Item> for doctree::Static {
|
||||||
|
@ -1017,11 +1025,11 @@ impl Clean<Mutability> for ast::Mutability {
|
||||||
|
|
||||||
#[deriving(Clone, Encodable, Decodable)]
|
#[deriving(Clone, Encodable, Decodable)]
|
||||||
pub struct Impl {
|
pub struct Impl {
|
||||||
generics: Generics,
|
pub generics: Generics,
|
||||||
trait_: Option<Type>,
|
pub trait_: Option<Type>,
|
||||||
for_: Type,
|
pub for_: Type,
|
||||||
methods: Vec<Item>,
|
pub methods: Vec<Item>,
|
||||||
derived: bool,
|
pub derived: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Clean<Item> for doctree::Impl {
|
impl Clean<Item> for doctree::Impl {
|
||||||
|
@ -1056,7 +1064,7 @@ impl Clean<Item> for doctree::Impl {
|
||||||
|
|
||||||
#[deriving(Clone, Encodable, Decodable)]
|
#[deriving(Clone, Encodable, Decodable)]
|
||||||
pub struct ViewItem {
|
pub struct ViewItem {
|
||||||
inner: ViewItemInner
|
pub inner: ViewItemInner,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Clean<Item> for ast::ViewItem {
|
impl Clean<Item> for ast::ViewItem {
|
||||||
|
@ -1109,8 +1117,8 @@ pub enum ViewPath {
|
||||||
|
|
||||||
#[deriving(Clone, Encodable, Decodable)]
|
#[deriving(Clone, Encodable, Decodable)]
|
||||||
pub struct ImportSource {
|
pub struct ImportSource {
|
||||||
path: Path,
|
pub path: Path,
|
||||||
did: Option<ast::DefId>,
|
pub did: Option<ast::DefId>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Clean<ViewPath> for ast::ViewPath {
|
impl Clean<ViewPath> for ast::ViewPath {
|
||||||
|
@ -1130,8 +1138,8 @@ impl Clean<ViewPath> for ast::ViewPath {
|
||||||
|
|
||||||
#[deriving(Clone, Encodable, Decodable)]
|
#[deriving(Clone, Encodable, Decodable)]
|
||||||
pub struct ViewListIdent {
|
pub struct ViewListIdent {
|
||||||
name: ~str,
|
pub name: ~str,
|
||||||
source: Option<ast::DefId>,
|
pub source: Option<ast::DefId>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Clean<ViewListIdent> for ast::PathListIdent {
|
impl Clean<ViewListIdent> for ast::PathListIdent {
|
||||||
|
@ -1311,7 +1319,7 @@ fn resolve_def(id: ast::NodeId) -> Option<ast::DefId> {
|
||||||
|
|
||||||
#[deriving(Clone, Encodable, Decodable)]
|
#[deriving(Clone, Encodable, Decodable)]
|
||||||
pub struct Macro {
|
pub struct Macro {
|
||||||
source: ~str,
|
pub source: ~str,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Clean<Item> for doctree::Macro {
|
impl Clean<Item> for doctree::Macro {
|
||||||
|
|
|
@ -32,8 +32,8 @@ pub enum MaybeTyped {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct DocContext {
|
pub struct DocContext {
|
||||||
krate: ast::Crate,
|
pub krate: ast::Crate,
|
||||||
maybe_typed: MaybeTyped
|
pub maybe_typed: MaybeTyped
|
||||||
}
|
}
|
||||||
|
|
||||||
impl DocContext {
|
impl DocContext {
|
||||||
|
@ -46,8 +46,8 @@ impl DocContext {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct CrateAnalysis {
|
pub struct CrateAnalysis {
|
||||||
exported_items: privacy::ExportedItems,
|
pub exported_items: privacy::ExportedItems,
|
||||||
public_items: privacy::PublicItems,
|
pub public_items: privacy::PublicItems,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Parses, resolves, and typechecks the given crate
|
/// Parses, resolves, and typechecks the given crate
|
||||||
|
|
|
@ -17,23 +17,23 @@ use syntax::ast;
|
||||||
use syntax::ast::{Ident, NodeId};
|
use syntax::ast::{Ident, NodeId};
|
||||||
|
|
||||||
pub struct Module {
|
pub struct Module {
|
||||||
name: Option<Ident>,
|
pub name: Option<Ident>,
|
||||||
attrs: Vec<ast::Attribute> ,
|
pub attrs: Vec<ast::Attribute>,
|
||||||
where: Span,
|
pub where: Span,
|
||||||
structs: Vec<Struct> ,
|
pub structs: Vec<Struct>,
|
||||||
enums: Vec<Enum> ,
|
pub enums: Vec<Enum>,
|
||||||
fns: Vec<Function> ,
|
pub fns: Vec<Function>,
|
||||||
mods: Vec<Module> ,
|
pub mods: Vec<Module>,
|
||||||
id: NodeId,
|
pub id: NodeId,
|
||||||
typedefs: Vec<Typedef> ,
|
pub typedefs: Vec<Typedef>,
|
||||||
statics: Vec<Static> ,
|
pub statics: Vec<Static>,
|
||||||
traits: Vec<Trait> ,
|
pub traits: Vec<Trait>,
|
||||||
vis: ast::Visibility,
|
pub vis: ast::Visibility,
|
||||||
impls: Vec<Impl> ,
|
pub impls: Vec<Impl>,
|
||||||
foreigns: Vec<ast::ForeignMod> ,
|
pub foreigns: Vec<ast::ForeignMod>,
|
||||||
view_items: Vec<ast::ViewItem> ,
|
pub view_items: Vec<ast::ViewItem>,
|
||||||
macros: Vec<Macro> ,
|
pub macros: Vec<Macro>,
|
||||||
is_crate: bool,
|
pub is_crate: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Module {
|
impl Module {
|
||||||
|
@ -78,94 +78,94 @@ pub enum TypeBound {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Struct {
|
pub struct Struct {
|
||||||
vis: ast::Visibility,
|
pub vis: ast::Visibility,
|
||||||
id: NodeId,
|
pub id: NodeId,
|
||||||
struct_type: StructType,
|
pub struct_type: StructType,
|
||||||
name: Ident,
|
pub name: Ident,
|
||||||
generics: ast::Generics,
|
pub generics: ast::Generics,
|
||||||
attrs: Vec<ast::Attribute> ,
|
pub attrs: Vec<ast::Attribute>,
|
||||||
fields: Vec<ast::StructField> ,
|
pub fields: Vec<ast::StructField>,
|
||||||
where: Span,
|
pub where: Span,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Enum {
|
pub struct Enum {
|
||||||
vis: ast::Visibility,
|
pub vis: ast::Visibility,
|
||||||
variants: Vec<Variant> ,
|
pub variants: Vec<Variant>,
|
||||||
generics: ast::Generics,
|
pub generics: ast::Generics,
|
||||||
attrs: Vec<ast::Attribute> ,
|
pub attrs: Vec<ast::Attribute>,
|
||||||
id: NodeId,
|
pub id: NodeId,
|
||||||
where: Span,
|
pub where: Span,
|
||||||
name: Ident,
|
pub name: Ident,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Variant {
|
pub struct Variant {
|
||||||
name: Ident,
|
pub name: Ident,
|
||||||
attrs: Vec<ast::Attribute> ,
|
pub attrs: Vec<ast::Attribute>,
|
||||||
kind: ast::VariantKind,
|
pub kind: ast::VariantKind,
|
||||||
id: ast::NodeId,
|
pub id: ast::NodeId,
|
||||||
vis: ast::Visibility,
|
pub vis: ast::Visibility,
|
||||||
where: Span,
|
pub where: Span,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Function {
|
pub struct Function {
|
||||||
decl: ast::FnDecl,
|
pub decl: ast::FnDecl,
|
||||||
attrs: Vec<ast::Attribute> ,
|
pub attrs: Vec<ast::Attribute>,
|
||||||
id: NodeId,
|
pub id: NodeId,
|
||||||
name: Ident,
|
pub name: Ident,
|
||||||
vis: ast::Visibility,
|
pub vis: ast::Visibility,
|
||||||
purity: ast::Purity,
|
pub purity: ast::Purity,
|
||||||
where: Span,
|
pub where: Span,
|
||||||
generics: ast::Generics,
|
pub generics: ast::Generics,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Typedef {
|
pub struct Typedef {
|
||||||
ty: ast::P<ast::Ty>,
|
pub ty: ast::P<ast::Ty>,
|
||||||
gen: ast::Generics,
|
pub gen: ast::Generics,
|
||||||
name: Ident,
|
pub name: Ident,
|
||||||
id: ast::NodeId,
|
pub id: ast::NodeId,
|
||||||
attrs: Vec<ast::Attribute> ,
|
pub attrs: Vec<ast::Attribute>,
|
||||||
where: Span,
|
pub where: Span,
|
||||||
vis: ast::Visibility,
|
pub vis: ast::Visibility,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Static {
|
pub struct Static {
|
||||||
type_: ast::P<ast::Ty>,
|
pub type_: ast::P<ast::Ty>,
|
||||||
mutability: ast::Mutability,
|
pub mutability: ast::Mutability,
|
||||||
expr: @ast::Expr,
|
pub expr: @ast::Expr,
|
||||||
name: Ident,
|
pub name: Ident,
|
||||||
attrs: Vec<ast::Attribute> ,
|
pub attrs: Vec<ast::Attribute>,
|
||||||
vis: ast::Visibility,
|
pub vis: ast::Visibility,
|
||||||
id: ast::NodeId,
|
pub id: ast::NodeId,
|
||||||
where: Span,
|
pub where: Span,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Trait {
|
pub struct Trait {
|
||||||
name: Ident,
|
pub name: Ident,
|
||||||
methods: Vec<ast::TraitMethod> , //should be TraitMethod
|
pub methods: Vec<ast::TraitMethod>, //should be TraitMethod
|
||||||
generics: ast::Generics,
|
pub generics: ast::Generics,
|
||||||
parents: Vec<ast::TraitRef> ,
|
pub parents: Vec<ast::TraitRef>,
|
||||||
attrs: Vec<ast::Attribute> ,
|
pub attrs: Vec<ast::Attribute>,
|
||||||
id: ast::NodeId,
|
pub id: ast::NodeId,
|
||||||
where: Span,
|
pub where: Span,
|
||||||
vis: ast::Visibility,
|
pub vis: ast::Visibility,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Impl {
|
pub struct Impl {
|
||||||
generics: ast::Generics,
|
pub generics: ast::Generics,
|
||||||
trait_: Option<ast::TraitRef>,
|
pub trait_: Option<ast::TraitRef>,
|
||||||
for_: ast::P<ast::Ty>,
|
pub for_: ast::P<ast::Ty>,
|
||||||
methods: Vec<@ast::Method> ,
|
pub methods: Vec<@ast::Method>,
|
||||||
attrs: Vec<ast::Attribute> ,
|
pub attrs: Vec<ast::Attribute>,
|
||||||
where: Span,
|
pub where: Span,
|
||||||
vis: ast::Visibility,
|
pub vis: ast::Visibility,
|
||||||
id: ast::NodeId,
|
pub id: ast::NodeId,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Macro {
|
pub struct Macro {
|
||||||
name: Ident,
|
pub name: Ident,
|
||||||
id: ast::NodeId,
|
pub id: ast::NodeId,
|
||||||
attrs: Vec<ast::Attribute> ,
|
pub attrs: Vec<ast::Attribute>,
|
||||||
where: Span,
|
pub where: Span,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn struct_type_from_def(sd: &ast::StructDef) -> StructType {
|
pub fn struct_type_from_def(sd: &ast::StructDef) -> StructType {
|
||||||
|
|
|
@ -27,14 +27,14 @@ mod imp {
|
||||||
use std::libc;
|
use std::libc;
|
||||||
|
|
||||||
pub struct flock {
|
pub struct flock {
|
||||||
l_type: libc::c_short,
|
pub l_type: libc::c_short,
|
||||||
l_whence: libc::c_short,
|
pub l_whence: libc::c_short,
|
||||||
l_start: libc::off_t,
|
pub l_start: libc::off_t,
|
||||||
l_len: libc::off_t,
|
pub l_len: libc::off_t,
|
||||||
l_pid: libc::pid_t,
|
pub l_pid: libc::pid_t,
|
||||||
|
|
||||||
// not actually here, but brings in line with freebsd
|
// not actually here, but brings in line with freebsd
|
||||||
l_sysid: libc::c_int,
|
pub l_sysid: libc::c_int,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub static F_WRLCK: libc::c_short = 1;
|
pub static F_WRLCK: libc::c_short = 1;
|
||||||
|
@ -48,12 +48,12 @@ mod imp {
|
||||||
use std::libc;
|
use std::libc;
|
||||||
|
|
||||||
pub struct flock {
|
pub struct flock {
|
||||||
l_start: libc::off_t,
|
pub l_start: libc::off_t,
|
||||||
l_len: libc::off_t,
|
pub l_len: libc::off_t,
|
||||||
l_pid: libc::pid_t,
|
pub l_pid: libc::pid_t,
|
||||||
l_type: libc::c_short,
|
pub l_type: libc::c_short,
|
||||||
l_whence: libc::c_short,
|
pub l_whence: libc::c_short,
|
||||||
l_sysid: libc::c_int,
|
pub l_sysid: libc::c_int,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub static F_UNLCK: libc::c_short = 2;
|
pub static F_UNLCK: libc::c_short = 2;
|
||||||
|
@ -67,14 +67,14 @@ mod imp {
|
||||||
use std::libc;
|
use std::libc;
|
||||||
|
|
||||||
pub struct flock {
|
pub struct flock {
|
||||||
l_start: libc::off_t,
|
pub l_start: libc::off_t,
|
||||||
l_len: libc::off_t,
|
pub l_len: libc::off_t,
|
||||||
l_pid: libc::pid_t,
|
pub l_pid: libc::pid_t,
|
||||||
l_type: libc::c_short,
|
pub l_type: libc::c_short,
|
||||||
l_whence: libc::c_short,
|
pub l_whence: libc::c_short,
|
||||||
|
|
||||||
// not actually here, but brings in line with freebsd
|
// not actually here, but brings in line with freebsd
|
||||||
l_sysid: libc::c_int,
|
pub l_sysid: libc::c_int,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub static F_UNLCK: libc::c_short = 2;
|
pub static F_UNLCK: libc::c_short = 2;
|
||||||
|
@ -84,7 +84,7 @@ mod imp {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Lock {
|
pub struct Lock {
|
||||||
priv fd: libc::c_int,
|
fd: libc::c_int,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Lock {
|
impl Lock {
|
||||||
|
@ -155,7 +155,7 @@ mod imp {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Lock {
|
pub struct Lock {
|
||||||
priv handle: libc::HANDLE,
|
handle: libc::HANDLE,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Lock {
|
impl Lock {
|
||||||
|
|
|
@ -13,15 +13,15 @@ use std::io;
|
||||||
|
|
||||||
#[deriving(Clone)]
|
#[deriving(Clone)]
|
||||||
pub struct Layout {
|
pub struct Layout {
|
||||||
logo: ~str,
|
pub logo: ~str,
|
||||||
favicon: ~str,
|
pub favicon: ~str,
|
||||||
krate: ~str,
|
pub krate: ~str,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Page<'a> {
|
pub struct Page<'a> {
|
||||||
title: &'a str,
|
pub title: &'a str,
|
||||||
ty: &'a str,
|
pub ty: &'a str,
|
||||||
root_path: &'a str,
|
pub root_path: &'a str,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn render<T: fmt::Show, S: fmt::Show>(
|
pub fn render<T: fmt::Show, S: fmt::Show>(
|
||||||
|
|
|
@ -68,26 +68,26 @@ use html::highlight;
|
||||||
pub struct Context {
|
pub struct Context {
|
||||||
/// Current hierarchy of components leading down to what's currently being
|
/// Current hierarchy of components leading down to what's currently being
|
||||||
/// rendered
|
/// rendered
|
||||||
current: Vec<~str> ,
|
pub current: Vec<~str> ,
|
||||||
/// String representation of how to get back to the root path of the 'doc/'
|
/// String representation of how to get back to the root path of the 'doc/'
|
||||||
/// folder in terms of a relative URL.
|
/// folder in terms of a relative URL.
|
||||||
root_path: ~str,
|
pub root_path: ~str,
|
||||||
/// The current destination folder of where HTML artifacts should be placed.
|
/// The current destination folder of where HTML artifacts should be placed.
|
||||||
/// This changes as the context descends into the module hierarchy.
|
/// This changes as the context descends into the module hierarchy.
|
||||||
dst: Path,
|
pub dst: Path,
|
||||||
/// This describes the layout of each page, and is not modified after
|
/// This describes the layout of each page, and is not modified after
|
||||||
/// creation of the context (contains info like the favicon)
|
/// creation of the context (contains info like the favicon)
|
||||||
layout: layout::Layout,
|
pub layout: layout::Layout,
|
||||||
/// This map is a list of what should be displayed on the sidebar of the
|
/// This map is a list of what should be displayed on the sidebar of the
|
||||||
/// current page. The key is the section header (traits, modules,
|
/// current page. The key is the section header (traits, modules,
|
||||||
/// functions), and the value is the list of containers belonging to this
|
/// functions), and the value is the list of containers belonging to this
|
||||||
/// header. This map will change depending on the surrounding context of the
|
/// header. This map will change depending on the surrounding context of the
|
||||||
/// page.
|
/// page.
|
||||||
sidebar: HashMap<~str, Vec<~str> >,
|
pub sidebar: HashMap<~str, Vec<~str> >,
|
||||||
/// This flag indicates whether [src] links should be generated or not. If
|
/// This flag indicates whether [src] links should be generated or not. If
|
||||||
/// the source files are present in the html rendering, then this will be
|
/// the source files are present in the html rendering, then this will be
|
||||||
/// `true`.
|
/// `true`.
|
||||||
include_sources: bool,
|
pub include_sources: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Indicates where an external crate can be found.
|
/// Indicates where an external crate can be found.
|
||||||
|
@ -122,7 +122,7 @@ pub struct Cache {
|
||||||
/// Mapping of typaram ids to the name of the type parameter. This is used
|
/// Mapping of typaram ids to the name of the type parameter. This is used
|
||||||
/// when pretty-printing a type (so pretty printing doesn't have to
|
/// when pretty-printing a type (so pretty printing doesn't have to
|
||||||
/// painfully maintain a context like this)
|
/// painfully maintain a context like this)
|
||||||
typarams: HashMap<ast::NodeId, ~str>,
|
pub typarams: HashMap<ast::NodeId, ~str>,
|
||||||
|
|
||||||
/// Maps a type id to all known implementations for that type. This is only
|
/// Maps a type id to all known implementations for that type. This is only
|
||||||
/// recognized for intra-crate `ResolvedPath` types, and is used to print
|
/// recognized for intra-crate `ResolvedPath` types, and is used to print
|
||||||
|
@ -130,43 +130,43 @@ pub struct Cache {
|
||||||
///
|
///
|
||||||
/// The values of the map are a list of implementations and documentation
|
/// The values of the map are a list of implementations and documentation
|
||||||
/// found on that implementation.
|
/// found on that implementation.
|
||||||
impls: HashMap<ast::NodeId, Vec<(clean::Impl, Option<~str>)> >,
|
pub impls: HashMap<ast::NodeId, Vec<(clean::Impl, Option<~str>)> >,
|
||||||
|
|
||||||
/// Maintains a mapping of local crate node ids to the fully qualified name
|
/// Maintains a mapping of local crate node ids to the fully qualified name
|
||||||
/// and "short type description" of that node. This is used when generating
|
/// and "short type description" of that node. This is used when generating
|
||||||
/// URLs when a type is being linked to. External paths are not located in
|
/// URLs when a type is being linked to. External paths are not located in
|
||||||
/// this map because the `External` type itself has all the information
|
/// this map because the `External` type itself has all the information
|
||||||
/// necessary.
|
/// necessary.
|
||||||
paths: HashMap<ast::NodeId, (Vec<~str> , &'static str)>,
|
pub paths: HashMap<ast::NodeId, (Vec<~str> , &'static str)>,
|
||||||
|
|
||||||
/// This map contains information about all known traits of this crate.
|
/// This map contains information about all known traits of this crate.
|
||||||
/// Implementations of a crate should inherit the documentation of the
|
/// Implementations of a crate should inherit the documentation of the
|
||||||
/// parent trait if no extra documentation is specified, and default methods
|
/// parent trait if no extra documentation is specified, and default methods
|
||||||
/// should show up in documentation about trait implementations.
|
/// should show up in documentation about trait implementations.
|
||||||
traits: HashMap<ast::NodeId, clean::Trait>,
|
pub traits: HashMap<ast::NodeId, clean::Trait>,
|
||||||
|
|
||||||
/// When rendering traits, it's often useful to be able to list all
|
/// When rendering traits, it's often useful to be able to list all
|
||||||
/// implementors of the trait, and this mapping is exactly, that: a mapping
|
/// implementors of the trait, and this mapping is exactly, that: a mapping
|
||||||
/// of trait ids to the list of known implementors of the trait
|
/// of trait ids to the list of known implementors of the trait
|
||||||
implementors: HashMap<ast::NodeId, Vec<Implementor> >,
|
pub implementors: HashMap<ast::NodeId, Vec<Implementor> >,
|
||||||
|
|
||||||
/// Cache of where external crate documentation can be found.
|
/// Cache of where external crate documentation can be found.
|
||||||
extern_locations: HashMap<ast::CrateNum, ExternalLocation>,
|
pub extern_locations: HashMap<ast::CrateNum, ExternalLocation>,
|
||||||
|
|
||||||
// Private fields only used when initially crawling a crate to build a cache
|
// Private fields only used when initially crawling a crate to build a cache
|
||||||
|
|
||||||
priv stack: Vec<~str> ,
|
stack: Vec<~str> ,
|
||||||
priv parent_stack: Vec<ast::NodeId> ,
|
parent_stack: Vec<ast::NodeId> ,
|
||||||
priv search_index: Vec<IndexItem> ,
|
search_index: Vec<IndexItem> ,
|
||||||
priv privmod: bool,
|
privmod: bool,
|
||||||
priv public_items: NodeSet,
|
public_items: NodeSet,
|
||||||
|
|
||||||
// In rare case where a structure is defined in one module but implemented
|
// In rare case where a structure is defined in one module but implemented
|
||||||
// in another, if the implementing module is parsed before defining module,
|
// in another, if the implementing module is parsed before defining module,
|
||||||
// then the fully qualified name of the structure isn't presented in `paths`
|
// then the fully qualified name of the structure isn't presented in `paths`
|
||||||
// yet when its implementation methods are being indexed. Caches such methods
|
// yet when its implementation methods are being indexed. Caches such methods
|
||||||
// and their parent id here and indexes them at the end of crate parsing.
|
// and their parent id here and indexes them at the end of crate parsing.
|
||||||
priv orphan_methods: Vec<(ast::NodeId, clean::Item)>,
|
orphan_methods: Vec<(ast::NodeId, clean::Item)>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Helper struct to render all source code to HTML pages
|
/// Helper struct to render all source code to HTML pages
|
||||||
|
|
|
@ -26,7 +26,7 @@ pub struct Toc {
|
||||||
/// # Main
|
/// # Main
|
||||||
/// ### A
|
/// ### A
|
||||||
/// ## B
|
/// ## B
|
||||||
priv entries: Vec<TocEntry>
|
entries: Vec<TocEntry>
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Toc {
|
impl Toc {
|
||||||
|
@ -37,17 +37,17 @@ impl Toc {
|
||||||
|
|
||||||
#[deriving(Eq)]
|
#[deriving(Eq)]
|
||||||
pub struct TocEntry {
|
pub struct TocEntry {
|
||||||
priv level: u32,
|
level: u32,
|
||||||
priv sec_number: ~str,
|
sec_number: ~str,
|
||||||
priv name: ~str,
|
name: ~str,
|
||||||
priv id: ~str,
|
id: ~str,
|
||||||
priv children: Toc,
|
children: Toc,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Progressive construction of a table of contents.
|
/// Progressive construction of a table of contents.
|
||||||
#[deriving(Eq)]
|
#[deriving(Eq)]
|
||||||
pub struct TocBuilder {
|
pub struct TocBuilder {
|
||||||
priv top_level: Toc,
|
top_level: Toc,
|
||||||
/// The current heirachy of parent headings, the levels are
|
/// The current heirachy of parent headings, the levels are
|
||||||
/// strictly increasing (i.e. chain[0].level < chain[1].level <
|
/// strictly increasing (i.e. chain[0].level < chain[1].level <
|
||||||
/// ...) with each entry being the most recent occurance of a
|
/// ...) with each entry being the most recent occurance of a
|
||||||
|
@ -56,7 +56,7 @@ pub struct TocBuilder {
|
||||||
/// the most recent one).
|
/// the most recent one).
|
||||||
///
|
///
|
||||||
/// We also have `chain[0].level <= top_level.entries[last]`.
|
/// We also have `chain[0].level <= top_level.entries[last]`.
|
||||||
priv chain: Vec<TocEntry>
|
chain: Vec<TocEntry>
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TocBuilder {
|
impl TocBuilder {
|
||||||
|
|
|
@ -19,10 +19,10 @@ pub type PluginCallback = fn (clean::Crate) -> PluginResult;
|
||||||
|
|
||||||
/// Manages loading and running of plugins
|
/// Manages loading and running of plugins
|
||||||
pub struct PluginManager {
|
pub struct PluginManager {
|
||||||
priv dylibs: Vec<dl::DynamicLibrary> ,
|
dylibs: Vec<dl::DynamicLibrary> ,
|
||||||
priv callbacks: Vec<PluginCallback> ,
|
callbacks: Vec<PluginCallback> ,
|
||||||
/// The directory plugins will be loaded from
|
/// The directory plugins will be loaded from
|
||||||
prefix: Path,
|
pub prefix: Path,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl PluginManager {
|
impl PluginManager {
|
||||||
|
|
|
@ -190,15 +190,15 @@ fn maketest(s: &str, cratename: &str, loose_feature_gating: bool) -> ~str {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Collector {
|
pub struct Collector {
|
||||||
tests: Vec<testing::TestDescAndFn>,
|
pub tests: Vec<testing::TestDescAndFn>,
|
||||||
priv names: Vec<~str>,
|
names: Vec<~str>,
|
||||||
priv libs: HashSet<Path>,
|
libs: HashSet<Path>,
|
||||||
priv cnt: uint,
|
cnt: uint,
|
||||||
priv use_headers: bool,
|
use_headers: bool,
|
||||||
priv current_header: Option<~str>,
|
current_header: Option<~str>,
|
||||||
priv cratename: ~str,
|
cratename: ~str,
|
||||||
|
|
||||||
priv loose_feature_gating: bool
|
loose_feature_gating: bool
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Collector {
|
impl Collector {
|
||||||
|
|
|
@ -21,10 +21,10 @@ use core;
|
||||||
use doctree::*;
|
use doctree::*;
|
||||||
|
|
||||||
pub struct RustdocVisitor<'a> {
|
pub struct RustdocVisitor<'a> {
|
||||||
module: Module,
|
pub module: Module,
|
||||||
attrs: Vec<ast::Attribute> ,
|
pub attrs: Vec<ast::Attribute>,
|
||||||
cx: &'a core::DocContext,
|
pub cx: &'a core::DocContext,
|
||||||
analysis: Option<&'a core::CrateAnalysis>,
|
pub analysis: Option<&'a core::CrateAnalysis>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> RustdocVisitor<'a> {
|
impl<'a> RustdocVisitor<'a> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue