Skip to content

Commit

Permalink
Rename config.toml.example to config.example.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
thomcc committed Mar 11, 2023
1 parent 8a73f50 commit fcb2a36
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 17 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
src/etc/installer/gfx/* binary
src/vendor/** -text
Cargo.lock linguist-generated=false
config.toml.example linguist-language=TOML

# Older git versions try to fix line endings on images and fonts, this prevents it.
*.png binary
Expand Down
2 changes: 1 addition & 1 deletion .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Files: compiler/*
Cargo.lock
Cargo.toml
CODE_OF_CONDUCT.md
config.toml.example
config.example.toml
configure
CONTRIBUTING.md
COPYRIGHT
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ See [the rustc-dev-guide for more info][sysllvm].
The Rust build system uses a file named `config.toml` in the root of the
source tree to determine various configuration settings for the build.
Set up the defaults intended for distros to get started. You can see a full
list of options in `config.toml.example`.
list of options in `config.example.toml`.

```sh
printf 'profile = "user" \nchangelog-seen = 2 \n' > config.toml
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/bootstrap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ Some general areas that you may be interested in modifying are:
If you make a major change, please remember to:

+ Update `VERSION` in `src/bootstrap/main.rs`.
* Update `changelog-seen = N` in `config.toml.example`.
* Update `changelog-seen = N` in `config.example.toml`.
* Add an entry in `src/bootstrap/CHANGELOG.md`.

A 'major change' includes
Expand Down
8 changes: 4 additions & 4 deletions src/bootstrap/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ fn main() {
if suggest_setup {
println!("warning: you have not made a `config.toml`");
println!(
"help: consider running `./x.py setup` or copying `config.toml.example` by running \
`cp config.toml.example config.toml`"
"help: consider running `./x.py setup` or copying `config.example.toml` by running \
`cp config.example.toml config.toml`"
);
} else if let Some(suggestion) = &changelog_suggestion {
println!("{}", suggestion);
Expand All @@ -57,8 +57,8 @@ fn main() {
if suggest_setup {
println!("warning: you have not made a `config.toml`");
println!(
"help: consider running `./x.py setup` or copying `config.toml.example` by running \
`cp config.toml.example config.toml`"
"help: consider running `./x.py setup` or copying `config.example.toml` by running \
`cp config.example.toml config.toml`"
);
} else if let Some(suggestion) = &changelog_suggestion {
println!("{}", suggestion);
Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pub enum DryRun {
/// Note that this structure is not decoded directly into, but rather it is
/// filled out from the decoded forms of the structs below. For documentation
/// each field, see the corresponding fields in
/// `config.toml.example`.
/// `config.example.toml`.
#[derive(Default)]
#[cfg_attr(test, derive(Clone))]
pub struct Config {
Expand Down Expand Up @@ -325,7 +325,7 @@ impl std::str::FromStr for SplitDebuginfo {

impl SplitDebuginfo {
/// Returns the default `-Csplit-debuginfo` value for the current target. See the comment for
/// `rust.split-debuginfo` in `config.toml.example`.
/// `rust.split-debuginfo` in `config.example.toml`.
fn default_for_platform(target: &str) -> Self {
if target.contains("apple") {
SplitDebuginfo::Unpacked
Expand Down
6 changes: 3 additions & 3 deletions src/bootstrap/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def err(msg):
print('')
print('This configure script is a thin configuration shim over the true')
print('configuration system, `config.toml`. You can explore the comments')
print('in `config.toml.example` next to this configure script to see')
print('in `config.example.toml` next to this configure script to see')
print('more information about what each option is. Additionally you can')
print('pass `--set` as an argument to set arbitrary key/value pairs')
print('in the TOML configuration if desired')
Expand Down Expand Up @@ -367,7 +367,7 @@ def set(key, value):

set('build.configure-args', sys.argv[1:])

# "Parse" the `config.toml.example` file into the various sections, and we'll
# "Parse" the `config.example.toml` file into the various sections, and we'll
# use this as a template of a `config.toml` to write out which preserves
# all the various comments and whatnot.
#
Expand All @@ -380,7 +380,7 @@ def set(key, value):
targets = {}
top_level_keys = []

for line in open(rust_dir + '/config.toml.example').read().split("\n"):
for line in open(rust_dir + '/config.example.toml').read().split("\n"):
if cur_section == None:
if line.count('=') == 1:
top_level_key = line.split('=')[0]
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ impl Step for PlainSourceTarball {
"RELEASES.md",
"configure",
"x.py",
"config.toml.example",
"config.example.toml",
"Cargo.toml",
"Cargo.lock",
];
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ impl Step for Llvm {
(true, true) => "RelWithDebInfo",
};

// NOTE: remember to also update `config.toml.example` when changing the
// NOTE: remember to also update `config.example.toml` when changing the
// defaults!
let llvm_targets = match &builder.config.llvm_targets {
Some(s) => s,
Expand Down
2 changes: 1 addition & 1 deletion src/doc/rustc/src/instrument-coverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Rust's source-based code coverage requires the Rust "profiler runtime". Without

The Rust `nightly` distribution channel includes the profiler runtime, by default.

> **Important**: If you are building the Rust compiler from the source distribution, the profiler runtime is _not_ enabled in the default `config.toml.example`. Edit your `config.toml` file and ensure the `profiler` feature is set it to `true` (either under the `[build]` section, or under the settings for an individual `[target.<triple>]`):
> **Important**: If you are building the Rust compiler from the source distribution, the profiler runtime is _not_ enabled in the default `config.example.toml`. Edit your `config.toml` file and ensure the `profiler` feature is set it to `true` (either under the `[build]` section, or under the settings for an individual `[target.<triple>]`):
>
> ```toml
> # Build the profiler runtime (required when compiling with options that depend
Expand Down
2 changes: 1 addition & 1 deletion triagebot.toml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ trigger_files = [
"src/tools/x",
"configure",
"Cargo.toml",
"config.toml.example",
"config.example.toml",
"src/stage0.json"
]

Expand Down

0 comments on commit fcb2a36

Please sign in to comment.