Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
124bfc9
Remove parent def lookup hack that is no longer needed
camelid Oct 13, 2025
258d553
Prepare for merging from rust-lang/rust
Oct 16, 2025
0784632
Merge ref '402ce0ef07d5' from rust-lang/rust
Oct 16, 2025
936dda5
Merge pull request #4637 from rust-lang/rustup-2025-10-16
RalfJung Oct 16, 2025
379a057
Fix lowering of CStr constants to valtrees
camelid Oct 13, 2025
cff6452
Ignore test-dashboard related files
samueltardieu Oct 17, 2025
736a276
Prepare for merging from rust-lang/rust
RalfJung Oct 22, 2025
4dff7b8
Merge ref '96fe3c31c2ec' from rust-lang/rust
RalfJung Oct 22, 2025
1d00266
make genmc tests less dependent on std internals
RalfJung Oct 22, 2025
86bb8eb
Merge pull request #4640 from RalfJung/rustup
RalfJung Oct 22, 2025
70aa534
Avoid panicking when `Cargo.toml` is not present
FranciscoTGouveia Oct 22, 2025
827bd00
Implement `strip_circumfix` lib feature
yotamofek Oct 21, 2025
424f7bf
native_call: we only support thin pointers as return type
RalfJung Oct 22, 2025
23e3645
Merge pull request #4644 from RalfJung/native-call-return-ptr
RalfJung Oct 22, 2025
d521a79
Prepare for merging from rust-lang/rust
Oct 23, 2025
d60d4a5
Merge ref '6244effd0372' from rust-lang/rust
Oct 23, 2025
c13da7b
Merge pull request #4645 from rust-lang/rustup-2025-10-23
oli-obk Oct 23, 2025
ce35d4c
SB wildcard handling: extend comments
RalfJung Oct 23, 2025
c8c2e17
Merge pull request #4646 from RalfJung/sb-wildcard-comments
RalfJung Oct 23, 2025
b6c7138
Merge pull request #4643 from FranciscoTGouveia/avoid-panic-cargo-toml
RalfJung Oct 23, 2025
420096d
Prepare for merging from rust-lang/rust
Oct 24, 2025
77e7651
Merge ref '27050c0d15af' from rust-lang/rust
Oct 24, 2025
3c92cf1
Merge pull request #4649 from rust-lang/rustup-2025-10-24
oli-obk Oct 24, 2025
0c7ff00
add -Zmiri-user-relevant-crates
RalfJung Oct 27, 2025
80bd9cf
Merge pull request #4651 from RalfJung/user-relevant-crates
RalfJung Oct 27, 2025
8f70d2d
add miri magic function to configure allocation tracking at runtime
RalfJung Oct 27, 2025
9d60a23
Merge pull request #4652 from RalfJung/track-alloc-runtime
RalfJung Oct 27, 2025
08b188c
Remove `cleanup_debug_info_options`
Zalathar Oct 28, 2025
bd57886
Test that auxiliaries are built against their own directives
Zalathar Oct 28, 2025
c627945
Don't modify `testpaths` when creating aux contexts
Zalathar Oct 28, 2025
6dfc82b
Remove some parameters that are always `self.testpaths`
Zalathar Oct 28, 2025
720bfff
Rename `compute_aux_paths` to `resolve_aux_path`
Zalathar Oct 28, 2025
20e0014
Support f32/f64 in native function calls
FranciscoTGouveia Oct 23, 2025
8fef16e
Merge pull request #4650 from FranciscoTGouveia/f32/64-native-func-calls
RalfJung Oct 28, 2025
48f8f23
Remove a special case for rust_eh_personality from reachable_non_gene…
bjorn3 Oct 29, 2025
1b78417
Remove special case for the panic runtime from reachable_non_generics
bjorn3 Oct 29, 2025
651076a
Prepare for merging from rust-lang/rust
Oct 30, 2025
c351d06
Merge ref '292be5c7c051' from rust-lang/rust
Oct 30, 2025
7e0783f
alloc access tracking: print accessed range
RalfJung Oct 30, 2025
8c678cc
update comment regarding disabled jobs
RalfJung Oct 30, 2025
3048ef2
unconditionally use Duration::from_nanos_u128
RalfJung Oct 30, 2025
9cb215a
Merge pull request #4656 from rust-lang/rustup-2025-10-30
RalfJung Oct 30, 2025
04eacd0
document -Zmiri-backtrace; dont print backtrace when there's only one…
RalfJung Oct 30, 2025
250ebfa
Merge pull request #4657 from RalfJung/tracking-and-backtrace
RalfJung Oct 30, 2025
20bddb1
weak memory: fix non-atomic read clearing store buffer
RalfJung Oct 30, 2025
851b10f
add store buffer initialization sanity check that would have caught t…
RalfJung Oct 30, 2025
0efeec5
Mention crate being analysized in query description
estebank Sep 28, 2025
63a18d4
Merge pull request #4658 from RalfJung/weak-mem-na-reads
RalfJung Nov 1, 2025
61ccd53
test works in all editions
tshepang Nov 1, 2025
4220f7c
confirmed success built rustc 1.91.0 + host tools for win7
Fenex Nov 1, 2025
82140c1
Use --print host-tuple to get the host
ChrisDenton Nov 1, 2025
0bd6a03
dangling ptr lint cleanup
hkBst Oct 31, 2025
f39fb70
Update tests after fixing ICEs
camelid Nov 1, 2025
d313b6e
Rollup merge of #147137 - estebank:issue-74380, r=nnethercote
jhpratt Nov 2, 2025
056f32c
Rollup merge of #147642 - camelid:misc-const-fixes, r=BoxyUwU
jhpratt Nov 2, 2025
302ab70
Rollup merge of #147806 - samueltardieu:chores/gitignore-test-dashboa…
jhpratt Nov 2, 2025
d234ae4
Rollup merge of #147947 - yotamofek:pr/lib/strip-circumfix, r=joboet
jhpratt Nov 2, 2025
3eb2ed2
Rollup merge of #148194 - Zalathar:no-cleanup, r=jieyouxu
jhpratt Nov 2, 2025
62e5544
Rollup merge of #148199 - Zalathar:paths, r=jieyouxu
jhpratt Nov 2, 2025
8af5081
Rollup merge of #148247 - bjorn3:minor_symbol_export_cleanup, r=Waffl…
jhpratt Nov 2, 2025
8f263e9
Rollup merge of #148348 - hkBst:dangling-ptr-lint-1, r=Urgau
jhpratt Nov 2, 2025
e620097
Rollup merge of #148357 - tshepang:all-editions-work, r=madsmtm
jhpratt Nov 2, 2025
98b16d8
Rollup merge of #148362 - Fenex:docs/platform-support-win7, r=Noratrieb
jhpratt Nov 2, 2025
4e76fb0
Rollup merge of #148367 - ChrisDenton:use-print-host, r=jieyouxu
jhpratt Nov 2, 2025
ebc6b6a
Rollup merge of #148374 - RalfJung:miri, r=RalfJung
jhpratt Nov 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ node_modules
## Rustdoc GUI tests
tests/rustdoc-gui/src/**.lock

## Test dashboard
.citool-cache/
test-dashboard/

## direnv
/.envrc
/.direnv/
Expand Down
24 changes: 8 additions & 16 deletions compiler/rustc_codegen_ssa/src/back/symbol_export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,7 @@ fn reachable_non_generics_provider(tcx: TyCtxt<'_>, _: LocalCrate) -> DefIdMap<S
return Default::default();
}

// Check to see if this crate is a "special runtime crate". These
// crates, implementation details of the standard library, typically
// have a bunch of `pub extern` and `#[no_mangle]` functions as the
// ABI between them. We don't want their symbols to have a `C`
// export level, however, as they're just implementation details.
// Down below we'll hardwire all of the symbols to the `Rust` export
// level instead.
let special_runtime_crate =
tcx.is_panic_runtime(LOCAL_CRATE) || tcx.is_compiler_builtins(LOCAL_CRATE);
let is_compiler_builtins = tcx.is_compiler_builtins(LOCAL_CRATE);

let mut reachable_non_generics: DefIdMap<_> = tcx
.reachable_set(())
Expand Down Expand Up @@ -104,11 +96,12 @@ fn reachable_non_generics_provider(tcx: TyCtxt<'_>, _: LocalCrate) -> DefIdMap<S
if tcx.cross_crate_inlinable(def_id) { None } else { Some(def_id) }
})
.map(|def_id| {
// We won't link right if this symbol is stripped during LTO.
let name = tcx.symbol_name(Instance::mono(tcx, def_id.to_def_id())).name;
let used = name == "rust_eh_personality";

let export_level = if special_runtime_crate {
let export_level = if is_compiler_builtins {
// We don't want to export compiler-builtins symbols from any
// dylibs, even rust dylibs. Unlike all other crates it gets
// duplicated in every linker invocation and it may otherwise
// unintentionally override definitions of these symbols by
// libgcc or compiler-rt for C code.
SymbolExportLevel::Rust
} else {
symbol_export_level(tcx, def_id.to_def_id())
Expand All @@ -131,8 +124,7 @@ fn reachable_non_generics_provider(tcx: TyCtxt<'_>, _: LocalCrate) -> DefIdMap<S
SymbolExportKind::Text
},
used: codegen_attrs.flags.contains(CodegenFnAttrFlags::USED_COMPILER)
|| codegen_attrs.flags.contains(CodegenFnAttrFlags::USED_LINKER)
|| used,
|| codegen_attrs.flags.contains(CodegenFnAttrFlags::USED_LINKER),
rustc_std_internal_symbol: codegen_attrs
.flags
.contains(CodegenFnAttrFlags::RUSTC_STD_INTERNAL_SYMBOL),
Expand Down
14 changes: 0 additions & 14 deletions compiler/rustc_hir_analysis/src/collect/generics_of.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,6 @@ pub(super) fn generics_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Generics {
// stable enough and does not need a feature gate anymore.
Node::AnonConst(_) => {
let parent_did = tcx.parent(def_id.to_def_id());

// We don't do this unconditionally because the `DefId` parent of an anon const
// might be an implicitly created closure during `async fn` desugaring. This would
// have the wrong generics.
//
// i.e. `async fn foo<'a>() { let a = [(); { 1 + 2 }]; bar().await() }`
// would implicitly have a closure in its body that would be the parent of
// the `{ 1 + 2 }` anon const. This closure's generics is simply a witness
// instead of `['a]`.
let parent_did = if let DefKind::AnonConst = tcx.def_kind(parent_did) {
parent_did
} else {
tcx.hir_get_parent_item(hir_id).to_def_id()
};
debug!(?parent_did);

let mut in_param_ty = false;
Expand Down
8 changes: 4 additions & 4 deletions compiler/rustc_lint/messages.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,11 @@ lint_confusable_identifier_pair = found both `{$existing_sym}` and `{$sym}` as i
.current_use = this identifier can be confused with `{$existing_sym}`
.other_use = other identifier used here

lint_dangling_pointers_from_locals = a dangling pointer will be produced because the local variable `{$local_var_name}` will be dropped
.ret_ty = return type of the {$fn_kind} is `{$ret_ty}`
.local_var = `{$local_var_name}` is part the {$fn_kind} and will be dropped at the end of the {$fn_kind}
lint_dangling_pointers_from_locals = {$fn_kind} returns a dangling pointer to dropped local variable `{$local_var_name}`
.ret_ty = return type is `{$ret_ty}`
.local_var = local variable `{$local_var_name}` is dropped at the end of the {$fn_kind}
.created_at = dangling pointer created here
.note = pointers do not have a lifetime; after returning, the `{$local_var_ty}` will be deallocated at the end of the {$fn_kind} because nothing is referencing it as far as the type system is concerned
.note = a dangling pointer is safe, but dereferencing one is undefined behavior

lint_dangling_pointers_from_temporaries = a dangling pointer will be produced because the temporary `{$ty}` will be dropped
.label_ptr = this pointer will immediately be invalid
Expand Down
5 changes: 4 additions & 1 deletion compiler/rustc_middle/src/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,10 @@ rustc_queries! {
/// The root query triggering all analysis passes like typeck or borrowck.
query analysis(key: ()) {
eval_always
desc { "running analysis passes on this crate" }
desc { |tcx|
"running analysis passes on crate `{}`",
tcx.crate_name(LOCAL_CRATE),
}
}

/// This query checks the fulfillment of collected lint expectations.
Expand Down
8 changes: 6 additions & 2 deletions compiler/rustc_mir_build/src/thir/constant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,12 @@ pub(crate) fn lit_to_const<'tcx>(
(ast::LitKind::Byte(n), ty::Uint(ty::UintTy::U8)) => {
ty::ValTree::from_scalar_int(tcx, n.into())
}
(ast::LitKind::CStr(byte_sym, _), ty::Ref(_, inner_ty, _)) if matches!(inner_ty.kind(), ty::Adt(def, _) if tcx.is_lang_item(def.did(), LangItem::CStr)) => {
ty::ValTree::from_raw_bytes(tcx, byte_sym.as_byte_str())
(ast::LitKind::CStr(byte_sym, _), ty::Ref(_, inner_ty, _)) if matches!(inner_ty.kind(), ty::Adt(def, _) if tcx.is_lang_item(def.did(), LangItem::CStr)) =>
{
// A CStr is a newtype around a byte slice, so we create the inner slice here.
// We need a branch for each "level" of the data structure.
let bytes = ty::ValTree::from_raw_bytes(tcx, byte_sym.as_byte_str());
ty::ValTree::from_branches(tcx, [bytes])
}
(ast::LitKind::Int(n, _), ty::Uint(ui)) if !neg => {
let scalar_int = trunc(n.get(), *ui);
Expand Down
32 changes: 32 additions & 0 deletions library/core/src/slice/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2725,6 +2725,38 @@ impl<T> [T] {
None
}

/// Returns a subslice with the prefix and suffix removed.
///
/// If the slice starts with `prefix` and ends with `suffix`, returns the subslice after the
/// prefix and before the suffix, wrapped in `Some`.
///
/// If the slice does not start with `prefix` or does not end with `suffix`, returns `None`.
///
/// # Examples
///
/// ```
/// #![feature(strip_circumfix)]
///
/// let v = &[10, 50, 40, 30];
/// assert_eq!(v.strip_circumfix(&[10], &[30]), Some(&[50, 40][..]));
/// assert_eq!(v.strip_circumfix(&[10], &[40, 30]), Some(&[50][..]));
/// assert_eq!(v.strip_circumfix(&[10, 50], &[40, 30]), Some(&[][..]));
/// assert_eq!(v.strip_circumfix(&[50], &[30]), None);
/// assert_eq!(v.strip_circumfix(&[10], &[40]), None);
/// assert_eq!(v.strip_circumfix(&[], &[40, 30]), Some(&[10, 50][..]));
/// assert_eq!(v.strip_circumfix(&[10, 50], &[]), Some(&[40, 30][..]));
/// ```
#[must_use = "returns the subslice without modifying the original"]
#[unstable(feature = "strip_circumfix", issue = "147946")]
pub fn strip_circumfix<S, P>(&self, prefix: &P, suffix: &S) -> Option<&[T]>
where
T: PartialEq,
S: SlicePattern<Item = T> + ?Sized,
P: SlicePattern<Item = T> + ?Sized,
{
self.strip_prefix(prefix)?.strip_suffix(suffix)
}

/// Returns a subslice with the optional prefix removed.
///
/// If the slice starts with `prefix`, returns the subslice after the prefix. If `prefix`
Expand Down
36 changes: 36 additions & 0 deletions library/core/src/str/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2447,6 +2447,42 @@ impl str {
suffix.strip_suffix_of(self)
}

/// Returns a string slice with the prefix and suffix removed.
///
/// If the string starts with the pattern `prefix` and ends with the pattern `suffix`, returns
/// the substring after the prefix and before the suffix, wrapped in `Some`.
/// Unlike [`trim_start_matches`] and [`trim_end_matches`], this method removes both the prefix
/// and suffix exactly once.
///
/// If the string does not start with `prefix` or does not end with `suffix`, returns `None`.
///
/// Each [pattern] can be a `&str`, [`char`], a slice of [`char`]s, or a
/// function or closure that determines if a character matches.
///
/// [`char`]: prim@char
/// [pattern]: self::pattern
/// [`trim_start_matches`]: Self::trim_start_matches
/// [`trim_end_matches`]: Self::trim_end_matches
///
/// # Examples
///
/// ```
/// #![feature(strip_circumfix)]
///
/// assert_eq!("bar:hello:foo".strip_circumfix("bar:", ":foo"), Some("hello"));
/// assert_eq!("bar:foo".strip_circumfix("foo", "foo"), None);
/// assert_eq!("foo:bar;".strip_circumfix("foo:", ';'), Some("bar"));
/// ```
#[must_use = "this returns the remaining substring as a new slice, \
without modifying the original"]
#[unstable(feature = "strip_circumfix", issue = "147946")]
pub fn strip_circumfix<P: Pattern, S: Pattern>(&self, prefix: P, suffix: S) -> Option<&str>
where
for<'a> S::Searcher<'a>: ReverseSearcher<'a>,
{
self.strip_prefix(prefix)?.strip_suffix(suffix)
}

/// Returns a string slice with the optional prefix removed.
///
/// If the string starts with the pattern `prefix`, returns the substring after the prefix.
Expand Down
2 changes: 1 addition & 1 deletion src/doc/rustc/src/platform-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ target | std | host | notes
`x86_64-uwp-windows-gnu` | ✓ | |
[`x86_64-uwp-windows-msvc`](platform-support/uwp-windows-msvc.md) | ✓ | |
[`x86_64-win7-windows-gnu`](platform-support/win7-windows-gnu.md) | ✓ | | 64-bit Windows 7 support
[`x86_64-win7-windows-msvc`](platform-support/win7-windows-msvc.md) | ✓ | | 64-bit Windows 7 support
[`x86_64-win7-windows-msvc`](platform-support/win7-windows-msvc.md) | ✓ | | 64-bit Windows 7 support
[`x86_64-wrs-vxworks`](platform-support/vxworks.md) | ✓ | |
[`x86_64h-apple-darwin`](platform-support/x86_64h-apple-darwin.md) | ✓ | ✓ | macOS with late-gen Intel (at least Haswell)
[`xtensa-esp32-espidf`](platform-support/esp-idf.md) | ✓ | | Xtensa ESP32
Expand Down
3 changes: 2 additions & 1 deletion src/doc/rustc/src/platform-support/win7-windows-msvc.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ Target triples:

This target supports all of core, alloc, std and test. This is automatically
tested every night on private infrastructure hosted by the maintainer. Host
tools may also work, though those are not currently tested.
tools may also work, though it is not guaranteed. Last known success built
version of rustc with host tools (x86_64) is 1.91.0.

Those targets follow Windows calling convention for extern "C".

Expand Down
2 changes: 1 addition & 1 deletion src/etc/rust-lldb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
set -e

# Find the host triple so we can find lldb in rustlib.
host=$(rustc -vV | sed -n -e 's/^host: //p')
host=$(rustc --print host-tuple)

# Find out where to look for the pretty printer Python module
RUSTC_SYSROOT=$(rustc --print sysroot)
Expand Down
Loading
Loading