Skip to content
Closed
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
38ef5c1
improve cg_gcc.md a little
tshepang Dec 16, 2025
160e5d8
Merge pull request #2700 from rust-lang/tshepang-patch-4
tshepang Dec 16, 2025
a412446
Prepare for merging from rust-lang/rust
invalid-email-address Dec 17, 2025
58983c8
Merge ref '2dc30247c5d8' from rust-lang/rust
invalid-email-address Dec 17, 2025
7f16a1f
Merge pull request #2701 from rust-lang/rustc-pull
tshepang Dec 17, 2025
fd51310
output of "git diff" is better, and is what I use mostly
tshepang Dec 17, 2025
64c1e97
place it all in just 2 unit tests
tshepang Dec 17, 2025
e254e7e
match fn name
tshepang Dec 17, 2025
8b2c9d8
sembr src/about-this-guide.md
tshepang Dec 17, 2025
6a91174
sembr src/appendix/bibliography.md
tshepang Dec 17, 2025
f685b24
fix corner case
tshepang Dec 17, 2025
e1fe9c6
sembr src/appendix/bibliography.md (after fix from parent commit)
tshepang Dec 17, 2025
2dac444
sembr src/diagnostics/error-codes.md
tshepang Dec 17, 2025
5e1352b
sembr src/query.md
tshepang Dec 17, 2025
40d05f8
corner case
tshepang Dec 17, 2025
2fe2052
manual sembr
tshepang Dec 17, 2025
4673d56
sembr src/conventions.md
tshepang Dec 17, 2025
3aa4a79
that basically repeats the title
tshepang Dec 17, 2025
4b83a5b
Merge pull request #2703 from rust-lang/tshepang/sembr
tshepang Dec 17, 2025
186fc3c
Clarify serialization macros documentation
reddevilmidzy Dec 18, 2025
1dff3e7
stabilization_guide: add missing `)` in prose
DanielEScherzer Dec 18, 2025
728c376
Merge pull request #2705 from DanielEScherzer/patch-1
tshepang Dec 18, 2025
e1e8e06
fix typo
reddevilmidzy Dec 18, 2025
54a25b1
Clarify descriptions for BlobDecodable and LazyDecodable
reddevilmidzy Dec 18, 2025
7076d69
Merge pull request #2704 from reddevilmidzy/macro
jdonszelmann Dec 18, 2025
c3bd76b
Add Rustc Explore video link
reddevilmidzy Dec 20, 2025
f34a4ee
Merge pull request #2706 from reddevilmidzy/lecture
tshepang Dec 20, 2025
44a9d84
Don't export upstream monomorphizations from compiler-builtins
saethlin Dec 20, 2025
7ca2eb9
moved test
reddevilmidzy Dec 20, 2025
4578082
Cleaned up some tests
reddevilmidzy Dec 21, 2025
75f53dd
Update bors configuration
Kobzol Dec 23, 2025
bbf4ec3
Add support for `automation/bors/auto` merge branch
Kobzol Dec 23, 2025
306bd5e
Avoid using env::temp when linking a binary
ChrisDenton Dec 23, 2025
d694347
Rename invalid-tmpdir-env-var
ChrisDenton Dec 23, 2025
ad9e42b
Rollup merge of #150182 - saethlin:dont-prefer-c-builtins, r=bjorn3
matthiaskrgr Dec 23, 2025
ae3a020
Rollup merge of #150216 - reddevilmidzy:t13, r=Kivooeo
matthiaskrgr Dec 23, 2025
ec866a8
Rollup merge of #150308 - Kobzol:bors-conf, r=marcoieni
matthiaskrgr Dec 23, 2025
283f11d
Rollup merge of #150311 - ChrisDenton:no-temp, r=Kivooeo
matthiaskrgr Dec 23, 2025
8965c2f
Rollup merge of #150314 - tshepang:rdg-sync, r=tshepang
matthiaskrgr Dec 23, 2025
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
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- try
- try-perf
- automation/bors/try
- automation/bors/auto
pull_request:
branches:
- "**"
Expand Down Expand Up @@ -56,7 +57,7 @@ jobs:
- name: Test citool
# Only test citool on the auto branch, to reduce latency of the calculate matrix job
# on PR/try builds.
if: ${{ github.ref == 'refs/heads/auto' }}
if: ${{ github.ref == 'refs/heads/auto' || github.ref == 'refs/heads/automation/bors/auto' }}
run: |
cd src/ci/citool
CARGO_INCREMENTAL=0 cargo test
Expand All @@ -79,7 +80,7 @@ jobs:
# access the environment.
#
# We only enable the environment for the rust-lang/rust repository, so that CI works on forks.
environment: ${{ ((github.repository == 'rust-lang/rust' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf' || github.ref == 'refs/heads/automation/bors/try' || github.ref == 'refs/heads/auto')) && 'bors') || '' }}
environment: ${{ ((github.repository == 'rust-lang/rust' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf' || github.ref == 'refs/heads/automation/bors/try' || github.ref == 'refs/heads/auto' || github.ref == 'refs/heads/automation/bors/auto')) && 'bors') || '' }}
env:
CI_JOB_NAME: ${{ matrix.name }}
CI_JOB_DOC_URL: ${{ matrix.doc_url }}
Expand Down Expand Up @@ -313,7 +314,7 @@ jobs:
needs: [ calculate_matrix, job ]
# !cancelled() executes the job regardless of whether the previous jobs passed or failed
if: ${{ !cancelled() && contains(fromJSON('["auto", "try"]'), needs.calculate_matrix.outputs.run_type) }}
environment: ${{ ((github.repository == 'rust-lang/rust' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf' || github.ref == 'refs/heads/automation/bors/try' || github.ref == 'refs/heads/auto')) && 'bors') || '' }}
environment: ${{ ((github.repository == 'rust-lang/rust' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf' || github.ref == 'refs/heads/automation/bors/try' || github.ref == 'refs/heads/auto' || github.ref == 'refs/heads/automation/bors/auto')) && 'bors') || '' }}
steps:
- name: checkout the source code
uses: actions/checkout@v5
Expand Down
11 changes: 6 additions & 5 deletions compiler/rustc_codegen_ssa/src/back/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,18 @@ pub fn link_binary(
});

if outputs.outputs.should_link() {
let tmpdir = TempDirBuilder::new()
.prefix("rustc")
.tempdir()
.unwrap_or_else(|error| sess.dcx().emit_fatal(errors::CreateTempDir { error }));
let path = MaybeTempDir::new(tmpdir, sess.opts.cg.save_temps);
let output = out_filename(
sess,
crate_type,
outputs,
codegen_results.crate_info.local_crate_name,
);
let tmpdir = TempDirBuilder::new()
.prefix("rustc")
.tempdir_in(output.parent().unwrap_or_else(|| Path::new(".")))
.unwrap_or_else(|error| sess.dcx().emit_fatal(errors::CreateTempDir { error }));
let path = MaybeTempDir::new(tmpdir, sess.opts.cg.save_temps);

let crate_name = format!("{}", codegen_results.crate_info.local_crate_name);
let out_filename = output.file_for_writing(
outputs,
Expand Down
6 changes: 1 addition & 5 deletions compiler/rustc_fs_util/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::ffi::{CString, OsStr};
use std::path::{Path, PathBuf, absolute};
use std::{env, fs, io};
use std::{fs, io};

use tempfile::TempDir;

Expand Down Expand Up @@ -139,8 +139,4 @@ impl<'a, 'b> TempDirBuilder<'a, 'b> {
}
self.builder.tempdir_in(dir)
}

pub fn tempdir(&self) -> io::Result<TempDir> {
self.tempdir_in(env::temp_dir())
}
}
6 changes: 6 additions & 0 deletions compiler/rustc_middle/src/ty/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2272,6 +2272,12 @@ impl<'tcx> TyCtxt<'tcx> {

#[inline]
pub fn local_crate_exports_generics(self) -> bool {
// compiler-builtins has some special treatment in codegen, which can result in confusing
// behavior if another crate ends up calling into its monomorphizations.
// https://github.com/rust-lang/rust/issues/150173
if self.is_compiler_builtins(LOCAL_CRATE) {
return false;
}
self.crate_types().iter().any(|crate_type| {
match crate_type {
CrateType::Executable
Expand Down
39 changes: 39 additions & 0 deletions rust-bors.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,42 @@ labels_blocking_approval = [
"S-waiting-on-t-rustdoc-frontend",
"S-waiting-on-t-clippy"
]

# If CI runs quicker than this duration, consider it to be a failure
min_ci_time = 600

[labels]
approved = [
"+S-waiting-on-bors",
"-S-blocked",
"-S-waiting-on-author",
"-S-waiting-on-crater",
"-S-waiting-on-review",
"-S-waiting-on-team"
]
unapproved = [
"+S-waiting-on-author",
"-S-blocked",
"-S-waiting-on-bors",
"-S-waiting-on-crater",
"-S-waiting-on-review",
"-S-waiting-on-team"
]
try_failed = [
"+S-waiting-on-author",
"-S-waiting-on-review",
"-S-waiting-on-crater"
]
auto_build_succeeded = ["+merged-by-bors"]
auto_build_failed = [
"+S-waiting-on-review",
"-S-blocked",
"-S-waiting-on-bors",
"-S-waiting-on-author",
"-S-waiting-on-crater",
"-S-waiting-on-team"
]

# Flip this two once new bors is used for actual merges on this repository
merge_queue_enabled = false
report_merge_conflicts = true
4 changes: 3 additions & 1 deletion src/ci/citool/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ impl GitHubContext {
let patterns = if !patterns.is_empty() { Some(patterns) } else { None };
Some(RunType::TryJob { job_patterns: patterns })
}
("push", "refs/heads/auto") => Some(RunType::AutoJob),
("push", "refs/heads/auto" | "refs/heads/automation/bors/auto") => {
Some(RunType::AutoJob)
}
("push", "refs/heads/main") => Some(RunType::MainJob),
_ => None,
}
Expand Down
26 changes: 0 additions & 26 deletions src/doc/rustc-dev-guide/ci/sembr/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,6 @@ version = "0.8.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"

[[package]]
name = "foldhash"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"

[[package]]
name = "globset"
version = "0.4.18"
Expand All @@ -167,15 +161,6 @@ dependencies = [
"regex-syntax",
]

[[package]]
name = "hashbrown"
version = "0.15.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1"
dependencies = [
"foldhash",
]

[[package]]
name = "heck"
version = "0.5.0"
Expand All @@ -198,16 +183,6 @@ dependencies = [
"winapi-util",
]

[[package]]
name = "imara-diff"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f01d462f766df78ab820dd06f5eb700233c51f0f4c2e846520eaf4ba6aa5c5c"
dependencies = [
"hashbrown",
"memchr",
]

[[package]]
name = "is_terminal_polyfill"
version = "1.70.2"
Expand Down Expand Up @@ -295,7 +270,6 @@ dependencies = [
"anyhow",
"clap",
"ignore",
"imara-diff",
"regex",
]

Expand Down
1 change: 0 additions & 1 deletion src/doc/rustc-dev-guide/ci/sembr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ edition = "2024"
[dependencies]
anyhow = "1"
ignore = "0.4"
imara-diff = "0.2"

[dependencies.regex]
version = "1"
Expand Down
70 changes: 18 additions & 52 deletions src/doc/rustc-dev-guide/ci/sembr/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use std::{fs, process};
use anyhow::Result;
use clap::Parser;
use ignore::Walk;
use imara_diff::{Algorithm, BasicLineDiffPrinter, Diff, InternedInput, UnifiedDiffConfig};
use regex::Regex;

#[derive(Parser)]
Expand All @@ -18,8 +17,6 @@ struct Cli {
/// Applies to lines that are to be split
#[arg(long, default_value_t = 100)]
line_length_limit: usize,
#[arg(long)]
show_diff: bool,
}

static REGEX_IGNORE_END: LazyLock<Regex> =
Expand Down Expand Up @@ -54,10 +51,6 @@ fn main() -> Result<()> {
} else if cli.overwrite {
fs::write(&path, new)?;
made_compliant.push(path.clone());
} else if cli.show_diff {
println!("{}:", path.display());
show_diff(&old, &new);
println!("---");
} else {
not_compliant.push(path.clone());
}
Expand All @@ -76,16 +69,6 @@ fn main() -> Result<()> {
Ok(())
}

fn show_diff(old: &str, new: &str) {
let input = InternedInput::new(old, new);
let mut diff = Diff::compute(Algorithm::Histogram, &input);
diff.postprocess_lines(&input);
let diff = diff
.unified_diff(&BasicLineDiffPrinter(&input.interner), UnifiedDiffConfig::default(), &input)
.to_string();
print!("{diff}");
}

fn display(header: &str, paths: &[PathBuf]) {
println!("{header}:");
for element in paths {
Expand All @@ -96,7 +79,9 @@ fn display(header: &str, paths: &[PathBuf]) {
fn ignore(line: &str, in_code_block: bool) -> bool {
in_code_block
|| line.to_lowercase().contains("e.g.")
|| line.to_lowercase().contains("n.b.")
|| line.contains("i.e.")
|| line.contains("et. al")
|| line.contains('|')
|| line.trim_start().starts_with('>')
|| line.starts_with('#')
Expand Down Expand Up @@ -213,6 +198,9 @@ some code. block
sentence with *italics* should not be ignored. truly.
git log main.. compiler
foo. bar. baz
o? whatever
r? @reviewer
r? @reviewer
";
let expected = "
# some. heading
Expand All @@ -238,12 +226,16 @@ git log main.. compiler
foo.
bar.
baz
o?
whatever
r? @reviewer
r? @reviewer
";
assert_eq!(expected, comply(original));
}

#[test]
fn test_prettify() {
fn test_lengthen_lines() {
let original = "\
do not split
short sentences
Expand All @@ -264,6 +256,12 @@ do not mess with code block chars
leave the
text alone
```

handle the
indented well

[a target]: https://example.com
[another target]: https://example.com
";
let expected = "\
do not split short sentences
Expand All @@ -284,43 +282,11 @@ do not mess with code block chars
leave the
text alone
```
";
assert_eq!(expected, lengthen_lines(original, 50));
}

#[test]
fn test_prettify_prefix_spaces() {
let original = "\
do not split
short sentences
";
let expected = "\
do not split short sentences
";
assert_eq!(expected, lengthen_lines(original, 50));
}
handle the indented well

#[test]
fn test_prettify_ignore_link_targets() {
let original = "\
[a target]: https://example.com
[another target]: https://example.com
";
assert_eq!(original, lengthen_lines(original, 100));
}

#[test]
fn test_sembr_question_mark() {
let original = "
o? whatever
r? @reviewer
r? @reviewer
";
let expected = "
o?
whatever
r? @reviewer
r? @reviewer
";
assert_eq!(expected, comply(original));
assert_eq!(expected, lengthen_lines(original, 50));
}
2 changes: 1 addition & 1 deletion src/doc/rustc-dev-guide/rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cec70080fd441d16e9fb08a0d1d1a04c72d1ed25
2dc30247c5d8293aaa31e1d7dae2ed2fde908ada
12 changes: 5 additions & 7 deletions src/doc/rustc-dev-guide/src/about-this-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ You might also find the following sites useful:
- [std-dev-guide] -- a similar guide for developing the standard library.
- [rust-analyzer book] -- documentation for the rust-analyzer.
- [The t-compiler Zulip][z]
- The [Rust Internals forum][rif], a place to ask questions and
discuss Rust's internals
- The [Rust Internals forum][rif], a place to ask questions and discuss Rust's internals
- The [Rust reference][rr], even though it doesn't specifically talk about
Rust's internals, is a great resource nonetheless
- Although out of date, [Tom Lee's great blog article][tlgba] is very helpful
Expand All @@ -89,11 +88,10 @@ You might also find the following sites useful:
the compiler, the books, the references, and the guides) to quickly find
information about the language and compiler.
- You can also use Rustdoc's built-in search feature to find documentation on
types and functions within the crates you're looking at. You can also search
by type signature! For example, searching for `* -> vec` should find all
functions that return a `Vec<T>`.
_Hint:_ Find more tips and keyboard shortcuts by typing `?` on any Rustdoc
page!
types and functions within the crates you're looking at.
You can also search by type signature!
For example, searching for `* -> vec` should find all functions that return a `Vec<T>`.
_Hint:_ Find more tips and keyboard shortcuts by typing `?` on any Rustdoc page!


[rustc dev guide]: about-this-guide.md
Expand Down
Loading
Loading