Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
580a179
Add missing runtime tests for alias intrinsics: _mm_cvt_ss2si, _mm_cv…
ArunTamil21 Feb 26, 2026
63fb6c3
Refactor alias tests using meta function pattern and add missing test…
ArunTamil21 Feb 26, 2026
455b21b
Restore deleted test_mm_store_ps
ArunTamil21 Feb 26, 2026
952302a
Remove redundant tests for _mm_prefetch and _mm_undefined_ps
ArunTamil21 Feb 27, 2026
58e5c0e
Refactor alias tests using macros instead of meta functions
ArunTamil21 Mar 12, 2026
ec448dd
Merge upstream/main and resolve conflict in x86-intel.rs
ArunTamil21 Mar 12, 2026
0eb04eb
Fix formatting
ArunTamil21 Mar 12, 2026
68a6ace
Use macros for test body deduplication in SSE alias tests
ArunTamil21 Mar 17, 2026
7da5fbc
Fix formatting
ArunTamil21 Mar 17, 2026
9adc2b0
Mark the LoongArch intrinsics as inline(always)
heiher Mar 19, 2026
dc3ba83
Add more docs on how to run the generator
jyn514 Mar 19, 2026
93c4d0a
Merge pull request #2064 from ferrocene/jyn/docs
sayantn Mar 21, 2026
2c76cb3
Use const fn and remove unsafe from alias test wrappers
ArunTamil21 Mar 22, 2026
3057334
Mark alias test wrappers as const fn where supported and clean up ski…
ArunTamil21 Mar 24, 2026
1eafc19
Merge pull request #2041 from ArunTamil21/add-alias-tests
sayantn Mar 25, 2026
f8369e3
Merge pull request #2065 from heiher/loong-inline-always
Amanieu Mar 26, 2026
8e815f9
Prepare for merging from rust-lang/rust
invalid-email-address Mar 31, 2026
79e3df6
Merge ref 'e4fdb554ad2c' from rust-lang/rust
invalid-email-address Mar 31, 2026
1276db5
Fix rustc-pull CI workflow
Kobzol Apr 1, 2026
c4f14ad
Avoid suggest format string field access for braced paths
xizheyin Apr 1, 2026
598640b
disable hexagon tests for now
folkertdev Apr 6, 2026
ebfdd89
Merge pull request #2067 from rust-lang/rustc-pull
folkertdev Apr 6, 2026
8f3850c
check that store/load rountrip initializes all bytes
folkertdev Mar 19, 2026
cb0d495
support roundtrip of `vst3q`
folkertdev Mar 19, 2026
4b52401
run `test_vld3q` tests with miri on CI
folkertdev Mar 19, 2026
8e2069e
run some aarch64 tests with miri on CI
folkertdev Mar 31, 2026
0a4221d
Merge pull request #2066 from folkertdev/basic-miri-roundtrip
sayantn Apr 6, 2026
548d790
loongarch: Remove unnecessary `transmute` calls
heiher Mar 31, 2026
3d93de5
Merge pull request #2068 from heiher/loong-clippy
Amanieu Apr 7, 2026
5a44da6
make `vld4q` portable
folkertdev Apr 8, 2026
f8879e3
hexagon: Preserve original Q6 naming case for HVX intrinsics
androm3da Apr 8, 2026
aedb8df
Merge pull request #2074 from androm3da/hexagon-hvx-case-preserved
folkertdev Apr 8, 2026
8d85d1d
Do not use `SimdM::new` and remove `simd_m_ty!`
eduardosm Apr 10, 2026
4103f7d
Do not use a macro to define `Simd::new`
eduardosm Apr 10, 2026
cc1e6d8
Merge pull request #2076 from eduardosm/Simd-new
folkertdev Apr 10, 2026
7bd98dd
Merge pull request #2073 from folkertdev/more-miri-tests
sayantn Apr 11, 2026
c43636e
loongarch: Avoid constant folding in tests to ensure SIMD coverage
heiher Apr 9, 2026
cd061c7
Extend `core::char`'s documentation of casing issues
Jules-Bertholet Apr 11, 2026
0086450
Merge pull request #2075 from heiher/loong64-tests-avoid-const-folding
sayantn Apr 12, 2026
139f964
Update SDE to v10.8.0
sayantn Apr 12, 2026
15c1e34
Merge pull request #2080 from sayantn/sde-update
folkertdev Apr 12, 2026
9f43e2a
stdarch-verify: re-add runtime test check
davidtwco Mar 2, 2026
2637e08
gen-arm: add `generate_load_store_tests`
davidtwco Jan 15, 2026
8077797
gen-arm: remove `SvUndef`
davidtwco Feb 28, 2026
55b65ff
gen-arm: s/simd_reinterpret/transmute_unchecked
davidtwco Jan 15, 2026
c884079
gen-arm: `auto-llvm-sign-conversion` not for `into`
davidtwco Jan 15, 2026
2120148
core_arch: add `static_assert_range`
davidtwco Jan 15, 2026
826ab8b
core_arch: sve types
davidtwco Jan 15, 2026
78ccc92
gen-arm: use `sve_into` instead of `into`
davidtwco Jan 16, 2026
a7d4530
gen-arm: correct renamed `from_exposed_addr` link
davidtwco Mar 4, 2026
ca5032f
gen-arm: add sve intrinsic definitions
davidtwco Jan 15, 2026
a753cf4
core_arch: generated sve intrinsics
davidtwco Jan 15, 2026
a50a2e4
resolve: Introduce `(Local,Extern)Module` newtypes for local and exte…
petrochenkov Mar 27, 2026
6a6e844
intrinsics_data: add sve intrinsics
davidtwco Feb 28, 2026
a370aa3
stdarch-verify: support sve
davidtwco Jan 16, 2026
b6b2ce3
core_arch: no SVE on arm64ec
davidtwco Mar 4, 2026
c21d4e9
intrinsic-test: update parsing for SVE intrinsics
davidtwco Mar 4, 2026
88b4908
assert-instr: support type generics
davidtwco Apr 9, 2026
acb48ca
gen-arm: disable `assert_instr` for `pfalse`
davidtwco Apr 13, 2026
e6c0129
stdarch-test: `[us]shll[tb]` have no aliases
davidtwco Apr 14, 2026
b181867
gen-arm: `assert_instr` on msvc for `[su]mull[tb]`
davidtwco Apr 14, 2026
b0d91aa
core_arch: disable ld/st tests on msvc
davidtwco Apr 14, 2026
69aad1a
Fix MIPS tests
eduardosm Apr 11, 2026
96fb37a
add : new UI test
lms0806 Apr 15, 2026
be3f77c
resolve : addressing incorrect recommendation methods
lms0806 Apr 15, 2026
bbc4554
Merge pull request #2079 from eduardosm/mips-tests
folkertdev Apr 15, 2026
9e4d2a7
Merge pull request #2071 from davidtwco/sve-intrinsics
Amanieu Apr 15, 2026
6236dde
Remove AttributeSafety from BUILTIN_ATTRIBUTES
JonathanBrouwer Apr 4, 2026
3b123ce
ImproperCTypes: Move erasing_region_normalisation into helper function
niacdoial Jan 24, 2026
a9d7027
rustdoc: percent-encode URL fragments
Jules-Bertholet Apr 14, 2026
9824267
tests/debuginfo/basic-stepping.rs: Remove FIXME related to ZSTs
Enselic Apr 16, 2026
52ad8c0
rustdoc: preserve `doc(cfg)` on locally re-exported type aliases
shivendra02467 Apr 7, 2026
0529b94
Move `Token` impl block.
nnethercote Apr 16, 2026
9e940e4
Merge `Printer` impl blocks.
nnethercote Apr 16, 2026
0e522d6
naked functions: respect `function_sections` on windows
folkertdev Oct 17, 2025
872301b
naked functions: respect `function_sections` on linux/macos
folkertdev Oct 17, 2025
25e1647
naked functions: add run-make test for DCE
folkertdev Oct 17, 2025
bc4aad3
naked-functions: properly document the -Zfunction-sections windows st…
folkertdev Jan 17, 2026
7787bd9
fix macho section specifier & windows test
folkertdev Mar 29, 2026
cc1ebb5
add uefi to windows link section test
folkertdev Apr 16, 2026
41afd5f
handle `uefi` and test assembly versus regular functions
folkertdev Apr 16, 2026
b8ba400
c-variadic: handle c_int being i16 and c_double being f32 on avr
folkertdev Feb 22, 2026
a875e14
c-variadic: make `VaArgSafe` a lang item
folkertdev Feb 22, 2026
78a465a
Use `box_new` diagnostic item for Box::new suggestions
cijiugechu Apr 16, 2026
d0f5b5c
Replace redundant unwrap with get_or_insert_with
zetanumbers Apr 16, 2026
4645f03
triagebot: notify on diagnostic attribute changes
mejrs Apr 16, 2026
2d65699
Rollup merge of #155385 - davidtwco:stdarch-sync-160426, r=davidtwco
JonathanBrouwer Apr 16, 2026
620fd83
Rollup merge of #141633 - xizheyin:issue-141350, r=nnethercote
JonathanBrouwer Apr 16, 2026
5aa60e9
Rollup merge of #147811 - folkertdev:naked-function-sections, r=Amanieu
JonathanBrouwer Apr 16, 2026
72a8355
Rollup merge of #152980 - folkertdev:c-variadic-avr, r=tgross35
JonathanBrouwer Apr 16, 2026
f073792
Rollup merge of #154491 - Jules-Bertholet:case-docs, r=Mark-Simulacru…
JonathanBrouwer Apr 16, 2026
fce9efc
Rollup merge of #155242 - petrochenkov:modmodmod, r=mu001999
JonathanBrouwer Apr 16, 2026
203b87b
Rollup merge of #155354 - JonathanBrouwer:attr-safety-port-2, r=mejrs
JonathanBrouwer Apr 16, 2026
1364947
Rollup merge of #154970 - shivendra02467:fix-rustdoc-154921, r=Guilla…
JonathanBrouwer Apr 16, 2026
3e6d715
Rollup merge of #155095 - lms0806:issue_155030, r=nnethercote
JonathanBrouwer Apr 16, 2026
6554bfb
Rollup merge of #155358 - niacdoial:improperctypes-refactor2.1, r=pet…
JonathanBrouwer Apr 16, 2026
41da85a
Rollup merge of #155377 - Enselic:stepping-zsts, r=petrochenkov
JonathanBrouwer Apr 16, 2026
d5ca647
Rollup merge of #155383 - nnethercote:rearrange-rustc_ast_pretty, r=W…
JonathanBrouwer Apr 16, 2026
e80fd0e
Rollup merge of #155384 - mejrs:pingme, r=jieyouxu
JonathanBrouwer Apr 16, 2026
6db7ce1
Rollup merge of #155386 - cijiugechu:fix-box-new-diagnostic-item, r=K…
JonathanBrouwer Apr 16, 2026
85ca316
Rollup merge of #155391 - zetanumbers:query_latch_oneliner, r=petroch…
JonathanBrouwer Apr 16, 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
49 changes: 0 additions & 49 deletions compiler/rustc_ast_pretty/src/helpers.rs

