Skip to content

Commit

Permalink
Changed the sample command in the Rustdoc readme to use --output inst…
Browse files Browse the repository at this point in the history
…ead of the outdated --output-dir and

fixed markdown formatting in debuginfo.rs
  • Loading branch information
kaseyc committed Aug 17, 2014
1 parent fb018a3 commit 61b9036
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/doc/README.md
Expand Up @@ -19,7 +19,7 @@ for the 'std' and 'extra' libraries.
To generate HTML documentation from one source file/crate, do something like:

~~~~
rustdoc --output-dir html-doc/ --output-format html ../src/libstd/path.rs
rustdoc --output html-doc/ --output-format html ../src/libstd/path.rs
~~~~

(This, of course, requires a working build of the `rustdoc` tool.)
Expand Down
33 changes: 19 additions & 14 deletions src/librustc/middle/trans/debuginfo.rs
Expand Up @@ -53,12 +53,13 @@ This file consists of three conceptual sections:
3. Minor utility functions
## Recursive Types Some kinds of types, such as structs and enums can be
recursive. That means that the type definition of some type X refers to some
other type which in turn (transitively) refers to X. This introduces cycles into
the type referral graph. A naive algorithm doing an on-demand, depth-first
traversal of this graph when describing types, can get trapped in an endless
loop when it reaches such a cycle.
## Recursive Types
Some kinds of types, such as structs and enums can be recursive. That means that
the type definition of some type X refers to some other type which in turn (transitively)
refers to X. This introduces cycles into the type referral graph. A naive algorithm doing
an on-demand, depth-first traversal of this graph when describing types, can get trapped
in an endless loop when it reaches such a cycle.
For example, the following simple type for a singly-linked list...
Expand Down Expand Up @@ -96,10 +97,12 @@ traversal at the type members after the type has been registered with the cache.
the future)
## Source Locations and Line Information In addition to data type descriptions
the debugging information must also allow to map machine code locations back to
source code locations in order to be useful. This functionality is also handled
in this module. The following functions allow to control source mappings:
## Source Locations and Line Information
In addition to data type descriptions the debugging information must also allow
to map machine code locations back to source code locations in order to be useful.
This functionality is also handled in this module. The following functions allow
to control source mappings:
+ set_source_location()
+ clear_source_location()
Expand Down Expand Up @@ -139,10 +142,12 @@ of the prologue, however, they are ignored by LLVM's prologue detection. The
source location emission is still disabled, so there is no need to do anything
special with source location handling here.
## Unique Type Identification In order for link-time optimization to work
properly, LLVM needs a unique type identifier that tells it across compilation
units which types are the same as others. This type identifier is created by
TypeMap::get_unique_type_id_of_type() using the following algorithm:
## Unique Type Identification
In order for link-time optimization to work properly, LLVM needs a unique type
identifier that tells it across compilation units which types are the same as
others. This type identifier is created by TypeMap::get_unique_type_id_of_type()
using the following algorithm:
(1) Primitive types have their name as ID
(2) Structs, enums and traits have a multipart identifier
Expand Down

5 comments on commit 61b9036

@bors
Copy link
Contributor

@bors bors commented on 61b9036 Aug 17, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 61b9036 Aug 17, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging kaseyc/rust/documentation_fixes = 61b9036 into auto

@bors
Copy link
Contributor

@bors bors commented on 61b9036 Aug 17, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kaseyc/rust/documentation_fixes = 61b9036 merged ok, testing candidate = 0d8738f

@bors
Copy link
Contributor

@bors bors commented on 61b9036 Aug 18, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 0d8738f

Please sign in to comment.