Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
0909712
alloc: fix `Debug` implementation of `ExtractIf`
joboet Sep 25, 2025
0d6a313
add doc for va_list APIs
DiuDiu777 Sep 23, 2025
d8b6752
describe bors try parent=sha builds
jdonszelmann Nov 12, 2025
9d1c273
update some uses of `master` in the devguide
jdonszelmann Nov 12, 2025
8c1cb5b
Merge pull request #2640 from jdonszelmann/try-parent-and-main-branch
jdonszelmann Nov 12, 2025
f6bc9d5
some updates and improvements
tshepang Nov 12, 2025
4fd2b77
Merge pull request #2639 from rust-lang/tshepang/default-branch
tshepang Nov 12, 2025
7b0c218
sembr implementing_new_features.md
tshepang Nov 12, 2025
4a845a6
typo
tshepang Nov 12, 2025
de3b053
add date marker
tshepang Nov 12, 2025
407da40
reduce overlong physical lines
tshepang Nov 12, 2025
0f497ce
needless repetition
tshepang Nov 12, 2025
7b35dd1
Merge pull request #2641 from rust-lang/tshepang/sembr
tshepang Nov 12, 2025
6d42077
do not ignore lines that are list entries
tshepang Nov 13, 2025
e4ef199
avoid surprising string handling behavior
tshepang Nov 13, 2025
5517b2c
sembr src/stabilization_guide.md
tshepang Nov 13, 2025
aefdfa8
some text improvements
tshepang Nov 13, 2025
9d16bc4
Merge pull request #2642 from rust-lang/tshepang/sembr
tshepang Nov 13, 2025
74caf6d
sembr implementing_new_features.md again
tshepang Nov 13, 2025
cf542b5
Merge pull request #2643 from rust-lang/tshepang/sembr
tshepang Nov 13, 2025
d5f14ae
use latest checkout action
tshepang Nov 13, 2025
662facc
ci: avoid sembr getting rebuilt on every push
tshepang Nov 13, 2025
e7cd6c6
ci: run sembr in release mode
tshepang Nov 13, 2025
d2a8e42
Merge pull request #2644 from rust-lang/tshepang/ci
tshepang Nov 13, 2025
a70b5c6
sembr sanitizers.md again
tshepang Nov 13, 2025
fe3871f
sembr: update lockfile
tshepang Nov 13, 2025
5d1dc38
handle another edge case
tshepang Nov 13, 2025
9ce4c1a
Merge pull request #2645 from rust-lang/tshepang/sembr
tshepang Nov 13, 2025
3dcaf9b
add missing " and -Zoffload=Enable flag
ZuseZ4 Nov 14, 2025
2bf2f44
Merge pull request #2646 from rust-lang/update-offload-docs
ZuseZ4 Nov 14, 2025
ecfc642
Add support for hexagon-unknown-qurt target
androm3da Sep 30, 2025
901183b
Prepare for merging from rust-lang/rust
invalid-email-address Nov 17, 2025
6367ba4
Merge ref '69d4d5fc0e4d' from rust-lang/rust
invalid-email-address Nov 17, 2025
8564d67
Merge pull request #2647 from rust-lang/rustc-pull
tshepang Nov 17, 2025
6766db0
Prepare for merging from rust-lang/rust
invalid-email-address Nov 17, 2025
a76d78b
Merge ref 'cc328c12382f' from rust-lang/rust
invalid-email-address Nov 17, 2025
239cf98
Merge pull request #2648 from rust-lang/rustc-pull
tshepang Nov 17, 2025
bbf7dc0
ignore unsized types in mips64 and sparc64 callconvs
folkertdev Nov 16, 2025
10172d1
disable the fragment_in_dst_padding_gets_overwritten test on s390x
fneddy Nov 18, 2025
aeb582f
Rollup merge of #146925 - DiuDiu777:va-doc-fix, r=tgross35
matthiaskrgr Nov 19, 2025
d3ddca1
Rollup merge of #147035 - joboet:extract_if_debug, r=tgross35
matthiaskrgr Nov 19, 2025
0b3be1a
Rollup merge of #147173 - androm3da:bcain/hexagon_qurt, r=davidtwco,t…
matthiaskrgr Nov 19, 2025
321026e
Rollup merge of #149041 - folkertdev:sparc64-mips64-ignore-unsized, r…
matthiaskrgr Nov 19, 2025
c9a5122
Rollup merge of #149056 - fneddy:fix_s390_test_padding_overwrite, r=R…
matthiaskrgr Nov 19, 2025
a17f305
Rollup merge of #149095 - tshepang:rdg-sync, r=tshepang
matthiaskrgr Nov 19, 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
4 changes: 2 additions & 2 deletions compiler/rustc_target/src/callconv/mips64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,12 @@ where
Ty: TyAbiInterface<'a, C> + Copy,
C: HasDataLayout,
{
if !fn_abi.ret.is_ignore() {
if !fn_abi.ret.is_ignore() && fn_abi.ret.layout.is_sized() {
classify_ret(cx, &mut fn_abi.ret);
}

for arg in fn_abi.args.iter_mut() {
if arg.is_ignore() {
if arg.is_ignore() || !arg.layout.is_sized() {
continue;
}
classify_arg(cx, arg);
Expand Down
5 changes: 4 additions & 1 deletion compiler/rustc_target/src/callconv/sparc64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,14 @@ where
Ty: TyAbiInterface<'a, C> + Copy,
C: HasDataLayout + HasTargetSpec,
{
if !fn_abi.ret.is_ignore() {
if !fn_abi.ret.is_ignore() && fn_abi.ret.layout.is_sized() {
classify_arg(cx, &mut fn_abi.ret, Size::from_bytes(32));
}

for arg in fn_abi.args.iter_mut() {
if !arg.layout.is_sized() {
continue;
}
if arg.is_ignore() {
// sparc64-unknown-linux-{gnu,musl,uclibc} doesn't ignore ZSTs.
if cx.target_spec().os == Os::Linux
Expand Down
2 changes: 2 additions & 0 deletions compiler/rustc_target/src/spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1490,6 +1490,7 @@ supported_targets! {
("mips64el-unknown-linux-muslabi64", mips64el_unknown_linux_muslabi64),
("hexagon-unknown-linux-musl", hexagon_unknown_linux_musl),
("hexagon-unknown-none-elf", hexagon_unknown_none_elf),
("hexagon-unknown-qurt", hexagon_unknown_qurt),

("mips-unknown-linux-uclibc", mips_unknown_linux_uclibc),
("mipsel-unknown-linux-uclibc", mipsel_unknown_linux_uclibc),
Expand Down Expand Up @@ -1958,6 +1959,7 @@ crate::target_spec_enum! {
OpenBsd = "openbsd",
Psp = "psp",
Psx = "psx",
Qurt = "qurt",
Redox = "redox",
Rtems = "rtems",
Solaris = "solaris",
Expand Down
45 changes: 45 additions & 0 deletions compiler/rustc_target/src/spec/targets/hexagon_unknown_qurt.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
use crate::spec::{Arch, Cc, LinkerFlavor, Lld, Os, Target, TargetMetadata, TargetOptions, cvs};

pub(crate) fn target() -> Target {
let mut base = TargetOptions::default();
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::No, Lld::No), &["-G0"]);

Target {
llvm_target: "hexagon-unknown-elf".into(),
metadata: TargetMetadata {
description: Some("Hexagon QuRT".into()),
tier: Some(3),
host_tools: Some(false),
std: Some(false),
},
pointer_width: 32,
data_layout: "\
e-m:e-p:32:32:32-a:0-n16:32-i64:64:64-i32:32\
:32-i16:16:16-i1:8:8-f32:32:32-f64:64:64-v32\
:32:32-v64:64:64-v512:512:512-v1024:1024:1024-v2048\
:2048:2048"
.into(),
arch: Arch::Hexagon,
options: TargetOptions {
os: Os::Qurt,
vendor: "unknown".into(),
cpu: "hexagonv69".into(),
linker: Some("rust-lld".into()),
linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes),
exe_suffix: ".elf".into(),
dynamic_linking: true,
executables: true,
families: cvs!["unix"],
has_thread_local: true,
has_rpath: false,
crt_static_default: false,
crt_static_respected: true,
crt_static_allows_dylibs: true,
no_default_libraries: false,
max_atomic_width: Some(32),
features: "-small-data,+hvx-length128b".into(),
c_enum_min_bits: Some(8),
..base
},
}
}
15 changes: 14 additions & 1 deletion library/alloc/src/vec/extract_if.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,20 @@ where
A: Allocator,
{
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let peek = if self.idx < self.end { self.vec.get(self.idx) } else { None };
let peek = if self.idx < self.end {
// This has to use pointer arithmetic as `self.vec[self.idx]` or
// `self.vec.get_unchecked(self.idx)` wouldn't work since we
// temporarily set the length of `self.vec` to zero.
//
// SAFETY:
// Since `self.idx` is smaller than `self.end` and `self.end` is
// smaller than `self.old_len`, `idx` is valid for indexing the
// buffer. Also, per the invariant of `self.idx`, this element
// has not been inspected/moved out yet.
Some(unsafe { &*self.vec.as_ptr().add(self.idx) })
} else {
None
};
f.debug_struct("ExtractIf").field("peek", &peek).finish_non_exhaustive()
}
}
11 changes: 11 additions & 0 deletions library/alloctests/tests/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1650,6 +1650,17 @@ fn extract_if_unconsumed() {
assert_eq!(vec, [1, 2, 3, 4]);
}

#[test]
fn extract_if_debug() {
let mut vec = vec![1, 2];
let mut drain = vec.extract_if(.., |&mut x| x % 2 != 0);
assert!(format!("{drain:?}").contains("Some(1)"));
drain.next();
assert!(format!("{drain:?}").contains("Some(2)"));
drain.next();
assert!(format!("{drain:?}").contains("None"));
}

#[test]
fn test_reserve_exact() {
// This is all the same as test_reserve
Expand Down
7 changes: 4 additions & 3 deletions library/core/src/ffi/va_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,11 @@ impl<'f> VaListImpl<'f> {
///
/// # Safety
///
/// This function is only sound to call when the next variable argument:
/// This function is only sound to call when:
///
/// - has a type that is ABI-compatible with the type `T`
/// - has a value that is a properly initialized value of type `T`
/// - there is a next variable argument available.
/// - the next argument's type must be ABI-compatible with the type `T`.
/// - the next argument must have a properly initialized value of type `T`.
///
/// Calling this function with an incompatible type, an invalid value, or when there
/// are no more variable arguments, is unsound.
Expand Down
25 changes: 22 additions & 3 deletions library/core/src/intrinsics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3350,22 +3350,41 @@ pub(crate) const fn miri_promise_symbolic_alignment(ptr: *const (), align: usize

/// Copies the current location of arglist `src` to the arglist `dst`.
///
/// FIXME: document safety requirements
/// # Safety
///
/// You must check the following invariants before you call this function:
///
/// - `dest` must be non-null and point to valid, writable memory.
/// - `dest` must not alias `src`.
///
#[rustc_intrinsic]
#[rustc_nounwind]
pub unsafe fn va_copy<'f>(dest: *mut VaListImpl<'f>, src: &VaListImpl<'f>);

/// Loads an argument of type `T` from the `va_list` `ap` and increment the
/// argument `ap` points to.
///
/// FIXME: document safety requirements
/// # Safety
///
/// This function is only sound to call when:
///
/// - there is a next variable argument available.
/// - the next argument's type must be ABI-compatible with the type `T`.
/// - the next argument must have a properly initialized value of type `T`.
///
/// Calling this function with an incompatible type, an invalid value, or when there
/// are no more variable arguments, is unsound.
///
#[rustc_intrinsic]
#[rustc_nounwind]
pub unsafe fn va_arg<T: VaArgSafe>(ap: &mut VaListImpl<'_>) -> T;

/// Destroy the arglist `ap` after initialization with `va_start` or `va_copy`.
///
/// FIXME: document safety requirements
/// # Safety
///
/// `ap` must not be used to access variable arguments after this call.
///
#[rustc_intrinsic]
#[rustc_nounwind]
pub unsafe fn va_end(ap: &mut VaListImpl<'_>);
1 change: 1 addition & 0 deletions src/bootstrap/src/core/sanity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const STAGE0_MISSING_TARGETS: &[&str] = &[
"sparc64-unknown-helenos",
// just a dummy comment so the list doesn't get onelined
"riscv64gc-unknown-redox",
"hexagon-unknown-qurt",
];

/// Minimum version threshold for libstdc++ required when using prebuilt LLVM
Expand Down
14 changes: 12 additions & 2 deletions src/doc/rustc-dev-guide/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
# linkcheck needs the base commit.
fetch-depth: 0
Expand Down Expand Up @@ -83,8 +83,18 @@ jobs:
git commit -m "Deploy ${GITHUB_SHA} to gh-pages"
git push --quiet -f "https://x-token:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}" HEAD:gh-pages
- name: Cache sembr build
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
ci/sembr/target/
key: sembr-${{ hashFiles('ci/sembr/Cargo.lock') }}

- name: Check if files comply with semantic line breaks
continue-on-error: true
run: |
# using split_inclusive that uses regex feature that uses an unstable feature
RUSTC_BOOTSTRAP=1 cargo run --manifest-path ci/sembr/Cargo.toml src
RUSTC_BOOTSTRAP=1 cargo run --release --manifest-path ci/sembr/Cargo.toml src
2 changes: 1 addition & 1 deletion src/doc/rustc-dev-guide/.github/workflows/date-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

steps:
- name: Checkout repo
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Ensure Rust is up-to-date
run: |
Expand Down
32 changes: 16 additions & 16 deletions src/doc/rustc-dev-guide/ci/sembr/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ version = 4

[[package]]
name = "aho-corasick"
version = "1.1.3"
version = "1.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301"
dependencies = [
"memchr",
]
Expand Down Expand Up @@ -69,29 +69,29 @@ checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61"

[[package]]
name = "bstr"
version = "1.12.0"
version = "1.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4"
checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab"
dependencies = [
"memchr",
"serde",
]

[[package]]
name = "clap"
version = "4.5.50"
version = "4.5.51"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c2cfd7bf8a6017ddaa4e32ffe7403d547790db06bd171c1c53926faab501623"
checksum = "4c26d721170e0295f191a69bd9a1f93efcdb0aff38684b61ab5750468972e5f5"
dependencies = [
"clap_builder",
"clap_derive",
]

[[package]]
name = "clap_builder"
version = "4.5.50"
version = "4.5.51"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0a4c05b9e80c5ccd3a7ef080ad7b6ba7d6fc00a985b8b157197075677c82c7a0"
checksum = "75835f0c7bf681bfd05abe44e965760fea999a5286c6eb2d59883634fd02011a"
dependencies = [
"anstream",
"anstyle",
Expand Down Expand Up @@ -184,9 +184,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"

[[package]]
name = "ignore"
version = "0.4.24"
version = "0.4.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81776e6f9464432afcc28d03e52eb101c93b6f0566f52aef2427663e700f0403"
checksum = "d3d782a365a015e0f5c04902246139249abf769125006fbe7649e2ee88169b4a"
dependencies = [
"crossbeam-deque",
"globset",
Expand Down Expand Up @@ -243,9 +243,9 @@ dependencies = [

[[package]]
name = "quote"
version = "1.0.41"
version = "1.0.42"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1"
checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f"
dependencies = [
"proc-macro2",
]
Expand Down Expand Up @@ -336,9 +336,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"

[[package]]
name = "syn"
version = "2.0.108"
version = "2.0.110"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da58917d35242480a05c2897064da0a80589a2a0476c9a3f2fdc83b53502e917"
checksum = "a99801b5bd34ede4cf3fc688c5919368fea4e4814a4664359503e6015b280aea"
dependencies = [
"proc-macro2",
"quote",
Expand All @@ -347,9 +347,9 @@ dependencies = [

[[package]]
name = "unicode-ident"
version = "1.0.20"
version = "1.0.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "462eeb75aeb73aea900253ce739c8e18a67423fadf006037cd3ff27e82748a06"
checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5"

[[package]]
name = "utf8parse"
Expand Down
Loading
Loading