Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
ee58df4
there is a policy now
tshepang Feb 2, 2026
1c7e616
they are so many that it feels strange to list any
tshepang Feb 2, 2026
e9965b8
sembr src/crates-io.md
tshepang Feb 2, 2026
2626872
Add label for date reference triage
reddevilmidzy Feb 3, 2026
49d41d7
Add 'C-date-reference-triage' to exclude_labels
reddevilmidzy Feb 3, 2026
68156a3
Merge pull request #2763 from reddevilmidzy/date-ref
reddevilmidzy Feb 3, 2026
fb2be7b
Fix rustdoc links for BoundRegionKind/BoundTyKind
reddevilmidzy Feb 3, 2026
39a238c
Document feature gate checking
reddevilmidzy Jan 30, 2026
f3b9e8a
Clarify description of new solver banned features
reddevilmidzy Feb 3, 2026
33b2fcb
Rename `feature-gate-ck.md` to `feature-gate-check.md`
reddevilmidzy Feb 3, 2026
11ac5bd
Clarify and reorganize feature-gate-check doc
reddevilmidzy Feb 3, 2026
3b2fe8b
Merge pull request #2764 from reddevilmidzy/fix
tshepang Feb 3, 2026
0558adb
Merge pull request #2750 from reddevilmidzy/fgc
tshepang Feb 3, 2026
89771a7
Add cross-links between feature gate docs
reddevilmidzy Feb 3, 2026
a358a9e
Merge pull request #2765 from reddevilmidzy/connect
reddevilmidzy Feb 3, 2026
2184b44
Fix typo
ada4a Jan 31, 2026
3d437dc
Merge pull request #2755 from ada4a/patch-4
tshepang Feb 5, 2026
2495d07
Updated link to the Rust CI successful workflow runs page
reddevilmidzy Feb 5, 2026
f853236
Update CI documentation for branch names
reddevilmidzy Feb 5, 2026
3fd4ab4
Simplify redundant description
reddevilmidzy Feb 5, 2026
aaa2f43
Merge pull request #2766 from reddevilmidzy/auto-build
reddevilmidzy Feb 5, 2026
b8a53ca
typo
tshepang Feb 6, 2026
628bf9f
Merge pull request #2767 from rust-lang/tshepang-patch-1
tshepang Feb 6, 2026
f693a1d
Update diagnostics documentation
JonathanBrouwer Feb 8, 2026
37a314b
Update translation documentation
JonathanBrouwer Feb 8, 2026
400a96e
Merge pull request #2768 from rust-lang/diags
BoxyUwU Feb 8, 2026
875c590
Update examples for diagnostics changes
JonathanBrouwer Feb 8, 2026
3f3d11c
Merge pull request #2769 from rust-lang/example_diagnostics
JonathanBrouwer Feb 8, 2026
0cf7b94
fix Nix setup description
jdonszelmann Nov 13, 2025
7362c41
Merge pull request #2770 from jdonszelmann/fix-nix
WaffleLapkin Feb 9, 2026
34ed986
improve build docs
ZuseZ4 Feb 9, 2026
4c9bb23
Merge pull request #2771 from rust-lang/offload-build-docs
BoxyUwU Feb 10, 2026
e20a44d
Fix typos and capitalization across documentation
him2him2 Feb 10, 2026
47d49a0
Merge pull request #2772 from him2him2/fix-typos
BoxyUwU Feb 10, 2026
bdd8b21
Add reddevilmidzy to review group
reddevilmidzy Feb 11, 2026
79e7093
Merge pull request #2773 from reddevilmidzy/review
reddevilmidzy Feb 11, 2026
8b5a212
Fix doc links to rustc_lexer and rustc_middle
reddevilmidzy Feb 11, 2026
8b18989
Merge pull request #2774 from reddevilmidzy/fix
reddevilmidzy Feb 11, 2026
0f845df
Merge pull request #2761 from rust-lang/tshepang/date-check
tshepang Feb 11, 2026
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
3 changes: 3 additions & 0 deletions src/doc/rustc-dev-guide/ci/date-check/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ fn main() {
}
}
println!();

println!("@rustbot label +C-date-reference-triage +E-easy +E-help-wanted");
println!();
}
}

Expand Down
15 changes: 5 additions & 10 deletions src/doc/rustc-dev-guide/examples/rustc-interface-example.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@

extern crate rustc_driver;
extern crate rustc_error_codes;
extern crate rustc_errors;
extern crate rustc_hash;
extern crate rustc_hir;
extern crate rustc_interface;
extern crate rustc_session;
extern crate rustc_span;

use rustc_errors::registry;
use rustc_hash::FxHashMap;
use rustc_session::config;

