Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
1af868f
Add tabs to settings popover
GuillaumeGomez Sep 23, 2026
63e9275
Unify `ayu` search tabs display with other themes
GuillaumeGomez Sep 28, 2026
ec96114
Add GUI regression test for settings popover tabs
GuillaumeGomez Sep 28, 2026
59e2cea
Fix help popover top arrow background color
GuillaumeGomez Sep 28, 2026
02b3e2c
Fix(lib/sys): Restore Win7 compilation
PaulDance Oct 15, 2026
7b6a940
Fix check with `is_impl_trait_in_trait()` before expecting local id
Jamesbarford Oct 14, 2026
8e840fe
Map return even if there is no target expression
aerooneqq Oct 15, 2026
1818a35
Fix(lib/sys): Avoid dead_code warnings under Win7
PaulDance Oct 15, 2026
d2e6e9e
rustdoc: add disambiguators for identically named method in sidebar
lolbinarycat Sep 14, 2026
46fca93
rustdoc: add test for new sidebar disambiguators
lolbinarycat Sep 19, 2026
aa909a0
Test the interaction between `--remap-path-prefix` and doctests
Urgau Oct 12, 2026
52d575d
Ignore cross-compile as doctests don't always work when cross-compiled
Urgau Oct 13, 2026
ae4e708
Also ignore Windows and mingw due to path handling differences
Urgau Oct 15, 2026
c5a2e72
Drop WC_ERR_INVALID_CHARS from Windows stdio
lhecker Oct 15, 2026
d91d273
Rollup merge of #164175 - lhecker:windows-stdout-perf-chunking, r=Chr…
JonathanBrouwer Oct 16, 2026
ef2d081
Rollup merge of #164361 - aerooneqq:delegation-map-return-when-no-tar…
JonathanBrouwer Oct 16, 2026
3235e54
Rollup merge of #162778 - lolbinarycat:rustdoc-sidebar-disambig-14214…
JonathanBrouwer Oct 16, 2026
554cfad
Rollup merge of #163224 - GuillaumeGomez:settings-popover-tabs, r=not…
JonathanBrouwer Oct 16, 2026
17d94ea
Rollup merge of #164220 - Urgau:remap-path-prefix-doctest-panic, r=Gu…
JonathanBrouwer Oct 16, 2026
8aed807
Rollup merge of #164318 - Jamesbarford:fix/const-generic-issue-164180…
JonathanBrouwer Oct 16, 2026
7947dc7
Rollup merge of #164360 - PaulDance:patches/fix-win7-compilation, r=C…
JonathanBrouwer Oct 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
29 changes: 15 additions & 14 deletions compiler/rustc_ast_lowering/src/delegation/resolution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -484,16 +484,22 @@ impl<'tcx> DelegationResolver<'_, 'tcx> {
}
}

mapping.map_return = SelfFinder::contains_self(sig.output());

let arguments_to_map = sig
.inputs()
.iter()
.enumerate()
.skip(1) // Already checked above.
.filter_map(|(idx, &param)| SelfFinder::contains_self(param).then_some(idx));
// Heuristic: don't do wrapping if there is no target expression.
if delegation.body.is_some() {
let arguments_to_map = sig
.inputs()
.iter()
.enumerate()
.skip(1) // Already checked above.
.filter_map(|(idx, &param)| SelfFinder::contains_self(param).then_some(idx));

mapping.arguments_to_map.extend(arguments_to_map);
}

mapping.arguments_to_map.extend(arguments_to_map);
// Even if there is no target expression an output should be mapped,
// this is the case for functions without receiver which return `Self`
// for example.
mapping.map_return = SelfFinder::contains_self(sig.output());
}