This file was deleted.

1 change: 0 additions & 1 deletion compiler/rustc_ast_pretty/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
#![feature(negative_impls)]
// tidy-alphabetical-end

mod helpers;
pub mod pp;
pub mod pprust;
135 changes: 134 additions & 1 deletion compiler/rustc_ast_pretty/src/pp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@
//! methods called `Printer::scan_*`, and the 'PRINT' process is the
//! method called `Printer::print`.

mod convenience;
mod ring;

use std::borrow::Cow;
Expand Down Expand Up @@ -188,6 +187,12 @@ pub(crate) enum Token {
End,
}

impl Token {
pub(crate) fn is_hardbreak_tok(&self) -> bool {
*self == Printer::hardbreak_tok_offset(0)
}
}

#[derive(Copy, Clone)]
enum PrintFrame {
Fits,
Expand Down Expand Up @@ -479,4 +484,132 @@ impl Printer {
self.out.push_str(string);
self.space -= string.len() as isize;
}

/// Synthesizes a comment that was not textually present in the original
/// source file.
pub fn synth_comment(&mut self, text: impl Into<Cow<'static, str>>) {
self.word("/*");
self.space();
self.word(text);
self.space();
self.word("*/")
}

/// "raw box"
pub fn rbox(&mut self, indent: isize, breaks: Breaks) -> BoxMarker {
self.scan_begin(BeginToken { indent: IndentStyle::Block { offset: indent }, breaks })
}

/// Inconsistent breaking box
pub fn ibox(&mut self, indent: isize) -> BoxMarker {
self.rbox(indent, Breaks::Inconsistent)
}

/// Consistent breaking box
pub fn cbox(&mut self, indent: isize) -> BoxMarker {
self.rbox(indent, Breaks::Consistent)
}

pub fn visual_align(&mut self) -> BoxMarker {
self.scan_begin(BeginToken { indent: IndentStyle::Visual, breaks: Breaks::Consistent })
}

pub fn break_offset(&mut self, n: usize, off: isize) {
self.scan_break(BreakToken {
offset: off,
blank_space: n as isize,
..BreakToken::default()
});
}

pub fn end(&mut self, b: BoxMarker) {
self.scan_end(b)
}

pub fn eof(mut self) -> String {
self.scan_eof();
self.out
}

pub fn word<S: Into<Cow<'static, str>>>(&mut self, wrd: S) {
let string = wrd.into();
self.scan_string(string)
}

