Skip to content

Commit

Permalink
Ensure em dashes are recognizable in markup.
Browse files Browse the repository at this point in the history
  • Loading branch information
Enyium committed Feb 7, 2023
1 parent 678de60 commit 3153855
Show file tree
Hide file tree
Showing 89 changed files with 444 additions and 444 deletions.
52 changes: 26 additions & 26 deletions src/doc/contrib/src/architecture/codebase.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,106 +3,106 @@
This is a very high-level overview of the Cargo codebase.

* [`src/bin/cargo`](https://github.com/rust-lang/cargo/tree/master/src/bin/cargo)
Cargo is split in a library and a binary. This is the binary side that
--- Cargo is split in a library and a binary. This is the binary side that
handles argument parsing, and then calls into the library to perform the
appropriate subcommand. Each Cargo subcommand is a separate module here. See
[SubCommands](subcommands.md).

* [`src/cargo/ops`](https://github.com/rust-lang/cargo/tree/master/src/cargo/ops)
Every major operation is implemented here. This is where the binary CLI
--- Every major operation is implemented here. This is where the binary CLI
usually calls into to perform the appropriate action.

* [`src/cargo/ops/cargo_compile/mod.rs`](https://github.com/rust-lang/cargo/blob/master/src/cargo/ops/cargo_compile/mod.rs)
This is the entry point for all the compilation commands. This is a
--- This is the entry point for all the compilation commands. This is a
good place to start if you want to follow how compilation starts and
flows to completion.

* [`src/cargo/core/resolver`](https://github.com/rust-lang/cargo/tree/master/src/cargo/core/resolver)
This is the dependency and feature resolvers.
--- This is the dependency and feature resolvers.

* [`src/cargo/core/compiler`](https://github.com/rust-lang/cargo/tree/master/src/cargo/core/compiler)
This is the code responsible for running `rustc` and `rustdoc`.
--- This is the code responsible for running `rustc` and `rustdoc`.

* [`src/cargo/core/compiler/build_context/mod.rs`](https://github.com/rust-lang/cargo/blob/master/src/cargo/core/compiler/build_context/mod.rs)
The `BuildContext` is the result of the "front end" of the build
--- The `BuildContext` is the result of the "front end" of the build
process. This contains the graph of work to perform and any settings
necessary for `rustc`. After this is built, the next stage of building
is handled in `Context`.

* [`src/cargo/core/compiler/context`](https://github.com/rust-lang/cargo/blob/master/src/cargo/core/compiler/context/mod.rs)
The `Context` is the mutable state used during the build process. This
--- The `Context` is the mutable state used during the build process. This
is the core of the build process, and everything is coordinated through
this.

* [`src/cargo/core/compiler/fingerprint.rs`](https://github.com/rust-lang/cargo/blob/master/src/cargo/core/compiler/fingerprint.rs)
The `fingerprint` module contains all the code that handles detecting
--- The `fingerprint` module contains all the code that handles detecting
if a crate needs to be recompiled.

* [`src/cargo/core/source`](https://github.com/rust-lang/cargo/tree/master/src/cargo/core/source)
The `Source` trait is an abstraction over different sources of packages.
--- The `Source` trait is an abstraction over different sources of packages.
Sources are uniquely identified by a `SourceId`. Sources are implemented in
the
[`src/cargo/sources`](https://github.com/rust-lang/cargo/tree/master/src/cargo/sources)
directory.

* [`src/cargo/util`](https://github.com/rust-lang/cargo/tree/master/src/cargo/util)
This directory contains generally-useful utility modules.
--- This directory contains generally-useful utility modules.

* [`src/cargo/util/config`](https://github.com/rust-lang/cargo/tree/master/src/cargo/util/config)
This directory contains the config parser. It makes heavy use of
--- This directory contains the config parser. It makes heavy use of
[serde](https://serde.rs/) to merge and translate config values. The
`Config` is usually accessed from the
[`Workspace`](https://github.com/rust-lang/cargo/blob/master/src/cargo/core/workspace.rs),
though references to it are scattered around for more convenient access.

* [`src/cargo/util/toml`](https://github.com/rust-lang/cargo/tree/master/src/cargo/util/toml)
This directory contains the code for parsing `Cargo.toml` files.
--- This directory contains the code for parsing `Cargo.toml` files.

* [`src/cargo/ops/lockfile.rs`](https://github.com/rust-lang/cargo/blob/master/src/cargo/ops/lockfile.rs)
This is where `Cargo.lock` files are loaded and saved.
--- This is where `Cargo.lock` files are loaded and saved.

* [`src/doc`](https://github.com/rust-lang/cargo/tree/master/src/doc)
This directory contains Cargo's documentation and man pages.
--- This directory contains Cargo's documentation and man pages.

* [`src/etc`](https://github.com/rust-lang/cargo/tree/master/src/etc)
These are files that get distributed in the `etc` directory in the Rust release.
--- These are files that get distributed in the `etc` directory in the Rust release.
The man pages are auto-generated by a script in the `src/doc` directory.

* [`crates`](https://github.com/rust-lang/cargo/tree/master/crates)
A collection of independent crates used by Cargo.
--- A collection of independent crates used by Cargo.

## Extra crates

Some functionality is split off into separate crates, usually in the
[`crates`](https://github.com/rust-lang/cargo/tree/master/crates) directory.

* [`cargo-platform`](https://github.com/rust-lang/cargo/tree/master/crates/cargo-platform)
This library handles parsing `cfg` expressions.
--- This library handles parsing `cfg` expressions.
* [`cargo-test-macro`](https://github.com/rust-lang/cargo/tree/master/crates/cargo-test-macro)
This is a proc-macro used by the test suite to define tests. More
--- This is a proc-macro used by the test suite to define tests. More
information can be found at [`cargo_test`
attribute](../tests/writing.md#cargo_test-attribute).
* [`cargo-test-support`](https://github.com/rust-lang/cargo/tree/master/crates/cargo-test-support)
This contains a variety of code to support [writing
--- This contains a variety of code to support [writing
tests](../tests/writing.md).
* [`cargo-util`](https://github.com/rust-lang/cargo/tree/master/crates/cargo-util)
This contains general utility code that is shared between cargo and the
--- This contains general utility code that is shared between cargo and the
testsuite.
* [`crates-io`](https://github.com/rust-lang/cargo/tree/master/crates/crates-io)
This contains code for accessing the crates.io API.
--- This contains code for accessing the crates.io API.
* [`credential`](https://github.com/rust-lang/cargo/tree/master/crates/credential)
This subdirectory contains several packages for implementing the
--- This subdirectory contains several packages for implementing the
experimental
[credential-process](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#credential-process)
feature.
* [`home`](https://github.com/rust-lang/cargo/tree/master/crates/home) This library is shared between cargo and rustup and is used for finding their home directories.
* [`home`](https://github.com/rust-lang/cargo/tree/master/crates/home) --- This library is shared between cargo and rustup and is used for finding their home directories.
This is not directly depended upon with a `path` dependency; cargo uses the version from crates.io.
It is intended to be versioned and published independently of Rust's release system.
Whenever a change needs to be made, bump the version in Cargo.toml and `cargo publish` it manually, and then update cargo's `Cargo.toml` to depend on the new version.
* [`mdman`](https://github.com/rust-lang/cargo/tree/master/crates/mdman)
This is a utility for generating cargo's man pages. See [Building the man
* [`mdman`](https://github.com/rust-lang/cargo/tree/master/crates/mdman)
--- This is a utility for generating cargo's man pages. See [Building the man
pages](https://github.com/rust-lang/cargo/tree/master/src/doc#building-the-man-pages)
for more information.
* [`resolver-tests`](https://github.com/rust-lang/cargo/tree/master/crates/resolver-tests)
This is a dedicated package that defines tests for the [dependency
--- This is a dedicated package that defines tests for the [dependency
resolver](../architecture/packages.md#resolver).
16 changes: 8 additions & 8 deletions src/doc/contrib/src/architecture/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,27 @@ actually compiled by `rustc`.
There are several data structures that are important to understand how
packages are found and loaded:

* [`Package`] A package, which is a `Cargo.toml` manifest and its associated
* [`Package`] --- A package, which is a `Cargo.toml` manifest and its associated
source files.
* [`PackageId`] A unique identifier for a package.
* [`Source`] An abstraction for something that can fetch packages (a remote
* [`PackageId`] --- A unique identifier for a package.
* [`Source`] --- An abstraction for something that can fetch packages (a remote
registry, a git repo, the local filesystem, etc.). Check out the [source
implementations] for all the details about registries, indexes, git
dependencies, etc.
* [`SourceId`] A unique identifier for a source.
* [`SourceMap`] Map of all available sources.
* [`PackageRegistry`] This is the main interface for how the dependency
* [`SourceId`] --- A unique identifier for a source.
* [`SourceMap`] --- Map of all available sources.
* [`PackageRegistry`] --- This is the main interface for how the dependency
resolver finds packages. It contains the `SourceMap`, and handles things
like the `[patch]` table. The `Registry` trait provides a generic interface
to the `PackageRegistry`, but this is only used for providing an alternate
implementation of the `PackageRegistry` for testing. The dependency resolver
sends a query to the `PackageRegistry` to "get me all packages that match
this dependency declaration".
* [`Summary`] A summary is a subset of a [`Manifest`], and is essentially
* [`Summary`] --- A summary is a subset of a [`Manifest`], and is essentially
the information that can be found in a registry index. Queries against the
`PackageRegistry` yields a `Summary`. The resolver uses the summary
information to build the dependency graph.
* [`PackageSet`] Contains all of the `Package` objects. This works with the
* [`PackageSet`] --- Contains all of the `Package` objects. This works with the
[`Downloads`] struct to coordinate downloading packages. It has a reference
to the `SourceMap` to get the `Source` objects which tell the `Downloads`
struct which URLs to fetch.
Expand Down
10 changes: 5 additions & 5 deletions src/doc/contrib/src/issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ If you file in the wrong tracker, someone will either transfer it to the
correct one or ask you to move it. Some other repositories that may be
relevant are:

* [`rust-lang/rust`] Home for the [`rustc`] compiler and [`rustdoc`].
* [`rust-lang/rustup`] Home for the [`rustup`] toolchain installer.
* [`rust-lang/rustfmt`] Home for the `rustfmt` tool, which also includes `cargo fmt`.
* [`rust-lang/rust-clippy`] Home for the `clippy` tool, which also includes `cargo clippy`.
* [`rust-lang/crates.io`] Home for the [crates.io] website.
* [`rust-lang/rust`] --- Home for the [`rustc`] compiler and [`rustdoc`].
* [`rust-lang/rustup`] --- Home for the [`rustup`] toolchain installer.
* [`rust-lang/rustfmt`] --- Home for the `rustfmt` tool, which also includes `cargo fmt`.
* [`rust-lang/rust-clippy`] --- Home for the `clippy` tool, which also includes `cargo clippy`.
* [`rust-lang/crates.io`] --- Home for the [crates.io] website.

Issues with [`cargo fix`] can be tricky to know where they should be filed,
since the fixes are driven by `rustc`, processed by [`rustfix`], and the
Expand Down
16 changes: 8 additions & 8 deletions src/doc/contrib/src/tests/writing.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,34 +77,34 @@ They are listed in parentheses separated with commas, such as:

The options it supports are:

* `nightly` This will cause the test to be ignored if not running on the nightly toolchain.
* `nightly` --- This will cause the test to be ignored if not running on the nightly toolchain.
This is useful for tests that use unstable options in `rustc` or `rustdoc`.
These tests are run in Cargo's CI, but are disabled in rust-lang/rust's CI due to the difficulty of updating both repos simultaneously.
A `reason` field is required to explain why it is nightly-only.
* `build_std_real` This is a "real" `-Zbuild-std` test (in the `build_std` integration test).
* `build_std_real` --- This is a "real" `-Zbuild-std` test (in the `build_std` integration test).
This only runs on nightly, and only if the environment variable `CARGO_RUN_BUILD_STD_TESTS` is set (these tests on run on Linux).
* `build_std_mock` This is a "mock" `-Zbuild-std` test (which uses a mock standard library).
* `build_std_mock` --- This is a "mock" `-Zbuild-std` test (which uses a mock standard library).
This only runs on nightly, and is disabled for windows-gnu.
* `requires_` This indicates a command that is required to be installed to be run.
* `requires_` --- This indicates a command that is required to be installed to be run.
For example, `requires_rustfmt` means the test will only run if the executable `rustfmt` is installed.
These tests are *always* run on CI.
This is mainly used to avoid requiring contributors from having every dependency installed.
* `>=1.64` This indicates that the test will only run with the given version of `rustc` or newer.
* `>=1.64` --- This indicates that the test will only run with the given version of `rustc` or newer.
This can be used when a new `rustc` feature has been stabilized that the test depends on.
If this is specified, a `reason` is required to explain why it is being checked.
* `public_network_test` This tests contacts the public internet.
* `public_network_test` --- This tests contacts the public internet.
These tests are disabled unless the `CARGO_PUBLIC_NETWORK_TESTS` environment variable is set.
Use of this should be *extremely rare*, please avoid using it if possible.
The hosts it contacts should have a relatively high confidence that they are reliable and stable (such as github.com), especially in CI.
The tests should be carefully considered for developer security and privacy as well.
* `container_test` This indicates that it is a test that uses Docker.
* `container_test` --- This indicates that it is a test that uses Docker.
These tests are disabled unless the `CARGO_CONTAINER_TESTS` environment variable is set.
This requires that you have Docker installed.
The SSH tests also assume that you have OpenSSH installed.
These should work on Linux, macOS, and Windows where possible.
Unfortunately these tests are not run in CI for macOS or Windows (no Docker on macOS, and Windows does not support Linux images).
See [`crates/cargo-test-support/src/containers.rs`](https://github.com/rust-lang/cargo/blob/master/crates/cargo-test-support/src/containers.rs) for more on writing these tests.
* `ignore_windows="reason"` Indicates that the test should be ignored on windows for the given reason.
* `ignore_windows="reason"` --- Indicates that the test should be ignored on windows for the given reason.

#### Testing Nightly Features

Expand Down
2 changes: 1 addition & 1 deletion src/doc/man/cargo-add.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## NAME

cargo-add - Add dependencies to a Cargo.toml manifest file
cargo-add --- Add dependencies to a Cargo.toml manifest file

## SYNOPSIS

Expand Down
4 changes: 2 additions & 2 deletions src/doc/man/cargo-bench.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

## NAME

cargo-bench - Execute benchmarks of a package
cargo-bench --- Execute benchmarks of a package

## SYNOPSIS

Expand Down Expand Up @@ -69,7 +69,7 @@ debugger.
When no target selection options are given, `cargo bench` will build the
following targets of the selected packages:

- lib used to link with binaries and benchmarks
- lib --- used to link with binaries and benchmarks
- bins (only if benchmark targets are built and required features are
available)
- lib as a benchmark
Expand Down
2 changes: 1 addition & 1 deletion src/doc/man/cargo-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## NAME

cargo-build - Compile the current package
cargo-build --- Compile the current package

## SYNOPSIS

Expand Down
2 changes: 1 addition & 1 deletion src/doc/man/cargo-check.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## NAME

cargo-check - Check the current package
cargo-check --- Check the current package

## SYNOPSIS

Expand Down
2 changes: 1 addition & 1 deletion src/doc/man/cargo-clean.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## NAME

cargo-clean - Remove generated artifacts
cargo-clean --- Remove generated artifacts

## SYNOPSIS

Expand Down
2 changes: 1 addition & 1 deletion src/doc/man/cargo-doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## NAME

cargo-doc - Build a package's documentation
cargo-doc --- Build a package's documentation

## SYNOPSIS

Expand Down
2 changes: 1 addition & 1 deletion src/doc/man/cargo-fetch.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

## NAME

cargo-fetch - Fetch dependencies of a package from the network
cargo-fetch --- Fetch dependencies of a package from the network

## SYNOPSIS

Expand Down
2 changes: 1 addition & 1 deletion src/doc/man/cargo-fix.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## NAME

cargo-fix - Automatically fix lint warnings reported by rustc
cargo-fix --- Automatically fix lint warnings reported by rustc

## SYNOPSIS

Expand Down
2 changes: 1 addition & 1 deletion src/doc/man/cargo-generate-lockfile.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## NAME

cargo-generate-lockfile - Generate the lockfile for a package
cargo-generate-lockfile --- Generate the lockfile for a package

## SYNOPSIS

Expand Down
2 changes: 1 addition & 1 deletion src/doc/man/cargo-help.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## NAME

cargo-help - Get help for a Cargo command
cargo-help --- Get help for a Cargo command

## SYNOPSIS

Expand Down
2 changes: 1 addition & 1 deletion src/doc/man/cargo-init.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## NAME

cargo-init - Create a new Cargo package in an existing directory
cargo-init --- Create a new Cargo package in an existing directory

## SYNOPSIS

Expand Down
2 changes: 1 addition & 1 deletion src/doc/man/cargo-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## NAME

cargo-install - Build and install a Rust binary
cargo-install --- Build and install a Rust binary

## SYNOPSIS

Expand Down
2 changes: 1 addition & 1 deletion src/doc/man/cargo-locate-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## NAME

cargo-locate-project - Print a JSON representation of a Cargo.toml file's location
cargo-locate-project --- Print a JSON representation of a Cargo.toml file's location

## SYNOPSIS

Expand Down
2 changes: 1 addition & 1 deletion src/doc/man/cargo-login.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## NAME

cargo-login - Save an API token from the registry locally
cargo-login --- Save an API token from the registry locally

## SYNOPSIS

Expand Down
2 changes: 1 addition & 1 deletion src/doc/man/cargo-metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## NAME

cargo-metadata - Machine-readable metadata about the current package
cargo-metadata --- Machine-readable metadata about the current package

## SYNOPSIS

Expand Down
2 changes: 1 addition & 1 deletion src/doc/man/cargo-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## NAME

cargo-new - Create a new Cargo package
cargo-new --- Create a new Cargo package

## SYNOPSIS

Expand Down
2 changes: 1 addition & 1 deletion src/doc/man/cargo-owner.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## NAME

cargo-owner - Manage the owners of a crate on the registry
cargo-owner --- Manage the owners of a crate on the registry

## SYNOPSIS

Expand Down
2 changes: 1 addition & 1 deletion src/doc/man/cargo-package.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

## NAME

cargo-package - Assemble the local package into a distributable tarball
cargo-package --- Assemble the local package into a distributable tarball

## SYNOPSIS

Expand Down
Loading

0 comments on commit 3153855

Please sign in to comment.