Skip to content

Rollup of 5 pull requests #139377

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

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
bacd57a
Add integer to string formatting tests
GuillaumeGomez Mar 16, 2025
25900c2
Tweak integer to string conversion test a bit to be future-proof
GuillaumeGomez Mar 23, 2025
6ce74f7
replace extra_filename with strict version hash in metrics file names
yaahc Mar 25, 2025
53ef53a
settings.js: begin typechecking migration
lolbinarycat Apr 2, 2025
6ca7bd0
settings.js: add new rustdoc.Setting interface
lolbinarycat Apr 2, 2025
f056836
settings.js: remove dead code for adding <hr> to settings page
lolbinarycat Apr 2, 2025
9f8d3d0
settings.js: refactor settingsBlurHandler
lolbinarycat Apr 2, 2025
d2ff26b
settings.js: add some null checks to buildSettingsPage
lolbinarycat Apr 2, 2025
a805f52
settings.js: make top-level code typecheck
lolbinarycat Apr 2, 2025
8a34129
main.js: make hideAllModals docs clearer
lolbinarycat Apr 2, 2025
9f54910
settings.js: add elemContainsTarget utility function
lolbinarycat Apr 2, 2025
eed8d09
Make target maintainers more easily pingable
Noratrieb Mar 27, 2025
ef1827b
settings.js: fix whitespace
lolbinarycat Apr 2, 2025
4435c99
rustdoc js: satisfy eslint
lolbinarycat Apr 2, 2025
a91e97c
Fix 2024 edition doctest panic output
GuillaumeGomez Apr 3, 2025
fff2484
Add regression test for #137970
GuillaumeGomez Apr 3, 2025
f9927ee
Use `eprint!` instead of `eprintln!`
GuillaumeGomez Apr 3, 2025
be01f45
Rollup merge of #138546 - GuillaumeGomez:integer-to-string-tests, r=A…
matthiaskrgr Apr 4, 2025
24ab519
Rollup merge of #138950 - yaahc:svh-metrics-name, r=bjorn3
matthiaskrgr Apr 4, 2025
547b3d1
Rollup merge of #139028 - Noratrieb:ping-pong, r=RalfJung
matthiaskrgr Apr 4, 2025
580b4e4
Rollup merge of #139274 - lolbinarycat:rustdoc-js-less-expect-error-p…
matthiaskrgr Apr 4, 2025
6a70a42
Rollup merge of #139328 - GuillaumeGomez:fix-panic-output-137970, r=f…
matthiaskrgr Apr 4, 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
13 changes: 5 additions & 8 deletions compiler/rustc_driver_impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ use rustc_session::lint::{Lint, LintId};
use rustc_session::output::{CRATE_TYPES, collect_crate_types, invalid_output_for_target};
use rustc_session::{EarlyDiagCtxt, Session, config, filesearch};
use rustc_span::FileName;
use rustc_span::def_id::LOCAL_CRATE;
use rustc_target::json::ToJson;
use rustc_target::spec::{Target, TargetTuple};
use time::OffsetDateTime;
Expand Down Expand Up @@ -392,14 +393,10 @@ pub fn run_compiler(at_args: &[String], callbacks: &mut (dyn Callbacks + Send))
}