pub fn word_space<W: Into<Cow<'static, str>>>(&mut self, w: W) {
self.word(w);
self.space();
}

pub fn nbsp(&mut self) {
self.word(" ")
}

pub fn word_nbsp<S: Into<Cow<'static, str>>>(&mut self, w: S) {
self.word(w);
self.nbsp()
}

fn spaces(&mut self, n: usize) {
self.break_offset(n, 0)
}

pub fn zerobreak(&mut self) {
self.spaces(0)
}

pub fn space(&mut self) {
self.spaces(1)
}

pub fn popen(&mut self) {
self.word("(");
}

pub fn pclose(&mut self) {
self.word(")");
}

pub fn hardbreak(&mut self) {
self.spaces(SIZE_INFINITY as usize)
}

pub fn is_beginning_of_line(&self) -> bool {
match self.last_token() {
Some(last_token) => last_token.is_hardbreak_tok(),
None => true,
}
}

pub fn hardbreak_if_not_bol(&mut self) {
if !self.is_beginning_of_line() {
self.hardbreak()
}
}

pub fn space_if_not_bol(&mut self) {
if !self.is_beginning_of_line() {
self.space();
}
}

pub(crate) fn hardbreak_tok_offset(off: isize) -> Token {
Token::Break(BreakToken {
offset: off,
blank_space: SIZE_INFINITY,
..BreakToken::default()
})
}