Expand All @@ -30,12 +28,11 @@ fn main() {
println!("{HELLO}");
}
"#
.into(),
.into(),
},
output_dir: None, // Option<PathBuf>
output_file: None, // Option<PathBuf>
file_loader: None, // Option<Box<dyn FileLoader + Send + Sync>>
locale_resources: rustc_driver::DEFAULT_LOCALE_RESOURCES.to_owned(),
output_dir: None, // Option<PathBuf>
output_file: None, // Option<PathBuf>
file_loader: None, // Option<Box<dyn FileLoader + Send + Sync>>
lint_caps: FxHashMap::default(), // FxHashMap<lint::LintId, lint::Level>
// This is a callback from the driver that is called when [`ParseSess`] is created.
psess_created: None, //Option<Box<dyn FnOnce(&mut ParseSess) + Send>>
Expand All @@ -50,8 +47,6 @@ fn main() {
//
// The second parameter is local providers and the third parameter is external providers.
override_queries: None, // Option<fn(&Session, &mut ty::query::Providers<'_>, &mut ty::query::Providers<'_>)>
// Registry of diagnostics codes.
registry: registry::Registry::new(rustc_errors::codes::DIAGNOSTICS),
make_codegen_backend: None,
expanded_args: Vec::new(),
ice_file: None,
Expand All @@ -77,4 +72,4 @@ fn main() {
}
});
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ extern crate rustc_span;
use std::sync::{Arc, Mutex};

