Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
0645ac3
extract s390x `vector` and friends to their own rust feature
folkertdev Aug 20, 2025
d69442f
`std_detect`: remove unneeded stability lines from s390x features macro
folkertdev Aug 20, 2025
02e4db5
`std_detect`: give s390x features more accurate features / tracking i…
folkertdev Aug 20, 2025
c59298d
stabilize `stdarch_s390x_feature_detection`
folkertdev Aug 20, 2025
7516645
stabilize `s390x_target_feature_vector`
folkertdev Aug 20, 2025
1a9cc78
re-use `self.get_all_attrs` result for pass indirectly attribute
folkertdev Nov 6, 2025
12cde30
Add note for identifier with attempted hygiene violation
chenyukang Nov 7, 2025
c92ef47
Fix suggestion for returning async closures
chenyukang Nov 6, 2025
5ed01e9
Switch hexagon targets to rust-lld
androm3da Nov 7, 2025
fc20a28
Modify contributor email entries in .mailmap
hkBst Oct 28, 2025
f2794ce
Switch clean `print` methods into a function
GuillaumeGomez Nov 6, 2025
0f03429
Replace `Display::fmt` with `write_char`
GuillaumeGomez Nov 7, 2025
63efad0
Rollup merge of #145656 - folkertdev:stabilize-s390x-vector, r=Amanieu
GuillaumeGomez Nov 7, 2025
c91cc98
Rollup merge of #148204 - hkBst:patch-5, r=nnethercote
GuillaumeGomez Nov 7, 2025
298c104
Rollup merge of #148556 - chenyukang:yukang-fix-148493-async-closure,…
GuillaumeGomez Nov 7, 2025
126bfcb
Rollup merge of #148585 - GuillaumeGomez:improve-format-code, r=yotam…
GuillaumeGomez Nov 7, 2025
f4070cb
Rollup merge of #148600 - folkertdev:pass-indirectly-reuse-attrs, r=J…
GuillaumeGomez Nov 7, 2025
0ae62c9
Rollup merge of #148612 - chenyukang:yukang-fix-148580-macro-hygiene-…
GuillaumeGomez Nov 7, 2025
07d76d4
Rollup merge of #148613 - androm3da:bcain/hex_lld, r=JonathanBrouwer,…
GuillaumeGomez Nov 7, 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
19 changes: 16 additions & 3 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Aaron Todd <github@opprobrio.us>
Abhishek Chanda <abhishek.becs@gmail.com> Abhishek Chanda <abhishek@cloudscaling.com>
Abhijeet Bhagat <abhijeet.bhagat@gmx.com>
Abroskin Alexander <arkweid@evilmartians.com>
Adolfo Ochagavía <aochagavia92@gmail.com>
Adolfo Ochagavía <aochagavia92@gmail.com> <github@adolfo.ochagavia.xyz>
Adrian Heine né Lang <mail@adrianheine.de>
Adrien Tétar <adri-from-59@hotmail.fr>
Ahmed Charles <ahmedcharles@gmail.com> <acharles@outlook.com>
Expand All @@ -36,6 +36,7 @@ Amanda Stjerna <mail@amandastjerna.se> <albin.stjerna@gmail.com>
Amanda Stjerna <mail@amandastjerna.se> <amanda.stjerna@it.uu.se>
Amanieu d'Antras <amanieu@gmail.com> <amanieu.dantras@huawei.com>
Amos Onn <amosonn@gmail.com>
Amos Wenger <amoswenger@gmail.com> <fasterthanlime@users.noreply.github.com>
Ana-Maria Mihalache <mihalacheana.maria@yahoo.com>
Anatoly Ikorsky <aikorsky@gmail.com>
Andre Bogus <bogusandre@gmail.com>
Expand Down Expand Up @@ -276,7 +277,8 @@ Irina Popa <irinagpopa@gmail.com>
Ivan Ivaschenko <defuz.net@gmail.com>
ivan tkachenko <me@ratijas.tk>
J. J. Weber <jjweber@gmail.com>
Jack Huey <jack.huey@umassmed.edu> <jackh726@gmail.com>
Jack Huey <jackh726@gmail.com> <jack.huey@umassmed.edu>
Jack Huey <jackh726@gmail.com> <31162821+jackh726@users.noreply.github.com>
Jacob <jacob.macritchie@gmail.com>
Jacob Hoffman-Andrews <rust@hoffman-andrews.com> <github@hoffman-andrews.com>
Jacob Greenfield <xales@naveria.com>
Expand All @@ -292,6 +294,8 @@ Jakub Adam Wieczorek <jakub.adam.wieczorek@gmail.com>
Jakub Adam Wieczorek <jakub.adam.wieczorek@gmail.com> <jakub.bukaj@yahoo.com>
Jakub Adam Wieczorek <jakub.adam.wieczorek@gmail.com> <jakub@jakub.cc>
Jakub Adam Wieczorek <jakub.adam.wieczorek@gmail.com> <jakubw@jakubw.net>
Jakub Adam Wieczorek <jakub.adam.wieczorek@gmail.com> <ja.wieczorek@student.uw.edu.pl>
Jakub Adam Wieczorek <jakub.adam.wieczorek@gmail.com> <software@jacobadam.net>
Jakub Beránek <berykubik@gmail.com> <jakub.beranek@vsb.cz>
James [Undefined] <tpzker@thepuzzlemaker.info>
James Deng <cnjamesdeng@gmail.com> <cnJamesDeng@gmail.com>
Expand All @@ -303,6 +307,7 @@ Jamie Hill-Daniel <jamie@hill-daniel.co.uk> <clubby789@gmail.com>
Jana Dönszelmann <jana@donsz.nl>
Jana Dönszelmann <jana@donsz.nl> <jonathan@donsz.nl>
Jana Dönszelmann <jana@donsz.nl> <jonabent@gmail.com>
Jane Lusby <jlusby42@gmail.com> <jlusby@yaah.dev>
Jan-Erik Rediger <janerik@fnordig.de> <badboy@archlinux.us>
Jaro Fietz <jaro.fietz@gmx.de>
Jason Fager <jfager@gmail.com>
Expand All @@ -313,6 +318,7 @@ Jason Toffaletti <toffaletti@gmail.com> Jason Toffaletti <jason@topsy.com>
Jauhien Piatlicki <jauhien@gentoo.org> Jauhien Piatlicki <jpiatlicki@zertisa.com>
Jay True <glacjay@gmail.com>
Jeremy Letang <letang.jeremy@gmail.com>
Jeremy Soller <jackpot51@gmail.com> <jeremy@system76.com>
Jeremy Sorensen <jeremy.a.sorensen@gmail.com>
Jeremy Stucki <dev@jeremystucki.ch> <stucki.jeremy@gmail.com>
Jeremy Stucki <dev@jeremystucki.ch> <jeremy@myelin.ch>
Expand All @@ -336,6 +342,7 @@ John Kåre Alsaker <john.kare.alsaker@gmail.com>
John Kåre Alsaker <john.kare.alsaker@gmail.com> <zoxc32@gmail.com>
John Talling <inrustwetrust@users.noreply.github.com>
John Van Enk <vanenkj@gmail.com>
Jon Gjengset <jon@thesquareplanet.com> <jongje@amazon.com>
Jonas Tepe <jonasprogrammer@gmail.com>
Jonathan Bailey <jbailey@mozilla.com> <jbailey@jbailey-20809.local>
Jonathan Chan Kwan Yin <sofe2038@gmail.com>
Expand Down Expand Up @@ -424,7 +431,7 @@ Malo Jaffré <jaffre.malo@gmail.com>
Manish Goregaokar <manishsmail@gmail.com>
Mara Bos <m-ou.se@m-ou.se>
Marcell Pardavi <marcell.pardavi@gmail.com>
Marco Ieni <11428655+MarcoIeni@users.noreply.github.com>
Marco Ieni <marcoieni@rustfoundation.org> <11428655+MarcoIeni@users.noreply.github.com>
Marcus Klaas de Vries <mail@marcusklaas.nl>
Margaret Meyerhofer <mmeyerho@andrew.cmu.edu> <mmeyerho@andrew>
Marijn Schouten <mhkbst@gmail.com> <hkBst@users.noreply.github.com>
Expand Down Expand Up @@ -531,6 +538,7 @@ Oliver Scherer <oli-obk@users.noreply.github.com> <oliver.schneider@kit.edu>
Oliver Scherer <oli-obk@users.noreply.github.com> <obk8176014uqher834@olio-obk.de>
Oliver Scherer <oli-obk@users.noreply.github.com> <rustc-contact@oli-obk.de>
Oliver Scherer <oli-obk@users.noreply.github.com>
Onur Özkan <onurozkan.dev@outlook.com> <contact@onurozkan.dev>
Onur Özkan <onurozkan.dev@outlook.com> <work@onurozkan.dev>
Onur Özkan <onurozkan.dev@outlook.com>
Ömer Sinan Ağacan <omeragacan@gmail.com>
Expand Down Expand Up @@ -591,6 +599,7 @@ Rusty Blitzerr <rusty.blitzerr@gmail.com>
RustyYato <krishna.sd.2012@gmail.com>
Ruud van Asseldonk <dev@veniogames.com> Ruud van Asseldonk <ruuda@google.com>
Ryan Leung <rleungx@gmail.com>
Ryan Levick <me@ryanlevick.com> <rylev@users.noreply.github.com>
Ryan Scheel <ryan.havvy@gmail.com>
Ryan Sullivant <rsulli55@gmail.com>
Ryan Wiedemann <Ryan1729@gmail.com>
Expand Down Expand Up @@ -686,6 +695,8 @@ Weihang Lo <me@weihanglo.tw>
Weihang Lo <me@weihanglo.tw> <weihanglo@users.noreply.github.com>
Wesley Wiser <wwiser@gmail.com> <wesleywiser@microsoft.com>
whitequark <whitequark@whitequark.org>
Will Crichton <crichton.will@gmail.com> <wcrichto@stanford.edu>
Will Crichton <crichton.will@gmail.com> <wcrichto@cs.stanford.edu>
William Ting <io@williamting.com> <william.h.ting@gmail.com>
Wim Looman <wim@nemo157.com> <rust-lang@nemo157.com>
Wim Looman <wim@nemo157.com> <git@nemo157.com>
Expand All @@ -695,6 +706,8 @@ Xinye Tao <xy.tao@outlook.com>
Xuefeng Wu <benewu@gmail.com> Xuefeng Wu <xfwu@thoughtworks.com>
Xuefeng Wu <benewu@gmail.com> XuefengWu <benewu@gmail.com>
York Xiang <bombless@126.com>
Yoshua Wuyts <yoshuawuyts@gmail.com> <yoshuawuyts+github@gmail.com>
Yoshua Wuyts <yoshuawuyts@gmail.com> <2467194+yoshuawuyts@users.noreply.github.com>
Yotam Ofek <yotam.ofek@gmail.com> <yotamofek@microsoft.com>
Youngsoo Son <ysson83@gmail.com> <ysoo.son@samsung.com>
Youngsuk Kim <joseph942010@gmail.com>
Expand Down
2 changes: 2 additions & 0 deletions compiler/rustc_feature/src/accepted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,8 @@ declare_features! (
(accepted, return_position_impl_trait_in_trait, "1.75.0", Some(91611)),
/// Allows code like `let x: &'static u32 = &42` to work (RFC 1414).
(accepted, rvalue_static_promotion, "1.21.0", Some(38865)),
/// Allows use of the `vector` and related s390x target features.
(accepted, s390x_target_feature_vector, "CURRENT_RUSTC_VERSION", Some(145649)),
/// Allows `Self` in type definitions (RFC 2300).
(accepted, self_in_typedefs, "1.32.0", Some(49303)),
/// Allows `Self` struct constructor (RFC 2302).
Expand Down
15 changes: 15 additions & 0 deletions compiler/rustc_hir_analysis/src/collect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1263,6 +1263,21 @@ pub fn suggest_impl_trait<'tcx>(
infcx.tcx.lang_items().future_output(),
format_as_assoc,
),
(
infcx.tcx.lang_items().async_fn_trait(),
infcx.tcx.lang_items().async_fn_once_output(),
format_as_parenthesized,
),
(
infcx.tcx.lang_items().async_fn_mut_trait(),
infcx.tcx.lang_items().async_fn_once_output(),
format_as_parenthesized,
),
(
infcx.tcx.lang_items().async_fn_once_trait(),
infcx.tcx.lang_items().async_fn_once_output(),
format_as_parenthesized,
),
(
infcx.tcx.lang_items().fn_trait(),
infcx.tcx.lang_items().fn_once_output(),
Expand Down
10 changes: 3 additions & 7 deletions compiler/rustc_middle/src/ty/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1512,9 +1512,8 @@ impl<'tcx> TyCtxt<'tcx> {
field_shuffle_seed ^= user_seed;
}

if let Some(reprs) =
find_attr!(self.get_all_attrs(did), AttributeKind::Repr { reprs, .. } => reprs)
{
let attributes = self.get_all_attrs(did);
if let Some(reprs) = find_attr!(attributes, AttributeKind::Repr { reprs, .. } => reprs) {
for (r, _) in reprs {
flags.insert(match *r {
attr::ReprRust => ReprFlags::empty(),
Expand Down Expand Up @@ -1574,10 +1573,7 @@ impl<'tcx> TyCtxt<'tcx> {
}

// See `TyAndLayout::pass_indirectly_in_non_rustic_abis` for details.
if find_attr!(
self.get_all_attrs(did),
AttributeKind::RustcPassIndirectlyInNonRusticAbis(..)
) {
if find_attr!(attributes, AttributeKind::RustcPassIndirectlyInNonRusticAbis(..)) {
flags.insert(ReprFlags::PASS_INDIRECTLY_IN_NON_RUSTIC_ABIS);
}

Expand Down
24 changes: 24 additions & 0 deletions compiler/rustc_resolve/src/late/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1125,6 +1125,8 @@ impl<'ast, 'ra, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
}
}
}

self.suggest_ident_hidden_by_hygiene(err, path, span);
} else if err_code == E0412 {
if let Some(correct) = Self::likely_rust_type(path) {
err.span_suggestion(
Expand All @@ -1138,6 +1140,28 @@ impl<'ast, 'ra, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
}
}

fn suggest_ident_hidden_by_hygiene(&self, err: &mut Diag<'_>, path: &[Segment], span: Span) {
let [segment] = path else { return };

let ident = segment.ident;
let callsite_span = span.source_callsite();
for rib in self.ribs[ValueNS].iter().rev() {
for (binding_ident, _) in &rib.bindings {
if binding_ident.name == ident.name
&& !binding_ident.span.eq_ctxt(span)
&& !binding_ident.span.from_expansion()
&& binding_ident.span.lo() < callsite_span.lo()
{
err.span_help(
binding_ident.span,
"an identifier with the same name exists, but is not accessible due to macro hygiene",
);
return;
}
}
}
}

/// Emit special messages for unresolved `Self` and `self`.
fn suggest_self_ty(
&self,
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_span/src/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2000,6 +2000,7 @@ symbols! {
s,
s390x,
s390x_target_feature,
s390x_target_feature_vector,
safety,
sanitize,
sanitizer_cfi_generalize_pointers,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ pub(crate) fn target() -> Target {
base.features = "-small-data,+hvx-length128b".into();

base.has_rpath = true;
base.linker = Some("rust-lld".into());
base.linker_flavor = LinkerFlavor::Unix(Cc::Yes);

base.c_enum_min_bits = Some(8);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ pub(crate) fn target() -> Target {
max_atomic_width: Some(32),
emit_debug_gdb_scripts: false,
c_enum_min_bits: Some(8),
linker: Some("rust-lld".into()),
..Default::default()
},
}
Expand Down
24 changes: 12 additions & 12 deletions compiler/rustc_target/src/target_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -844,20 +844,20 @@ const IBMZ_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[
("message-security-assist-extension8", Unstable(sym::s390x_target_feature), &["message-security-assist-extension3"]),
("message-security-assist-extension9", Unstable(sym::s390x_target_feature), &["message-security-assist-extension3", "message-security-assist-extension4"]),
("message-security-assist-extension12", Unstable(sym::s390x_target_feature), &[]),
("miscellaneous-extensions-2", Unstable(sym::s390x_target_feature), &[]),
("miscellaneous-extensions-3", Unstable(sym::s390x_target_feature), &[]),
("miscellaneous-extensions-4", Unstable(sym::s390x_target_feature), &[]),
("nnp-assist", Unstable(sym::s390x_target_feature), &["vector"]),
("miscellaneous-extensions-2", Stable, &[]),
("miscellaneous-extensions-3", Stable, &[]),
("miscellaneous-extensions-4", Stable, &[]),
("nnp-assist", Stable, &["vector"]),
("soft-float", Forbidden { reason: "currently unsupported ABI-configuration feature" }, &[]),
("transactional-execution", Unstable(sym::s390x_target_feature), &[]),
("vector", Unstable(sym::s390x_target_feature), &[]),
("vector-enhancements-1", Unstable(sym::s390x_target_feature), &["vector"]),
("vector-enhancements-2", Unstable(sym::s390x_target_feature), &["vector-enhancements-1"]),
("vector-enhancements-3", Unstable(sym::s390x_target_feature), &["vector-enhancements-2"]),
("vector-packed-decimal", Unstable(sym::s390x_target_feature), &["vector"]),
("vector-packed-decimal-enhancement", Unstable(sym::s390x_target_feature), &["vector-packed-decimal"]),
("vector-packed-decimal-enhancement-2", Unstable(sym::s390x_target_feature), &["vector-packed-decimal-enhancement"]),
("vector-packed-decimal-enhancement-3", Unstable(sym::s390x_target_feature), &["vector-packed-decimal-enhancement-2"]),
("vector", Stable, &[]),
("vector-enhancements-1", Stable, &["vector"]),
("vector-enhancements-2", Stable, &["vector-enhancements-1"]),
("vector-enhancements-3", Stable, &["vector-enhancements-2"]),
("vector-packed-decimal", Stable, &["vector"]),
("vector-packed-decimal-enhancement", Stable, &["vector-packed-decimal"]),
("vector-packed-decimal-enhancement-2", Stable, &["vector-packed-decimal-enhancement"]),
("vector-packed-decimal-enhancement-3", Stable, &["vector-packed-decimal-enhancement-2"]),
// tidy-alphabetical-end
];

Expand Down
2 changes: 1 addition & 1 deletion library/std/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ pub mod arch {
pub use std_detect::is_loongarch_feature_detected;
#[unstable(feature = "is_riscv_feature_detected", issue = "111192")]
pub use std_detect::is_riscv_feature_detected;
#[unstable(feature = "stdarch_s390x_feature_detection", issue = "135413")]
#[stable(feature = "stdarch_s390x_feature_detection", since = "CURRENT_RUSTC_VERSION")]
pub use std_detect::is_s390x_feature_detected;
#[stable(feature = "simd_x86", since = "1.27.0")]
pub use std_detect::is_x86_feature_detected;
Expand Down
4 changes: 0 additions & 4 deletions library/std/tests/run-time-detect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
all(target_arch = "aarch64", any(target_os = "linux", target_os = "android")),
feature(stdarch_aarch64_feature_detection)
)]
#![cfg_attr(
all(target_arch = "s390x", target_os = "linux"),
feature(stdarch_s390x_feature_detection)
)]
#![cfg_attr(
all(target_arch = "powerpc", target_os = "linux"),
feature(stdarch_powerpc_feature_detection)
Expand Down
2 changes: 1 addition & 1 deletion library/std_detect/src/detect/arch/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ cfg_select! {
pub use loongarch::*;
}
target_arch = "s390x" => {
#[unstable(feature = "stdarch_s390x_feature_detection", issue = "135413")]
#[stable(feature = "stdarch_s390x_feature_detection", since = "CURRENT_RUSTC_VERSION")]
pub use s390x::*;
}
_ => {
Expand Down
Loading
Loading