// We can't yet map more than one argument if there are definitions inside.
Expand All @@ -513,11 +519,6 @@ impl<'tcx> DelegationResolver<'_, 'tcx> {
parent: LocalDefId,
span: Span,
) -> bool {
// Heuristic: don't do wrapping if there is no target expression.
if delegation.body.is_none() {
return false;
}

let tcx = self.tcx();

// Apply wrapping for delegations inside
Expand Down
11 changes: 10 additions & 1 deletion compiler/rustc_hir_analysis/src/check/compare_impl_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2141,7 +2141,16 @@ fn compare_const_generic_param_types<'tcx>(
iter::zip(const_params_of(impl_item.def_id), const_params_of(trait_item.def_id));

for (param_impl, param_trait) in param_iter {
let param_impl_ty_span = tcx.ty_span(param_impl.def_id.expect_local());
// If `impl_item` comes from RPITIT:
// <https://rustc-dev-guide.rust-lang.org/return-position-impl-trait-in-trait.html>
// then expecting a `LocalDefId` for `param_impl` is fraught: the synthetic
// associated type reuses the trait's generic parameters, which may be nonlocal.
// Use the impl item's span instead.
let param_impl_ty_span = if impl_item.is_impl_trait_in_trait() {
tcx.def_span(impl_item.def_id)
} else {
tcx.ty_span(param_impl.def_id.expect_local())
};

let cause = ObligationCause::new(
param_impl_ty_span,
Expand Down
30 changes: 12 additions & 18 deletions library/std/src/io/stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -594,9 +594,8 @@ impl fmt::Debug for StdinLock<'_> {
///
/// ### Note: Windows Portability Considerations
///
/// When operating in a console, the Windows implementation of this stream does not support
/// non-UTF-8 byte sequences. Attempting to write bytes that are not valid UTF-8 will return
/// an error.
/// When operating in a console, the Windows implementation of this stream decodes bytes
/// as UTF-8, replacing malformed sequences with the Unicode replacement character (U+FFFD).
///
/// In a process with a detached console, such as one using
/// `#![windows_subsystem = "windows"]`, or in a child process spawned from such a process,
Expand Down Expand Up @@ -627,9 +626,8 @@ pub struct Stdout {
///
/// ### Note: Windows Portability Considerations
///
/// When operating in a console, the Windows implementation of this stream does not support
/// non-UTF-8 byte sequences. Attempting to write bytes that are not valid UTF-8 will return
/// an error.
/// When operating in a console, the Windows implementation of this stream decodes bytes
/// as UTF-8, replacing malformed sequences with the Unicode replacement character (U+FFFD).
///
/// In a process with a detached console, such as one using
/// `#![windows_subsystem = "windows"]`, or in a child process spawned from such a process,
Expand Down Expand Up @@ -659,9 +657,8 @@ static STDOUT: OnceLock<ReentrantLock<RefCell<LineWriter<StdoutRaw>>>> = OnceLoc
///
/// ### Note: Windows Portability Considerations
///
/// When operating in a console, the Windows implementation of this stream does not support
/// non-UTF-8 byte sequences. Attempting to write bytes that are not valid UTF-8 will return
/// an error.
/// When operating in a console, the Windows implementation of this stream decodes bytes
/// as UTF-8, replacing malformed sequences with the Unicode replacement character (U+FFFD).
///
/// In a process with a detached console, such as one using
/// `#![windows_subsystem = "windows"]`, or in a child process spawned from such a process,
Expand Down Expand Up @@ -882,9 +879,8 @@ impl fmt::Debug for StdoutLock<'_> {
///
/// ### Note: Windows Portability Considerations
///
/// When operating in a console, the Windows implementation of this stream does not support
/// non-UTF-8 byte sequences. Attempting to write bytes that are not valid UTF-8 will return
/// an error.
/// When operating in a console, the Windows implementation of this stream decodes bytes
/// as UTF-8, replacing malformed sequences with the Unicode replacement character (U+FFFD).
///
/// In a process with a detached console, such as one using
/// `#![windows_subsystem = "windows"]`, or in a child process spawned from such a process,
Expand All @@ -903,9 +899,8 @@ pub struct Stderr {
///
/// ### Note: Windows Portability Considerations
///
/// When operating in a console, the Windows implementation of this stream does not support
/// non-UTF-8 byte sequences. Attempting to write bytes that are not valid UTF-8 will return
/// an error.
/// When operating in a console, the Windows implementation of this stream decodes bytes
/// as UTF-8, replacing malformed sequences with the Unicode replacement character (U+FFFD).
///
/// In a process with a detached console, such as one using
/// `#![windows_subsystem = "windows"]`, or in a child process spawned from such a process,
Expand All @@ -924,9 +919,8 @@ pub struct StderrLock<'a> {
///
/// ### Note: Windows Portability Considerations
///
/// When operating in a console, the Windows implementation of this stream does not support
/// non-UTF-8 byte sequences. Attempting to write bytes that are not valid UTF-8 will return
/// an error.
/// When operating in a console, the Windows implementation of this stream decodes bytes
/// as UTF-8, replacing malformed sequences with the Unicode replacement character (U+FFFD).
///
/// In a process with a detached console, such as one using
/// `#![windows_subsystem = "windows"]`, or in a child process spawned from such a process,
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/sys/io/is_terminal/windows.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use crate::ffi::c_void;
use crate::mem::MaybeUninit;
use crate::os::windows::io::{AsHandle, AsRawHandle, BorrowedHandle};
use crate::sys::c;

Expand Down Expand Up @@ -27,6 +26,7 @@ fn handle_is_console(handle: BorrowedHandle<'_>) -> bool {
}
}
_ => unsafe {
use crate::mem::MaybeUninit;
// `GetConsoleMode` incurs a remote RPC round-trip (= bad), so it's best avoided.
// `NtQueryVolumeInformationFile` lets us test the handle directly.
// The required `FILE_DEVICE_CONSOLE` type was introduced in Windows 8.
Expand Down
8 changes: 2 additions & 6 deletions library/std/src/sys/pal/windows/c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ pub type WCHAR = u16;

pub const INVALID_HANDLE_VALUE: HANDLE = ::core::ptr::without_provenance_mut(-1i32 as _);

#[cfg(not(target_vendor = "win7"))]
pub const FILE_DEVICE_NAMED_PIPE: u32 = 0x00000011;
#[cfg(not(target_vendor = "win7"))]
pub const FILE_DEVICE_CONSOLE: u32 = 0x00000050;

// https://learn.microsoft.com/en-us/cpp/c-runtime-library/exit-success-exit-failure?view=msvc-170
Expand Down Expand Up @@ -147,12 +149,6 @@ pub const HANDLE_FLAG_INHERIT: u32 = cu(windows_sys::HANDLE_FLAG_INHERIT);
pub const STACK_SIZE_PARAM_IS_A_RESERVATION: u32 =
cu(windows_sys::STACK_SIZE_PARAM_IS_A_RESERVATION);

// dwFlags -- WideCharToMultiByte
pub const WC_ERR_INVALID_CHARS: u32 = cu(windows_sys::WC_ERR_INVALID_CHARS);

// dwFlags -- MultiByteToWideChar
pub const MB_ERR_INVALID_CHARS: u32 = cu(windows_sys::MB_ERR_INVALID_CHARS);

// dwFlags -- CreateWaitableTimerExW
pub const CREATE_WAITABLE_TIMER_HIGH_RESOLUTION: u32 =
cu(windows_sys::CREATE_WAITABLE_TIMER_HIGH_RESOLUTION);
Expand Down
2 changes: 0 additions & 2 deletions library/std/src/sys/pal/windows/c/bindings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2284,7 +2284,6 @@ MAX_PATH
MAXIMUM_REPARSE_DATA_BUFFER_SIZE
MaximumFileInfoByHandleClass
MB_COMPOSITE
MB_ERR_INVALID_CHARS
MB_PRECOMPOSED
MB_USEGLYPHCHARS
MOVEFILE_COPY_ALLOWED
Expand Down Expand Up @@ -2500,7 +2499,6 @@ WakeAllConditionVariable
WakeByAddressAll
WakeByAddressSingle
WakeConditionVariable
WC_ERR_INVALID_CHARS
WideCharToMultiByte
WIN32_FIND_DATAW
WRITE_DAC
Expand Down
2 changes: 0 additions & 2 deletions library/std/src/sys/pal/windows/c/windows_sys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2985,7 +2985,6 @@ pub struct M128A {
pub const MAXIMUM_REPARSE_DATA_BUFFER_SIZE: i32 = 16384;
pub const MAX_PATH: i32 = 260;
pub const MB_COMPOSITE: i32 = 2;
pub const MB_ERR_INVALID_CHARS: i32 = 8;
pub const MB_PRECOMPOSED: i32 = 1;
pub const MB_USEGLYPHCHARS: i32 = 4;
pub const MOVEFILE_COPY_ALLOWED: i32 = 2;
Expand Down Expand Up @@ -3351,7 +3350,6 @@ pub const WAIT_FAILED: u32 = 4294967295;
pub const WAIT_IO_COMPLETION: i32 = 192;
pub const WAIT_OBJECT_0: i32 = 0;
pub const WAIT_TIMEOUT: i32 = 258;
pub const WC_ERR_INVALID_CHARS: i32 = 128;
#[repr(C)]
#[derive(Clone, Copy)]
pub struct WIN32_FIND_DATAW {
Expand Down
Loading
Loading