pub fn trailing_comma(&mut self) {
self.scan_break(BreakToken { pre_break: Some(','), ..BreakToken::default() });
}

pub fn trailing_comma_or_space(&mut self) {
self.scan_break(BreakToken {
blank_space: 1,
pre_break: Some(','),
..BreakToken::default()
});
}
}
97 changes: 0 additions & 97 deletions compiler/rustc_ast_pretty/src/pp/convenience.rs

This file was deleted.

2 changes: 2 additions & 0 deletions compiler/rustc_attr_parsing/src/attributes/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ use rustc_session::parse::{ParseSess, feature_err};
use rustc_span::{ErrorGuaranteed, Span, Symbol, sym};
use thin_vec::ThinVec;

use crate::attributes::AttributeSafety;
use crate::context::{AcceptContext, ShouldEmit, Stage};
use crate::parser::{
AllowExprMetavar, ArgParser, MetaItemListParser, MetaItemOrLitParser, NameValueParser,
Expand Down Expand Up @@ -410,6 +411,7 @@ fn parse_cfg_attr_internal<'a>(
attribute.style,
AttrPath { segments: attribute.path().into_boxed_slice(), span: attribute.span },
Some(attribute.get_normal_item().unsafety),
AttributeSafety::Normal,
ParsedDescription::Attribute,
pred_span,
lint_node_id,
Expand Down
2 changes: 2 additions & 0 deletions compiler/rustc_attr_parsing/src/attributes/cfg_select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use rustc_session::Session;
use rustc_session::lint::builtin::UNREACHABLE_CFG_SELECT_PREDICATES;
use rustc_span::{ErrorGuaranteed, Span, Symbol, sym};

use crate::attributes::AttributeSafety;
use crate::parser::{AllowExprMetavar, MetaItemOrLitParser};
use crate::{AttributeParser, ParsedDescription, ShouldEmit, errors, parse_cfg_entry};

Expand Down Expand Up @@ -105,6 +106,7 @@ pub fn parse_cfg_select(
AttrStyle::Inner,
AttrPath { segments: vec![sym::cfg_select].into_boxed_slice(), span: cfg_span },
None,
AttributeSafety::Normal,
ParsedDescription::Macro,
cfg_span,
lint_node_id,
Expand Down
6 changes: 6 additions & 0 deletions compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
use rustc_hir::attrs::{CoverageAttrKind, OptimizeAttr, RtsanSetting, SanitizerSet, UsedBy};
use rustc_session::parse::feature_err;
use rustc_span::edition::Edition::Edition2024;

use super::prelude::*;
use crate::attributes::AttributeSafety;
use crate::session_diagnostics::{
NakedFunctionIncompatibleAttribute, NullOnExport, NullOnObjcClass, NullOnObjcSelector,
ObjcClassExpectedStringLiteral, ObjcSelectorExpectedStringLiteral,
Expand Down Expand Up @@ -103,6 +105,7 @@ pub(crate) struct ExportNameParser;
impl<S: Stage> SingleAttributeParser<S> for ExportNameParser {
const PATH: &[rustc_span::Symbol] = &[sym::export_name];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::WarnButFutureError;
const SAFETY: AttributeSafety = AttributeSafety::Unsafe { unsafe_since: Some(Edition2024) };
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
Allow(Target::Static),
Allow(Target::Fn),
Expand Down Expand Up @@ -220,6 +223,7 @@ impl<S: Stage> AttributeParser<S> for NakedParser {
this.span = Some(cx.attr_span);
}
})];
const SAFETY: AttributeSafety = AttributeSafety::Unsafe { unsafe_since: None };
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
Allow(Target::Fn),
Allow(Target::Method(MethodKind::Inherent)),
Expand Down Expand Up @@ -340,6 +344,7 @@ pub(crate) struct NoMangleParser;
impl<S: Stage> NoArgsAttributeParser<S> for NoMangleParser {
const PATH: &[Symbol] = &[sym::no_mangle];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn;
const SAFETY: AttributeSafety = AttributeSafety::Unsafe { unsafe_since: Some(Edition2024) };
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowListWarnRest(&[
Allow(Target::Fn),
Allow(Target::Static),
Expand Down Expand Up @@ -542,6 +547,7 @@ pub(crate) struct ForceTargetFeatureParser;
impl<S: Stage> CombineAttributeParser<S> for ForceTargetFeatureParser {
type Item = (Symbol, Span);
const PATH: &[Symbol] = &[sym::force_target_feature];
const SAFETY: AttributeSafety = AttributeSafety::Unsafe { unsafe_since: None };
const CONVERT: ConvertFn<Self::Item> = |items, span| AttributeKind::TargetFeature {
features: items,
attr_span: span,
Expand Down
Loading
Loading