Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
dcf3a6e
feat: show custom iter adapter in chaining inlayHints
A4-Tacks Oct 22, 2026
21ab4d5
Introduce StoredTerm
nicolas-guichard Oct 13, 2026
e786ac2
Introduce hir_ty::next_solver::TermRefId and TermRefIdPacked
nicolas-guichard Sep 22, 2025
a234c72
Record inferred const for type or const placeholders
nicolas-guichard Sep 22, 2025
86bcadc
Fix extract_type_alias with const generics
nicolas-guichard Sep 22, 2025
8c91870
add tests for `Pool` and fix atomic ordering issue
BenjaminBrienen Nov 16, 2026
3ee2c5d
Merge pull request #23459 from BenjaminBrienen/pool-tests
lnicola Nov 16, 2026
fde3f54
use trusted publishing
BenjaminBrienen Nov 13, 2026
b54f519
Merge pull request #23470 from BenjaminBrienen/trusted-publishing
lnicola Nov 17, 2026
217ada1
ops: Disable credential persistence
hashcatHitman Oct 31, 2026
8ca56db
ops: Prefer `GITHUB_REF` over `github.ref`
hashcatHitman Nov 1, 2026
2d1616c
ops: Prefer `GITHUB_RUN_ID` over `github.run_id`
hashcatHitman Nov 1, 2026
5dd5cfb
ops: Prefer `GITHUB_RUN_NUMBER` over `github.run_number`
hashcatHitman Nov 2, 2026
c76f9d5
ops: Prefer `GITHUB_REPOSITORY` over `github.repository`
hashcatHitman Nov 2, 2026
892e0c2
ops: Prefer shell expansion over template expansion
hashcatHitman Nov 2, 2026
3ab2eaa
ops: Expand `matrix.target` in `env`
hashcatHitman Nov 2, 2026
2c5f92b
ops: Expand `matrix.code-target` in `env`
hashcatHitman Nov 2, 2026
3843e7a
ops: Expand `matrix.names` in `env`
hashcatHitman Nov 2, 2026
b2d8193
ops: Expand `secrets.GITHUB_TOKEN` in `env`
hashcatHitman Nov 2, 2026
ff75e73
ops: Expand `secrets.METRICS_DEPLOY_KEY` in `env`
hashcatHitman Nov 2, 2026
2ae9409
ops: Expand `matrix.cmd` in `env`
hashcatHitman Nov 2, 2026
2a6e8c8
ops: Expand pre-release flag check in `env`
hashcatHitman Nov 2, 2026
ec2e3dc
ops: Expand `llvm-tools` component optional in `env`
hashcatHitman Nov 2, 2026
84455d4
ops: Expand PGO optional in `env`
hashcatHitman Nov 2, 2026
3d06c34
ops: Expand `toJson(needs)` in `env`
hashcatHitman Nov 2, 2026
c3e6cc6
ops: Deduplicate environment variables a bit
hashcatHitman Nov 4, 2026
b7198fe
ops: Expand `matrix.authentication` in `env`
hashcatHitman Nov 17, 2026
68d90ef
minor: short too long roots scanned std path
A4-Tacks Nov 17, 2026
29db7d5
Merge pull request #23672 from A4-Tacks/short-scanned-path
ChayimFriedman2 Nov 17, 2026
12af71a
fix: Accidentally quadratic performance in type inference
Wilfred Nov 16, 2026
71d8acb
Merge pull request #23678 from Wilfred/fix/well-formed-obligation-bui…
ChayimFriedman2 Nov 18, 2026
bf1a91e
Add `r? @ghost` Josh push PR suffix
Kobzol Nov 18, 2026
e694725
Merge pull request #23681 from Kobzol/josh-sync-msg
lnicola Nov 18, 2026
2423345
Prepare for merging from rust-lang/rust
invalid-email-address Nov 19, 2026
83d4957
Merge ref 'e3b9a8345a8a' from rust-lang/rust
invalid-email-address Nov 19, 2026
9a84cb5
Merge pull request #23684 from rust-lang/rustc-pull
lnicola Nov 19, 2026
4f4eae5
fix: allow notable_trait attr args
A4-Tacks Nov 19, 2026
d1b11ad
Enable static-pie on all Musl targets
bjorn3 Nov 19, 2026
6bd3a7f
Merge pull request #23685 from A4-Tacks/notable-trait-args
ChayimFriedman2 Nov 19, 2026
f110dbb
fix: make sure copied lock files are writable
nbdd0121 Nov 19, 2026
d064780
Exclude proc macro crates from lang item computations for their depen…
ChayimFriedman2 Nov 19, 2026
4956c69
Introduce a hack for `PartialEq` lang item attr change in core lib
ShoyuVanilla Nov 20, 2026
f2589b2
Merge pull request #23689 from ChayimFriedman2/lang-items-skip-proc-m…
ShoyuVanilla Nov 20, 2026
8fae9c1
Merge pull request #23594 from hashcatHitman/zizmor
ShoyuVanilla Nov 20, 2026
8abf316
Merge pull request #23691 from ShoyuVanilla/lang-eq
ChayimFriedman2 Nov 20, 2026
ebac758
Add a reason suggestion for malformed lint attributes
vsriramv Nov 20, 2026
b5ff004
Merge pull request #23688 from nbdd0121/master
ChayimFriedman2 Nov 20, 2026
724b27a
fix: Respect is_workspace_member for all crates in rust-project.json
Wilfred Nov 20, 2026
7745f18
Updated UI tests for malformed lint suggestions
vsriramv Nov 20, 2026
64b9abc
Merge pull request #23549 from A4-Tacks/custom-iter-adapter-hints
ShoyuVanilla Nov 20, 2026
d199306
Merge pull request #22211 from nicolas-guichard/push-qltvotzxsuqw
ShoyuVanilla Nov 20, 2026
2a965fd
rm from `Type::instaniate`
ada4a Nov 20, 2026
af81b91
rm from `Type::instaniate_with_errors`
ada4a Nov 20, 2026
13c67ef
rm from `Type::unknown`
ada4a Nov 20, 2026
e2086b9
rm from `Type::new_unit`
ada4a Nov 20, 2026
4a78389
Merge pull request #23694 from Wilfred/fix/sysroot-project-workspace-…
ChayimFriedman2 Nov 21, 2026
1a5a2d8
Merge pull request #23697 from ada4a/push-nlkwmoxmzznk
ChayimFriedman2 Nov 21, 2026
e0f9933
minor: add test for auto import carrying a cfg attr from a macro
shulaoda Nov 21, 2026
fe17b8c
Merge pull request #23704 from shulaoda/11-22-minor_add_test_for_auto…
ChayimFriedman2 Nov 21, 2026
eddfd50
internal: update generated lints and target features
workflows-rust-analyzer[bot] Nov 21, 2026
67d30f4
Merge pull request #23705 from rust-lang/ci/gen-sync
lnicola Nov 22, 2026
09d7afc
Reduce code duplication in substs_from_args_and_bindings
nicolas-guichard Jun 4, 2026
dafb375
Drop references to codebuild
Mark-Simulacrum Nov 22, 2026
6600391
Merge pull request #23707 from nicolas-guichard/push-wxqvntuvmzyp
ShoyuVanilla Nov 23, 2026
fdccf0a
Suppressed a follow up unused lint warning
vsriramv Nov 23, 2026
bf55ac7
Undo accidentally introduced duplication checking for attributes on m…
JonathanBrouwer Nov 23, 2026
0df0070
Add regression test
JonathanBrouwer Nov 23, 2026
30cd4b3
Rollup merge of #166381 - lnicola:sync-from-ra, r=lnicola
JonathanBrouwer Nov 23, 2026
b728f31
Rollup merge of #166191 - bjorn3:musl_static_pie, r=petrochenkov
JonathanBrouwer Nov 23, 2026
a5a72dd
Rollup merge of #166374 - JonathanBrouwer:undo-regression, r=mejrs
JonathanBrouwer Nov 23, 2026
ea4eff6
Rollup merge of #166250 - vsriramv:improving_error_output, r=Jonathan…
JonathanBrouwer Nov 23, 2026
df668ef
Rollup merge of #166365 - Mark-Simulacrum:remove-codebuild, r=Kobzol
JonathanBrouwer Nov 23, 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
13 changes: 7 additions & 6 deletions compiler/rustc_attr_parsing/src/attributes/lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ impl LintParser {
fn parse(&mut self, kind: LintCheckKind, cx: &mut AcceptContext<'_, '_>, args: &ArgParser) {
let attr_span = cx.attr_span;
let attr_id = cx.attr_id.expect("no `AttrId` for lint attribute");
let mut has_invalid_reason_key = false;

if let Some(list) = cx.expect_list(args, cx.attr_span) {
let mut parsers = list.sub_parsers();
Expand All @@ -37,16 +38,16 @@ impl LintParser {
let p = parsers.last()?.meta_item()?;
let nv = p.args().as_name_value()?;
if !p.path().word_is(sym::reason) {
// FIXME: We should recommend `reason` here
has_invalid_reason_key = true;
cx.emit_err(MalformedLintAttributeInput {
span: p.span(),
help: MalformedLintAttributeInputHelp::Other { kind: kind.sym() },
help: MalformedLintAttributeInputHelp::Reason {
reason_span: p.path().span(),
},
kind: kind.sym(),
});
} else {
parsers = &parsers[..(parsers.len() - 1)];
}

parsers = &parsers[..(parsers.len() - 1)];
let reason = nv.expect_string_literal(cx)?;
reason
};
Expand Down Expand Up @@ -110,7 +111,7 @@ impl LintParser {

// FIXME(164898) Lint attributes are unique because they're parsed twice with `ShouldEmit::ErrorsAndLints`
// To avoid emitting the lint twice, we check `cx.parse_filter`, which will be `Some` during AST linting
if parsers.is_empty() && cx.parse_filter.is_none() {
if parsers.is_empty() && cx.parse_filter.is_none() && !has_invalid_reason_key {
cx.emit_lint(
UNUSED_ATTRIBUTES,
diagnostics::Unused {
Expand Down
10 changes: 10 additions & 0 deletions compiler/rustc_attr_parsing/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2233,6 +2233,16 @@ pub(crate) struct MalformedLintAttributeInput {
pub(crate) enum MalformedLintAttributeInputHelp {
#[help("try using `#[{$kind}({$sym})]`")]
StrLit { sym: Symbol, kind: Symbol },
#[suggestion(
"to provide a reason, use `reason = \"\"`",
code = "reason",
applicability = "machine-applicable",
style = "verbose"
)]
Reason {
#[primary_span]
reason_span: Span,
},
#[help("for example, write `#[{$kind}(dead_code)]` for `dead_code`")]
Other { kind: Symbol },
}
Expand Down
41 changes: 29 additions & 12 deletions compiler/rustc_expand/src/expand.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::path::PathBuf;
use std::rc::Rc;
use std::sync::Arc;
use std::{iter, mem};
use std::{iter, mem, slice};

use rustc_ast::mut_visit::*;
use rustc_ast::tokenstream::TokenStream;
Expand Down Expand Up @@ -2228,17 +2228,34 @@ impl<'a, 'b> InvocationCollector<'a, 'b> {
// Run attributes through the attribute parser
// since they will not be detected after macro expansion.
fn check_attributes(&self, attrs: &[ast::Attribute], call: &ast::MacCall) {
AttributeParser::parse_limited_all(
self.cx.sess,
attrs,
None,
AstTarget::MacroCall,
call.span(),
self.cx.current_expansion.lint_node_id,
Some(self.cx.ecfg.features),
ShouldEmit::ErrorsAndLints { recovery: Recovery::Allowed },
Some(self.cx.resolver.registered_attr_tools()),
);
let parse = |group| {
AttributeParser::parse_limited_all(
self.cx.sess,
group,
None,
AstTarget::MacroCall,
call.span(),
self.cx.current_expansion.lint_node_id,
Some(self.cx.ecfg.features),
ShouldEmit::ErrorsAndLints { recovery: Recovery::Allowed },
Some(self.cx.resolver.registered_attr_tools()),
)
};

let mut doc_attrs = vec![];
for attr in attrs {
if matches!(attr.kind, AttrKind::DocComment(..)) {
doc_attrs.push(attr.clone());
continue;
}
parse(slice::from_ref(attr));
}

// Parse all doc comments together in a group, to prevent a group of
// unused doc comments from emitting multiple lints
if !doc_attrs.is_empty() {
parse(doc_attrs.as_slice());
}
}

fn expand_cfg_true(
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_target/src/spec/base/linux_musl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ pub(crate) fn opts() -> TargetOptions {
pre_link_objects_self_contained: crt_objects::pre_musl_self_contained(),
post_link_objects_self_contained: crt_objects::post_musl_self_contained(),
link_self_contained: LinkSelfContainedDefault::InferredForMusl,
static_position_independent_executables: true,
..base::linux::opts()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ pub(crate) fn target() -> Target {
base.max_atomic_width = Some(64);
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]);
base.stack_probes = StackProbeType::Inline;
base.static_position_independent_executables = true;
base.supported_sanitizers = SanitizerSet::ADDRESS
| SanitizerSet::CFI
| SanitizerSet::LEAK
Expand Down
11 changes: 2 additions & 9 deletions src/ci/citool/src/jobs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ pub struct Job {
pub free_disk: Option<bool>,
/// Documentation link to a resource that could help people debug this CI job.
pub doc_url: Option<String>,
/// Whether the job is executed on AWS CodeBuild.
pub codebuild: Option<bool>,
/// Which Python version (if any) is required. On Windows, this is typically required to run
/// LLDB.
#[serde(default)]
Expand Down Expand Up @@ -170,7 +168,6 @@ fn validate_job_database(db: &JobDatabase) -> anyhow::Result<()> {
only_on_channel,
free_disk,
doc_url,
codebuild,
required_python_version,

// Carve-out configs allowed to be different.
Expand All @@ -183,7 +180,6 @@ fn validate_job_database(db: &JobDatabase) -> anyhow::Result<()> {
&& *only_on_channel == auto_job.only_on_channel
&& *free_disk == auto_job.free_disk
&& *doc_url == auto_job.doc_url
&& *codebuild == auto_job.codebuild
&& *required_python_version == auto_job.required_python_version
{
Ok(())
Expand Down Expand Up @@ -249,14 +245,12 @@ struct GithubActionsJob {
#[serde(skip_serializing_if = "Option::is_none")]
doc_url: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
codebuild: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
required_python_version: Option<String>,
}

/// Replace GitHub context variables with environment variables in job configs.
/// Used for codebuild jobs like
/// `codebuild-ubuntu-22-8c-$github.run_id-$github.run_attempt`
///
/// This is used for self-hosted runner jobs to loosely tie an instance to a particular GHA job.
fn substitute_github_vars(jobs: Vec<Job>) -> anyhow::Result<Vec<Job>> {
let run_id = load_env_var("GITHUB_RUN_ID")?;
let run_attempt = load_env_var("GITHUB_RUN_ATTEMPT")?;
Expand Down Expand Up @@ -382,7 +376,6 @@ fn calculate_jobs(
continue_on_error: job.continue_on_error,
free_disk: job.free_disk,
doc_url: job.doc_url,
codebuild: job.codebuild,
required_python_version: job.required_python_version,
}
})
Expand Down
67 changes: 0 additions & 67 deletions src/ci/citool/src/jobs/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,73 +81,6 @@ fn check_pattern(db: &JobDatabase, pattern: &str, expected: &[&str]) {
assert_eq!(jobs, expected);
}

/// Validate that CodeBuild jobs use Docker images from ghcr.io registry.
/// This is needed because otherwise from CodeBuild we get rate limited by Docker Hub.
fn validate_codebuild_image(job: &Job) -> anyhow::Result<()> {
let is_job_on_codebuild = job.codebuild.unwrap_or(false);
if !is_job_on_codebuild {
// Jobs in GitHub Actions don't get rate limited by Docker Hub.
return Ok(());
}

let image_name = job.image();
// we hardcode host-x86_64 here, because in codebuild we only run jobs for this architecture.
let dockerfile_path =
Path::new(DOCKER_DIRECTORY).join("host-x86_64").join(&image_name).join("Dockerfile");

if !dockerfile_path.exists() {
return Err(anyhow::anyhow!(
"Dockerfile not found for CodeBuild job '{}' at path: {}",
job.name,
dockerfile_path.display()
));
}

let dockerfile_content = utils::read_to_string(&dockerfile_path)?;

// Check if all FROM statement uses ghcr.io registry
let has_ghcr_from = dockerfile_content
.lines()
.filter(|line| line.trim_start().to_lowercase().starts_with("from "))
.all(|line| line.contains("ghcr.io"));

if !has_ghcr_from {
return Err(anyhow::anyhow!(
"CodeBuild job '{}' must use ghcr.io registry in its Dockerfile FROM statement. \
Dockerfile path: {dockerfile_path:?}",
job.name,
));
}

Ok(())
}

#[test]
fn validate_jobs() {
let db = {
let default_jobs_file = Path::new(JOBS_YML_PATH);
let db_str = utils::read_to_string(default_jobs_file).unwrap();
load_job_db(&db_str).expect("Failed to load job database")
};

let all_jobs = db
.pr_jobs
.iter()
.chain(db.try_jobs.iter())
.chain(db.auto_jobs.iter())
.chain(db.optional_jobs.iter())
.collect::<Vec<_>>();

let errors: Vec<anyhow::Error> =
all_jobs.into_iter().filter_map(|job| validate_codebuild_image(job).err()).collect();

if !errors.is_empty() {
let error_messages =
errors.into_iter().map(|e| format!("- {e}")).collect::<Vec<_>>().join("\n");
panic!("Job validation failed:\n{error_messages}");
}
}

#[test]
fn pr_job_implies_auto_job() {
let db = load_job_db(
Expand Down
2 changes: 1 addition & 1 deletion src/ci/scripts/free-disk-space-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ isX86() {
}

# Check if we're on a GitHub hosted runner.
# In aws codebuild, the variable RUNNER_ENVIRONMENT is "self-hosted".
# In self hosted runners, the variable RUNNER_ENVIRONMENT is "self-hosted".
isGitHubRunner() {
# `:-` means "use the value of RUNNER_ENVIRONMENT if it exists, otherwise use an empty string".
if [[ "${RUNNER_ENVIRONMENT:-}" == "github-hosted" ]]; then
Expand Down
1 change: 1 addition & 0 deletions src/tools/rust-analyzer/.github/workflows/autopublish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
with:
fetch-depth: 0
persist-credentials: false

# https://github.com/jlumbroso/free-disk-space/blob/main/action.yml
- name: Free up some disk space
Expand Down
Loading
Loading