Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 16 pull requests #138548

Merged
merged 47 commits into from
Mar 16, 2025
Merged
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
57046e1
doc: clarify that consume can be called after BufReader::peek
lolbinarycat Mar 2, 2025
69ef2fc
fix: properly escape regexes
dingxiangfei2009 Mar 3, 2025
638b226
Remove #[cfg(not(test))] gates in core
thaliaarchi Mar 6, 2025
769425a
Expand `CloneToUninit` documentation.
kpreid Nov 14, 2024
a312635
expose `is_s390x_feature_detected` from `std::arch`
folkertdev Mar 9, 2025
55c658b
fix ptr inconsistency in Rc Arc
DiuDiu777 Mar 10, 2025
fa183ad
fix copy typo
DiuDiu777 Mar 10, 2025
48a54d0
add missing doc for intrinsic
DiuDiu777 Mar 10, 2025
2cc999d
Rewrite comments about dropping and leaking.
kpreid Mar 10, 2025
96814ae
Rewrite example to not deal with `Copy` at all.
kpreid Mar 10, 2025
58d4395
Expand and organize `offset_of!` documentation.
kpreid Mar 10, 2025
8f32547
Move `offset_of_enum` documentation to unstable book; add `offset_of_…
kpreid Mar 11, 2025
3c74d02
debug-assert that the size_hint is well-formed in `collect`
scottmcm Mar 11, 2025
d2ff658
Update library/core/src/intrinsics/mod.rs
DiuDiu777 Mar 13, 2025
6a01990
Update library/core/src/intrinsics/mod.rs
DiuDiu777 Mar 13, 2025
2f824ea
Update library/core/src/intrinsics/mod.rs
DiuDiu777 Mar 13, 2025
ad74285
add exclude to config.toml
Shourya742 Feb 16, 2025
7d1537e
add test for exclude feature
Shourya742 Feb 16, 2025
22571da
Add change info to change tracker
Shourya742 Feb 16, 2025
9d5f074
make test platform agnostic
Shourya742 Mar 4, 2025
c6ecd8c
update the test_exclude to not use paths with path separators
Shourya742 Mar 9, 2025
b9e00b3
bump html5ever to 0.28
klensy Mar 13, 2025
7b4b4b1
bump html5ever to 0.29 with deps
klensy Mar 13, 2025
82a79b9
Add codegen test for modulo with power-of-two divisor
KonaeAkira Mar 14, 2025
ccde0a2
Fix formatting (line too long)
KonaeAkira Mar 14, 2025
bc6047a
Use lit span when suggesting suffix lit cast
xizheyin Mar 14, 2025
9f06585
improves outer mod attribute test
spencer3035 Mar 13, 2025
6207559
improves duplicate label test
spencer3035 Mar 14, 2025
27077b9
improves duplicate lang item test
spencer3035 Mar 13, 2025
13134dd
Don't drop Rvalue::WrapUnsafeBinder during GVN
compiler-errors Mar 11, 2025
e3ac1fa
Add RTN support to rustdoc
compiler-errors Mar 3, 2025
4946818
Rollup merge of #133055 - kpreid:clone-uninit-doc, r=Mark-Simulacrum
jieyouxu Mar 16, 2025
b8c51f4
Rollup merge of #137147 - Shourya742:2025-02-16-support-exclude-in-co…
jieyouxu Mar 16, 2025
903b526
Rollup merge of #137864 - compiler-errors:unsafe-binder-gvn, r=oli-obk
jieyouxu Mar 16, 2025
f16ce2a
Rollup merge of #137890 - lolbinarycat:docs-bufreader-peek-consume, r…
jieyouxu Mar 16, 2025
8882dac
Rollup merge of #137956 - compiler-errors:rtn-rustdoc, r=fmease
jieyouxu Mar 16, 2025
199e714
Rollup merge of #137968 - dingxiangfei2009:patch-1, r=Mark-Simulacrum
jieyouxu Mar 16, 2025
e084680
Rollup merge of #138082 - thaliaarchi:slice-cfg-not-test, r=thomcc
jieyouxu Mar 16, 2025
8210b84
Rollup merge of #138275 - folkertdev:expose-is-s390x-feature-detected…
jieyouxu Mar 16, 2025
7112951
Rollup merge of #138303 - DiuDiu777:rc-fix, r=Mark-Simulacrum
jieyouxu Mar 16, 2025
413600c
Rollup merge of #138309 - DiuDiu777:intrinsic-doc-fix, r=thomcc
jieyouxu Mar 16, 2025
5b92250
Rollup merge of #138323 - kpreid:offset-of-doc, r=Mark-Simulacrum
jieyouxu Mar 16, 2025
01bc954
Rollup merge of #138329 - scottmcm:assert-hint, r=Mark-Simulacrum
jieyouxu Mar 16, 2025
e42f339
Rollup merge of #138465 - klensy:linkchecker-b, r=Mark-Simulacrum
jieyouxu Mar 16, 2025
7c1555c
Rollup merge of #138471 - spencer3035:move-ui-test-1ofn, r=jieyouxu
jieyouxu Mar 16, 2025
c05a643
Rollup merge of #138472 - KonaeAkira:master, r=Mark-Simulacrum
jieyouxu Mar 16, 2025
f4372f5
Rollup merge of #138484 - xizheyin:issue-138392, r=compiler-errors
jieyouxu Mar 16, 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
75 changes: 29 additions & 46 deletions Cargo.lock
Original file line number Diff line number Diff line change
@@ -1548,16 +1548,14 @@ dependencies = [

[[package]]
name = "html5ever"
version = "0.27.0"
version = "0.29.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c13771afe0e6e846f1e67d038d4cb29998a6779f93c809212e4e9c32efd244d4"
checksum = "9b958f80f0fde8601dc6c08685adc743eecaa046181cebd5a57551468dfc2ddc"
dependencies = [
"log",
"mac",
"markup5ever",
"proc-macro2",
"quote",
"syn 2.0.96",
"match_token",
]

[[package]]
@@ -2023,7 +2021,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34"
dependencies = [
"cfg-if",
"windows-targets 0.52.6",
"windows-targets 0.48.5",
]

[[package]]
@@ -2134,9 +2132,9 @@ checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4"

[[package]]
name = "markup5ever"
version = "0.12.1"
version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "16ce3abbeba692c8b8441d036ef91aea6df8da2c6b6e21c7e14d3c18e526be45"
checksum = "03a7b81dfb91586d0677086d40a6d755070e0799b71bb897485bac408dfd5c69"
dependencies = [
"log",
"phf",
@@ -2146,6 +2144,17 @@ dependencies = [
"tendril",
]

[[package]]
name = "match_token"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "88a9689d8d44bf9964484516275f5cd4c9b59457a6940c1d5d0ecbb94510a36b"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.96",
]

[[package]]
name = "matchers"
version = "0.1.0"
@@ -2628,7 +2637,7 @@ version = "0.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078"
dependencies = [
"phf_shared 0.11.3",
"phf_shared",
]

[[package]]
@@ -2637,18 +2646,8 @@ version = "0.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aef8048c789fa5e851558d709946d6d79a8ff88c0440c587967f8e94bfb1216a"
dependencies = [
"phf_generator 0.11.3",
"phf_shared 0.11.3",
]

[[package]]
name = "phf_generator"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6"
dependencies = [
"phf_shared 0.10.0",
"rand 0.8.5",
"phf_generator",
"phf_shared",
]

[[package]]
@@ -2657,26 +2656,17 @@ version = "0.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d"
dependencies = [
"phf_shared 0.11.3",
"phf_shared",
"rand 0.8.5",
]

[[package]]
name = "phf_shared"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096"
dependencies = [
"siphasher 0.3.11",
]

[[package]]
name = "phf_shared"
version = "0.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5"
dependencies = [
"siphasher 1.0.1",
"siphasher",
]

[[package]]
@@ -4861,12 +4851,6 @@ version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1de1d4f81173b03af4c0cbed3c898f6bff5b870e4a7f5d6f4057d62a7a4b686e"

[[package]]
name = "siphasher"
version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d"

[[package]]
name = "siphasher"
version = "1.0.1"
@@ -4981,26 +4965,25 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"

[[package]]
name = "string_cache"
version = "0.8.7"
version = "0.8.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b"
checksum = "938d512196766101d333398efde81bc1f37b00cb42c2f8350e5df639f040bbbe"
dependencies = [
"new_debug_unreachable",
"once_cell",
"parking_lot",
"phf_shared 0.10.0",
"phf_shared",
"precomputed-hash",
"serde",
]

[[package]]
name = "string_cache_codegen"
version = "0.5.2"
version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988"
checksum = "c711928715f1fe0fe509c53b43e993a9a557babc2d0a3567d0a3006f1ac931a0"
dependencies = [
"phf_generator 0.10.0",
"phf_shared 0.10.0",
"phf_generator",
"phf_shared",
"proc-macro2",
"quote",
]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From ad7ffe71baba46865f2e65266ab025920dfdc20b Mon Sep 17 00:00:00 2001
From 5d7c709608b01301d4628d2159265936d4440b67 Mon Sep 17 00:00:00 2001
From: bjorn3 <bjorn3@users.noreply.github.com>
Date: Thu, 18 Feb 2021 18:45:28 +0100
Subject: [PATCH] Disable 128bit atomic operations
@@ -7,11 +7,10 @@ Cranelift doesn't support them yet
---
library/core/src/panic/unwind_safe.rs | 6 -----
library/core/src/sync/atomic.rs | 38 ---------------------------
library/core/tests/atomic.rs | 4 ---
4 files changed, 4 insertions(+), 50 deletions(-)
2 files changed, 44 deletions(-)

diff --git a/library/core/src/panic/unwind_safe.rs b/library/core/src/panic/unwind_safe.rs
index 092b7cf..158cf71 100644
index a60f0799c0e..af056fbf41f 100644
--- a/library/core/src/panic/unwind_safe.rs
+++ b/library/core/src/panic/unwind_safe.rs
@@ -216,9 +216,6 @@ impl RefUnwindSafe for crate::sync::atomic::AtomicI32 {}
@@ -21,7 +20,7 @@ index 092b7cf..158cf71 100644
-#[cfg(target_has_atomic_load_store = "128")]
-#[unstable(feature = "integer_atomics", issue = "99069")]
-impl RefUnwindSafe for crate::sync::atomic::AtomicI128 {}

#[cfg(target_has_atomic_load_store = "ptr")]
#[stable(feature = "unwind_safe_atomic_refs", since = "1.14.0")]
@@ -235,9 +232,6 @@ impl RefUnwindSafe for crate::sync::atomic::AtomicU32 {}
@@ -31,14 +30,14 @@ index 092b7cf..158cf71 100644
-#[cfg(target_has_atomic_load_store = "128")]
-#[unstable(feature = "integer_atomics", issue = "99069")]
-impl RefUnwindSafe for crate::sync::atomic::AtomicU128 {}

#[cfg(target_has_atomic_load_store = "8")]
#[stable(feature = "unwind_safe_atomic_refs", since = "1.14.0")]
diff --git a/library/core/src/sync/atomic.rs b/library/core/src/sync/atomic.rs
index d9de37e..8293fce 100644
index bf2b6d59f88..d5ccce03bbf 100644
--- a/library/core/src/sync/atomic.rs
+++ b/library/core/src/sync/atomic.rs
@@ -2996,44 +2996,6 @@ atomic_int! {
@@ -3585,44 +3585,6 @@ pub const fn as_ptr(&self) -> *mut $int_type {
8,
u64 AtomicU64
}
@@ -54,7 +53,7 @@ index d9de37e..8293fce 100644
- unstable(feature = "integer_atomics", issue = "99069"),
- rustc_const_unstable(feature = "integer_atomics", issue = "99069"),
- rustc_const_unstable(feature = "integer_atomics", issue = "99069"),
- cfg_attr(not(test), rustc_diagnostic_item = "AtomicI128"),
- rustc_diagnostic_item = "AtomicI128",
- "i128",
- "#![feature(integer_atomics)]\n\n",
- atomic_min, atomic_max,
@@ -73,7 +72,7 @@ index d9de37e..8293fce 100644
- unstable(feature = "integer_atomics", issue = "99069"),
- rustc_const_unstable(feature = "integer_atomics", issue = "99069"),
- rustc_const_unstable(feature = "integer_atomics", issue = "99069"),
- cfg_attr(not(test), rustc_diagnostic_item = "AtomicU128"),
- rustc_diagnostic_item = "AtomicU128",
- "u128",
- "#![feature(integer_atomics)]\n\n",
- atomic_umin, atomic_umax,
@@ -83,7 +82,6 @@ index d9de37e..8293fce 100644

#[cfg(target_has_atomic_load_store = "ptr")]
macro_rules! atomic_int_ptr_sized {
( $($target_pointer_width:literal $align:literal)* ) => { $(
--
2.26.2.7.g19db9cfb68
--
2.48.1

4 changes: 3 additions & 1 deletion compiler/rustc_hir_analysis/src/lib.rs
Original file line number Diff line number Diff line change
@@ -252,7 +252,9 @@ pub fn lower_ty<'tcx>(tcx: TyCtxt<'tcx>, hir_ty: &hir::Ty<'tcx>) -> Ty<'tcx> {
// def-ID that will be used to determine the traits/predicates in
// scope. This is derived from the enclosing item-like thing.
let env_def_id = tcx.hir_get_parent_item(hir_ty.hir_id);
collect::ItemCtxt::new(tcx, env_def_id.def_id).lower_ty(hir_ty)
collect::ItemCtxt::new(tcx, env_def_id.def_id)
.lowerer()
.lower_ty_maybe_return_type_notation(hir_ty)
}

/// This is for rustdoc.
7 changes: 4 additions & 3 deletions compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs
Original file line number Diff line number Diff line change
@@ -2983,7 +2983,8 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
return false;
}

let Ok(src) = self.tcx.sess.source_map().span_to_snippet(expr.span) else {
let span = if let hir::ExprKind::Lit(lit) = &expr.kind { lit.span } else { expr.span };
let Ok(src) = self.tcx.sess.source_map().span_to_snippet(span) else {
return false;
};

@@ -3078,10 +3079,10 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
// Remove fractional part from literal, for example `42.0f32` into `42`
let src = src.trim_end_matches(&checked_ty.to_string());
let len = src.split('.').next().unwrap().len();
expr.span.with_lo(expr.span.lo() + BytePos(len as u32))
span.with_lo(span.lo() + BytePos(len as u32))
} else {
let len = src.trim_end_matches(&checked_ty.to_string()).len();
expr.span.with_lo(expr.span.lo() + BytePos(len as u32))
span.with_lo(span.lo() + BytePos(len as u32))
},
if expr.precedence() < ExprPrecedence::Unambiguous {
// Readd `)`
10 changes: 8 additions & 2 deletions compiler/rustc_mir_transform/src/gvn.rs
Original file line number Diff line number Diff line change
@@ -872,8 +872,14 @@ impl<'body, 'tcx> VnState<'body, 'tcx> {
self.simplify_place_projection(place, location);
return self.new_pointer(*place, AddressKind::Address(mutbl));
}
Rvalue::WrapUnsafeBinder(ref mut op, _) => {
return self.simplify_operand(op, location);
Rvalue::WrapUnsafeBinder(ref mut op, ty) => {
let value = self.simplify_operand(op, location)?;
Value::Cast {
kind: CastKind::Transmute,
value,
from: op.ty(self.local_decls, self.tcx),
to: ty,
}
}

// Operations.
4 changes: 4 additions & 0 deletions config.example.toml
Original file line number Diff line number Diff line change
@@ -446,6 +446,10 @@
# a specific version.
#ccache = false

# List of paths to exclude from the build and test processes.
# For example, exclude = ["tests/ui", "src/tools/tidy"].
#exclude = []

# =============================================================================
# General install configuration options
# =============================================================================
34 changes: 23 additions & 11 deletions library/alloc/src/rc.rs
Original file line number Diff line number Diff line change
@@ -1327,11 +1327,14 @@ impl<T: ?Sized> Rc<T> {
///
/// # Safety
///
/// The pointer must have been obtained through `Rc::into_raw`, the
/// associated `Rc` instance must be valid (i.e. the strong count must be at
/// The pointer must have been obtained through `Rc::into_raw` and must satisfy the
/// same layout requirements specified in [`Rc::from_raw_in`][from_raw_in].
/// The associated `Rc` instance must be valid (i.e. the strong count must be at
/// least 1) for the duration of this method, and `ptr` must point to a block of memory
/// allocated by the global allocator.
///
/// [from_raw_in]: Rc::from_raw_in
///
/// # Examples
///
/// ```
@@ -1360,12 +1363,15 @@ impl<T: ?Sized> Rc<T> {
///
/// # Safety
///
/// The pointer must have been obtained through `Rc::into_raw`, the
/// associated `Rc` instance must be valid (i.e. the strong count must be at
/// The pointer must have been obtained through `Rc::into_raw`and must satisfy the
/// same layout requirements specified in [`Rc::from_raw_in`][from_raw_in].
/// The associated `Rc` instance must be valid (i.e. the strong count must be at
/// least 1) when invoking this method, and `ptr` must point to a block of memory
/// allocated by the global allocator. This method can be used to release the final `Rc` and
/// backing storage, but **should not** be called after the final `Rc` has been released.
///
/// [from_raw_in]: Rc::from_raw_in
///
/// # Examples
///
/// ```
@@ -1623,10 +1629,13 @@ impl<T: ?Sized, A: Allocator> Rc<T, A> {
///
/// # Safety
///
/// The pointer must have been obtained through `Rc::into_raw`, the
/// associated `Rc` instance must be valid (i.e. the strong count must be at
/// The pointer must have been obtained through `Rc::into_raw` and must satisfy the
/// same layout requirements specified in [`Rc::from_raw_in`][from_raw_in].
/// The associated `Rc` instance must be valid (i.e. the strong count must be at
/// least 1) for the duration of this method, and `ptr` must point to a block of memory
/// allocated by `alloc`
/// allocated by `alloc`.
///
/// [from_raw_in]: Rc::from_raw_in
///
/// # Examples
///
@@ -1665,11 +1674,14 @@ impl<T: ?Sized, A: Allocator> Rc<T, A> {
///
/// # Safety
///
/// The pointer must have been obtained through `Rc::into_raw`, the
/// associated `Rc` instance must be valid (i.e. the strong count must be at
/// The pointer must have been obtained through `Rc::into_raw`and must satisfy the
/// same layout requirements specified in [`Rc::from_raw_in`][from_raw_in].
/// The associated `Rc` instance must be valid (i.e. the strong count must be at
/// least 1) when invoking this method, and `ptr` must point to a block of memory
/// allocated by `alloc`. This method can be used to release the final `Rc` and backing storage,
/// but **should not** be called after the final `Rc` has been released.
/// allocated by `alloc`. This method can be used to release the final `Rc` and
/// backing storage, but **should not** be called after the final `Rc` has been released.
///
/// [from_raw_in]: Rc::from_raw_in
///
/// # Examples
///
Loading
Loading