fn dump_feature_usage_metrics(tcxt: TyCtxt<'_>, metrics_dir: &Path) {
let output_filenames = tcxt.output_filenames(());
let mut metrics_file_name = std::ffi::OsString::from("unstable_feature_usage_metrics-");
let mut metrics_path = output_filenames.with_directory_and_extension(metrics_dir, "json");
let metrics_file_stem =
metrics_path.file_name().expect("there should be a valid default output filename");
metrics_file_name.push(metrics_file_stem);
metrics_path.pop();
metrics_path.push(metrics_file_name);
let hash = tcxt.crate_hash(LOCAL_CRATE);
let crate_name = tcxt.crate_name(LOCAL_CRATE);
let metrics_file_name = format!("unstable_feature_usage_metrics-{crate_name}-{hash}.json");
let metrics_path = metrics_dir.join(metrics_file_name);
if let Err(error) = tcxt.features().dump_feature_usage_metrics(metrics_path) {
// FIXME(yaahc): once metrics can be enabled by default we will want "failure to emit
// default metrics" to only produce a warning when metrics are enabled by default and emit
Expand Down
5 changes: 5 additions & 0 deletions compiler/rustc_middle/src/ty/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1804,10 +1804,15 @@ impl<'tcx> TyCtxt<'tcx> {
// - needs_metadata: for putting into crate metadata.
// - instrument_coverage: for putting into coverage data (see
// `hash_mir_source`).
// - metrics_dir: metrics use the strict version hash in the filenames
// for dumped metrics files to prevent overwriting distinct metrics
// for similar source builds (may change in the future, this is part
// of the proof of concept impl for the metrics initiative project goal)
cfg!(debug_assertions)
|| self.sess.opts.incremental.is_some()
|| self.needs_metadata()
|| self.sess.instrument_coverage()
|| self.sess.opts.unstable_opts.metrics_dir.is_some()
}

#[inline]
Expand Down
1 change: 1 addition & 0 deletions library/alloctests/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ mod fmt;
mod heap;
mod linked_list;
mod misc_tests;
mod num;
mod rc;
mod slice;
mod sort;
Expand Down
69 changes: 69 additions & 0 deletions library/alloctests/tests/num.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
use std::fmt::{Debug, Display};
use std::str::FromStr;

fn assert_nb<Int: ToString + FromStr + Debug + Display + Eq>(value: Int) {
let s = value.to_string();
let s2 = format!("s: {}.", value);

assert_eq!(format!("s: {s}."), s2);
let Ok(ret) = Int::from_str(&s) else {
panic!("failed to convert into to string");
};
assert_eq!(ret, value);
}

macro_rules! uint_to_s {
($($fn_name:ident, $int:ident,)+) => {
$(
#[test]
fn $fn_name() {
assert_nb::<$int>($int::MIN);
assert_nb::<$int>($int::MAX);
assert_nb::<$int>(1);
assert_nb::<$int>($int::MIN / 2);
assert_nb::<$int>($int::MAX / 2);
}
)+
}
}
macro_rules! int_to_s {
($($fn_name:ident, $int:ident,)+) => {
$(
#[test]
fn $fn_name() {
assert_nb::<$int>($int::MIN);
assert_nb::<$int>($int::MAX);
assert_nb::<$int>(1);
assert_nb::<$int>(0);
assert_nb::<$int>(-1);
assert_nb::<$int>($int::MIN / 2);
assert_nb::<$int>($int::MAX / 2);
}
)+
}
}

int_to_s!(
test_i8_to_string,
i8,
test_i16_to_string,
i16,
test_i32_to_string,
i32,
test_i64_to_string,
i64,
test_i128_to_string,
i128,
);
uint_to_s!(
test_u8_to_string,
u8,
test_u16_to_string,
u16,
test_u32_to_string,
u32,
test_u64_to_string,
u64,
test_u128_to_string,
u128,
);
3 changes: 2 additions & 1 deletion src/doc/rustc/src/platform-support/TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ One-sentence description of the target (e.g. CPU, OS)

## Target maintainers

- Some Person, https://github.com/...
[@Ghost](https://github.com/Ghost)
[@octocat](https://github.com/octocat)

## Requirements

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

Nintendo Switch with pure-Rust toolchain.

## Designated Developers
## Target Maintainers

* [@leo60228](https://github.com/leo60228)
* [@jam1garner](https://github.com/jam1garner)
[@leo60228](https://github.com/leo60228)
[@jam1garner](https://github.com/jam1garner)

## Requirements

Expand Down
4 changes: 2 additions & 2 deletions src/doc/rustc/src/platform-support/aarch64-unknown-teeos.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ TEEOS is open source in progress. [MORE about](https://gitee.com/opentrustee-gro

## Target maintainers

- Petrochenkov Vadim
- Sword-Destiny
[@petrochenkov](https://github.com/petrochenkov)
[@Sword-Destiny](https://github.com/Sword-Destiny)

## Setup
We use OpenHarmony SDK for TEEOS.
Expand Down
4 changes: 2 additions & 2 deletions src/doc/rustc/src/platform-support/aix.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Rust for AIX operating system, currently only 64-bit PowerPC is supported.

## Target maintainers

- David Tenty `[email protected]`, https://github.com/daltenty
- Chris Cambly, `[email protected]`, https://github.com/gilamn5tr
[@daltenty](https://github.com/daltenty)
[@gilamn5tr](https://github.com/gilamn5tr)

## Requirements

Expand Down
2 changes: 1 addition & 1 deletion src/doc/rustc/src/platform-support/amdgcn-amd-amdhsa.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ AMD GPU target for compute/HSA (Heterogeneous System Architecture).

## Target maintainers

- [@Flakebi](https://github.com/Flakebi)
[@Flakebi](https://github.com/Flakebi)

## Requirements

Expand Down
6 changes: 3 additions & 3 deletions src/doc/rustc/src/platform-support/android.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

## Target maintainers

- Chris Wailes ([@chriswailes](https://github.com/chriswailes))
- Matthew Maurer ([@maurer](https://github.com/maurer))
- Martin Geisler ([@mgeisler](https://github.com/mgeisler))
[@chriswailes](https://github.com/chriswailes)
[@maurer](https://github.com/maurer)
[@mgeisler](https://github.com/mgeisler)

## Requirements

Expand Down
4 changes: 2 additions & 2 deletions src/doc/rustc/src/platform-support/apple-darwin.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Apple macOS targets.

## Target maintainers

- [@thomcc](https://github.com/thomcc)
- [@madsmtm](https://github.com/madsmtm)
[@thomcc](https://github.com/thomcc)
[@madsmtm](https://github.com/madsmtm)

## Requirements

Expand Down
6 changes: 3 additions & 3 deletions src/doc/rustc/src/platform-support/apple-ios-macabi.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Apple Mac Catalyst targets.

## Target maintainers

- [@badboy](https://github.com/badboy)
- [@BlackHoleFox](https://github.com/BlackHoleFox)
- [@madsmtm](https://github.com/madsmtm)
[@badboy](https://github.com/badboy)
[@BlackHoleFox](https://github.com/BlackHoleFox)
[@madsmtm](https://github.com/madsmtm)

## Requirements

Expand Down
6 changes: 3 additions & 3 deletions src/doc/rustc/src/platform-support/apple-ios.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Apple iOS / iPadOS targets.

## Target maintainers

- [@badboy](https://github.com/badboy)
- [@deg4uss3r](https://github.com/deg4uss3r)
- [@madsmtm](https://github.com/madsmtm)
[@badboy](https://github.com/badboy)
[@deg4uss3r](https://github.com/deg4uss3r)
[@madsmtm](https://github.com/madsmtm)

## Requirements

Expand Down
4 changes: 2 additions & 2 deletions src/doc/rustc/src/platform-support/apple-tvos.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Apple tvOS targets.

## Target maintainers

- [@thomcc](https://github.com/thomcc)
- [@madsmtm](https://github.com/madsmtm)
[@thomcc](https://github.com/thomcc)
[@madsmtm](https://github.com/madsmtm)

## Requirements

Expand Down
4 changes: 2 additions & 2 deletions src/doc/rustc/src/platform-support/apple-visionos.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Apple visionOS / xrOS targets.

## Target maintainers

- [@agg23](https://github.com/agg23)
- [@madsmtm](https://github.com/madsmtm)
[@agg23](https://github.com/agg23)
[@madsmtm](https://github.com/madsmtm)

## Requirements

Expand Down
8 changes: 4 additions & 4 deletions src/doc/rustc/src/platform-support/apple-watchos.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ Apple watchOS targets.

## Target maintainers

- [@deg4uss3r](https://github.com/deg4uss3r)
- [@vladimir-ea](https://github.com/vladimir-ea)
- [@leohowell](https://github.com/leohowell)
- [@madsmtm](https://github.com/madsmtm)
[@deg4uss3r](https://github.com/deg4uss3r)
[@vladimir-ea](https://github.com/vladimir-ea)
[@leohowell](https://github.com/leohowell)
[@madsmtm](https://github.com/madsmtm)

## Requirements

Expand Down
2 changes: 1 addition & 1 deletion src/doc/rustc/src/platform-support/arm64e-apple-darwin.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ARM64e macOS (11.0+, Big Sur+)

## Target maintainers

- Artyom Tetyukhin ([@arttet](https://github.com/arttet))
[@arttet](https://github.com/arttet)

## Requirements

Expand Down
2 changes: 1 addition & 1 deletion src/doc/rustc/src/platform-support/arm64e-apple-ios.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ARM64e iOS (14.0+)

## Target maintainers

- Artyom Tetyukhin ([@arttet](https://github.com/arttet))
[@arttet](https://github.com/arttet)

## Requirements

Expand Down
2 changes: 1 addition & 1 deletion src/doc/rustc/src/platform-support/arm64e-apple-tvos.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ARM64e tvOS (10.0+)

## Target maintainers

- Artyom Tetyukhin ([@arttet](https://github.com/arttet))
[@arttet](https://github.com/arttet)

## Requirements

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ applications on AArch64 Windows 11. See <https://learn.microsoft.com/en-us/windo

## Target maintainers

- [@dpaoliello](https://github.com/dpaoliello)
[@dpaoliello](https://github.com/dpaoliello)

## Requirements

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ BE8 architecture retains the same little-endian ordered code-stream used by conv
BE8 architecture is the default big-endian architecture for Arm since [Armv6](https://developer.arm.com/documentation/101754/0616/armlink-Reference/armlink-Command-line-Options/--be8?lang=en). It's predecessor, used for Armv4 and Armv5 devices was [BE32](https://developer.arm.com/documentation/dui0474/j/linker-command-line-options/--be32). On Armv6 architecture, endianness can be configured via [system registers](https://developer.arm.com/documentation/ddi0290/g/unaligned-and-mixed-endian-data-access-support/mixed-endian-access-support/interaction-between-the-bus-protocol-and-the-core-endianness). However, BE32 was withdrawn for [Armv7](https://developer.arm.com/documentation/ddi0406/cb/Appendixes/Deprecated-and-Obsolete-Features/Obsolete-features/Support-for-BE-32-endianness-model) onwards.

## Target Maintainers
* [@WorksButNotTested](https://github.com/WorksButNotTested)

[@WorksButNotTested](https://github.com/WorksButNotTested)

## Requirements
The target is cross-compiled. This target supports `std` in the normal way (indeed only nominal changes are required from the standard Arm configuration).
Expand Down
4 changes: 2 additions & 2 deletions src/doc/rustc/src/platform-support/armv4t-none-eabi.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ overall performance.

## Target Maintainers

* [@Lokathor](https://github.com/lokathor)
* [@corwinkuiper](https://github.com/corwinkuiper)
[@Lokathor](https://github.com/lokathor)
[@corwinkuiper](https://github.com/corwinkuiper)

## Testing

Expand Down
2 changes: 1 addition & 1 deletion src/doc/rustc/src/platform-support/armv5te-none-eabi.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ See [`arm-none-eabi`](arm-none-eabi.md) for information applicable to all

## Target Maintainers

* [@QuinnPainter](https://github.com/QuinnPainter)
[@QuinnPainter](https://github.com/QuinnPainter)

## Testing

Expand Down
6 changes: 3 additions & 3 deletions src/doc/rustc/src/platform-support/armv6k-nintendo-3ds.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ from nor used with any official Nintendo SDK.
This target is maintained by members of the [@rust3ds](https://github.com/rust3ds)
organization:

- [@Meziu](https://github.com/Meziu)
- [@AzureMarker](https://github.com/AzureMarker)
- [@ian-h-chamberlain](https://github.com/ian-h-chamberlain)
[@Meziu](https://github.com/Meziu)
[@AzureMarker](https://github.com/AzureMarker)
[@ian-h-chamberlain](https://github.com/ian-h-chamberlain)

## Requirements

Expand Down
2 changes: 1 addition & 1 deletion src/doc/rustc/src/platform-support/armv7-rtems-eabihf.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ARM targets for the [RTEMS realtime operating system](https://www.rtems.org) us

## Target maintainers

- [@thesummer](https://github.com/thesummer)
[@thesummer](https://github.com/thesummer)

## Requirements

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ from nor used with any official Sony SDK.

## Target maintainers

* [@nikarh](https://github.com/nikarh)
* [@pheki](https://github.com/pheki)
* [@ZetaNumbers](https://github.com/ZetaNumbers)
[@nikarh](https://github.com/nikarh)
[@pheki](https://github.com/pheki)
[@zetanumbers](https://github.com/zetanumbers)

## Requirements

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This target supports Armv7-A softfloat CPUs and uses the uclibc-ng standard libr

## Target maintainers

* [@lancethepants](https://github.com/lancethepants)
[@lancethepants](https://github.com/lancethepants)

## Requirements

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

This tier supports the Armv7-A processor running a Linux kernel and uClibc-ng standard library. It provides full support for rust and the rust standard library.

## Designated Developers
## Target Maintainers

* [@skrap](https://github.com/skrap)
[@skrap](https://github.com/skrap)

## Requirements

Expand Down
2 changes: 1 addition & 1 deletion src/doc/rustc/src/platform-support/armv7r-none-eabi.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ See [`arm-none-eabi`](arm-none-eabi.md) for information applicable to all

## Target maintainers

- [Chris Copeland](https://github.com/chrisnc), `[email protected]`
[@chrisnc](https://github.com/chrisnc)

## Requirements

Expand Down
Loading
Loading