use rustc_errors::emitter::Emitter;
use rustc_errors::registry::{self, Registry};
use rustc_errors::registry::Registry;
use rustc_errors::translation::Translate;
use rustc_errors::{DiagInner, FluentBundle};
use rustc_session::config;
Expand Down Expand Up @@ -59,14 +59,13 @@ fn main() {
let x: &str = 1;
}
"
.into(),
.into(),
},
crate_cfg: Vec::new(),
crate_check_cfg: Vec::new(),
output_dir: None,
output_file: None,
file_loader: None,
locale_resources: rustc_driver::DEFAULT_LOCALE_RESOURCES.to_owned(),
lint_caps: rustc_hash::FxHashMap::default(),
psess_created: Some(Box::new(|parse_sess| {
parse_sess.dcx().set_emitter(Box::new(DebugEmitter {
Expand All @@ -76,7 +75,6 @@ fn main() {
})),
register_lints: None,
override_queries: None,
registry: registry::Registry::new(rustc_errors::codes::DIAGNOSTICS),
make_codegen_backend: None,
expanded_args: Vec::new(),
ice_file: None,
Expand All @@ -99,4 +97,4 @@ fn main() {
buffer.lock().unwrap().iter().for_each(|diagnostic| {
println!("{diagnostic:#?}");
});
}
}
2 changes: 1 addition & 1 deletion src/doc/rustc-dev-guide/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
- [`#[test]` implementation](./test-implementation.md)
- [Panic implementation](./panic-implementation.md)
- [AST validation](./ast-validation.md)
- [Feature gate checking](./feature-gate-ck.md)
- [Feature gate checking](./feature-gate-check.md)
- [Lang Items](./lang-items.md)
- [The HIR (High-level IR)](./hir.md)
- [Lowering AST to HIR](./hir/lowering.md)
Expand Down
2 changes: 1 addition & 1 deletion src/doc/rustc-dev-guide/src/about-this-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ There are several parts to this guide:
about building, debugging, profiling, etc.
1. [Contributing to Rust][p2]:
Contains information that should be useful no matter how you are contributing,
about procedures for contribution, using git and Github, stabilizing features, etc.
about procedures for contribution, using git and GitHub, stabilizing features, etc.
1. [Bootstrapping][p3]:
Describes how the Rust compiler builds itself using previous versions, including
an introduction to the bootstrap process and debugging methods.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ This is also where `--keep-stage 1 library/std` comes into play. Since most
changes to the compiler don't actually change the ABI, once you've produced a
`std` in `stage1`, you can probably just reuse it with a different compiler. If
the ABI hasn't changed, you're good to go, no need to spend time recompiling
that `std`. The flag `--keep-stage` simply instructs the build script to assumes
that `std`. The flag `--keep-stage` simply instructs the build script to assume
the previous compile is fine and copies those artifacts into the appropriate
place, skipping the `cargo` invocation.

Expand Down Expand Up @@ -342,7 +342,7 @@ This flag has the following effects:

Code which does not use `-Z force-unstable-if-unmarked` should include the
`#![feature(rustc_private)]` crate attribute to access these forced-unstable
crates. This is needed for things which link `rustc` its self, such as `MIRI` or
crates. This is needed for things which link `rustc` itself, such as `Miri` or
`clippy`.

You can find more discussion about sysroots in:
Expand Down
10 changes: 8 additions & 2 deletions src/doc/rustc-dev-guide/src/building/suggested.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ You can also include extensions within extensions recursively.
**Note:** In the `include` field, the overriding logic follows a right-to-left order.
For example,
in `include = ["a.toml", "b.toml"]`, extension `b.toml` overrides `a.toml`.
Also, parent extensions always overrides the inner ones.
Also, parent extensions always override the inner ones.

## Configuring `rust-analyzer` for `rustc`

Expand Down Expand Up @@ -426,7 +426,7 @@ You can then use that rust2 folder as a separate workspace for modifying and bui

Several nix configurations are defined in `src/tools/nix-dev-shell`.

If you're using direnv, you can create a symbol link to `src/tools/nix-dev-shell/envrc-flake` or `src/tools/nix-dev-shell/envrc-shell`
If you're using direnv, you can create a symbolic link to `src/tools/nix-dev-shell/envrc-flake` or `src/tools/nix-dev-shell/envrc-shell`

```bash
ln -s ./src/tools/nix-dev-shell/envrc-flake ./.envrc # Use flake
Expand All @@ -436,6 +436,12 @@ or
ln -s ./src/tools/nix-dev-shell/envrc-shell ./.envrc # Use nix-shell
```

If you're using the flake, make sure to also update it with the following command:

```
nix flake update --flake ./src/tools/nix-dev-shell
```

### Note

Note that when using nix on a not-NixOS distribution, it may be necessary to set
Expand Down
4 changes: 2 additions & 2 deletions src/doc/rustc-dev-guide/src/const-generics.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ In some sense the desugarings from the previous examples are to:
struct Foo<const N: usize>;
type Alias = [u8; 1 + 1];

// sort-of desugars to psuedo-rust:
// sort-of desugars to pseudo-rust:
struct Foo<const N: usize>;

const ANON = 1 + 1;
Expand Down Expand Up @@ -178,7 +178,7 @@ To check this we have [`ClauseKind::ConstArgHasType(ty::Const, Ty)`][const_arg_h
```rust
fn foo<const N: usize>() {}

// desugars to in psuedo-rust
// desugars to in pseudo-rust

fn foo<const N>()
where
Expand Down
2 changes: 1 addition & 1 deletion src/doc/rustc-dev-guide/src/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ When you resolve them, you should use `@rustbot` to mark it as `S-waiting-on-rev
GitHub allows [closing issues using keywords][closing-keywords].
This feature should be used to keep the issue tracker tidy.
However, it is generally preferred
to put the "closes #123" text in the PR description rather than the issue commit;
to put the "closes #123" text in the PR description rather than the commit message;
particularly during rebasing, citing the issue number in the commit can "spam"
the issue in question.

Expand Down
18 changes: 4 additions & 14 deletions src/doc/rustc-dev-guide/src/crates-io.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
# crates.io dependencies

The Rust compiler supports building with some dependencies from `crates.io`.
Examples are `log` and `env_logger`.

In general,
you should avoid adding dependencies to the compiler for several reasons:

- The dependency may not be of high quality or well-maintained.
- The dependency may not be using a compatible license.
- The dependency may have transitive dependencies that have one of the above
problems.

<!-- date-check: Aug 2025 -->
Note that there is no official policy for vetting new dependencies to the compiler.
Decisions are made on a case-by-case basis, during code review.
Rust Forge has [official policy for vetting new dependencies].

## Permitted dependencies

The `tidy` tool has [a list of crates that are allowed]. To add a
dependency that is not already in the compiler, you will need to add it to the list.
The `tidy` tool has [a list of crates that are allowed].
To add a dependency that is not already in the compiler, you will need to add it to the list.

[a list of crates that are allowed]: https://github.com/rust-lang/rust/blob/9d1b2106e23b1abd32fce1f17267604a5102f57a/src/tools/tidy/src/deps.rs#L73
[official policy for vetting new dependencies]: https://forge.rust-lang.org/compiler/third-party-out-of-tree#third-party-crates
2 changes: 1 addition & 1 deletion src/doc/rustc-dev-guide/src/debugging-support-in-rustc.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ trait for a type would be one of these interfaces (`DW_tag_interface` type). Als
which it is implemented would describe all the interfaces this type implements. This requires a
DWARF extension.

Issue on Github: [https://github.com/rust-lang/rust/issues/33014]
Issue on GitHub: [https://github.com/rust-lang/rust/issues/33014]

## Typical process for a Debug Info change (LLVM)

Expand Down
6 changes: 3 additions & 3 deletions src/doc/rustc-dev-guide/src/diagnostics.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ Guidelines for different diagnostic levels:
The error or warning portion should *not* suggest how to fix the problem,
only the "help" sub-diagnostic should.

- `note`: emitted to given more context and identify additional circumstances
- `note`: emitted to give more context and identify additional circumstances
and parts of the code that caused the warning or error. For example, the
borrow checker will note any previous conflicting borrows.

Expand Down Expand Up @@ -788,7 +788,7 @@ add_lint_group!(sess,
```

This defines the `nonstandard_style` group which turns on the listed lints. A
user can turn on these lints with a `!#[warn(nonstandard_style)]` attribute in
user can turn on these lints with a `#![warn(nonstandard_style)]` attribute in
the source code, or by passing `-W nonstandard-style` on the command line.

Some lint groups are created automatically in `LintStore::register_lints`. For instance,
Expand Down Expand Up @@ -944,7 +944,7 @@ You can filter on the following boolean flags:
- `crate_local`: whether the code causing the trait bound to not be
fulfilled is part of the user's crate. This is used to avoid suggesting
code changes that would require modifying a dependency.
- `direct`: whether this is an user-specified rather than derived obligation.
- `direct`: whether this is a user-specified rather than derived obligation.
- `from_desugaring`: whether we are in some kind of desugaring, like `?`
or a `try` block for example. This flag can also be matched on, see below.

Expand Down
Loading
Loading