Skip to content

Commit e5eea03

Browse files
committed
Auto merge of #135862 - jieyouxu:rollup-s3ynwhx, r=jieyouxu
Rollup of 8 pull requests Successful merges: - #135557 (Point at invalid utf-8 span on user's source code) - #135596 (Properly note when query stack is being cut off) - #135638 (Make it possible to build GCC on CI) - #135648 (support wasm inline assembly in `naked_asm!`) - #135826 (Misc. `rustc_resolve` cleanups) - #135827 (CI: free disk with in-tree script instead of GitHub Action) - #135850 (Update the `wasm-component-ld` tool) - #135855 (Only assert the `Parser` size on specific arches) r? `@ghost` `@rustbot` modify labels: rollup
2 parents b2728d5 + 8acb4de commit e5eea03

File tree

37 files changed

+1261
-675
lines changed

37 files changed

+1261
-675
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ jobs:
109109
# intensive jobs to run on free runners, which however also have
110110
# less disk space.
111111
- name: free up disk space
112-
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
112+
run: src/ci/scripts/free-disk-space.sh
113113
if: matrix.free_disk
114114

115115
# Rust Log Analyzer can't currently detect the PR number of a GitHub

Cargo.lock

+20-21
Original file line numberDiff line numberDiff line change
@@ -1525,7 +1525,6 @@ checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
15251525
dependencies = [
15261526
"ahash",
15271527
"allocator-api2",
1528-
"serde",
15291528
]
15301529

15311530
[[package]]
@@ -1535,6 +1534,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
15351534
checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289"
15361535
dependencies = [
15371536
"foldhash",
1537+
"serde",
15381538
]
15391539

15401540
[[package]]
@@ -5880,9 +5880,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
58805880

58815881
[[package]]
58825882
name = "wasi-preview1-component-adapter-provider"
5883-
version = "24.0.1"
5883+
version = "29.0.1"
58845884
source = "registry+https://github.com/rust-lang/crates.io-index"
5885-
checksum = "0f76d9fa52234153eeb40b088de91a8c13dc28a912cf6f31cd89ca4bac9024e0"
5885+
checksum = "dcd9f21bbde82ba59e415a8725e6ad0d0d7e9e460b1a3ccbca5bdee952c1a324"
58865886

58875887
[[package]]
58885888
name = "wasm-bindgen"
@@ -5944,17 +5944,17 @@ dependencies = [
59445944

59455945
[[package]]
59465946
name = "wasm-component-ld"
5947-
version = "0.5.11"
5947+
version = "0.5.12"
59485948
source = "registry+https://github.com/rust-lang/crates.io-index"
5949-
checksum = "a2b05c3820968b335f10e703218459e4fd2cc91fdfc8f7936a993f1aacaa0938"
5949+
checksum = "580305a8e3f1b7a79859a8db897de643533b2851c5eb080fe5800233f16dec88"
59505950
dependencies = [
59515951
"anyhow",
59525952
"clap",
59535953
"lexopt",
59545954
"libc",
59555955
"tempfile",
59565956
"wasi-preview1-component-adapter-provider",
5957-
"wasmparser 0.219.1",
5957+
"wasmparser 0.223.0",
59585958
"wat",
59595959
"windows-sys 0.59.0",
59605960
"winsplit",
@@ -5991,18 +5991,19 @@ dependencies = [
59915991

59925992
[[package]]
59935993
name = "wasm-metadata"
5994-
version = "0.219.1"
5994+
version = "0.223.0"
59955995
source = "registry+https://github.com/rust-lang/crates.io-index"
5996-
checksum = "2af5a8e37a5e996861e1813f8de30911c47609c9ff51a7284f7dbd754dc3a9f3"
5996+
checksum = "5c730c3379d3d20e5a0245b0724b924483e853588ca8fba547c1e21f19e7d735"
59975997
dependencies = [
59985998
"anyhow",
59995999
"indexmap",
60006000
"serde",
60016001
"serde_derive",
60026002
"serde_json",
60036003
"spdx",
6004-
"wasm-encoder 0.219.1",
6005-
"wasmparser 0.219.1",
6004+
"url",
6005+
"wasm-encoder 0.223.0",
6006+
"wasmparser 0.223.0",
60066007
]
60076008

60086009
[[package]]
@@ -6011,12 +6012,8 @@ version = "0.219.1"
60116012
source = "registry+https://github.com/rust-lang/crates.io-index"
60126013
checksum = "5c771866898879073c53b565a6c7b49953795159836714ac56a5befb581227c5"
60136014
dependencies = [
6014-
"ahash",
60156015
"bitflags",
6016-
"hashbrown 0.14.5",
60176016
"indexmap",
6018-
"semver",
6019-
"serde",
60206017
]
60216018

60226019
[[package]]
@@ -6035,8 +6032,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
60356032
checksum = "d5a99faceb1a5a84dd6084ec4bfa4b2ab153b5793b43fd8f58b89232634afc35"
60366033
dependencies = [
60376034
"bitflags",
6035+
"hashbrown 0.15.2",
60386036
"indexmap",
60396037
"semver",
6038+
"serde",
60406039
]
60416040

60426041
[[package]]
@@ -6476,9 +6475,9 @@ checksum = "3ab703352da6a72f35c39a533526393725640575bb211f61987a2748323ad956"
64766475

64776476
[[package]]
64786477
name = "wit-component"
6479-
version = "0.219.1"
6478+
version = "0.223.0"
64806479
source = "registry+https://github.com/rust-lang/crates.io-index"
6481-
checksum = "ad1673163c0cb14a6a19ddbf44dd4efe6f015ec1ebb8156710ac32501f19fba2"
6480+
checksum = "c10ed2aeee4c8ec5715875f62f4a3de3608d6987165c116810d8c2908aa9d93b"
64826481
dependencies = [
64836482
"anyhow",
64846483
"bitflags",
@@ -6487,17 +6486,17 @@ dependencies = [
64876486
"serde",
64886487
"serde_derive",
64896488
"serde_json",
6490-
"wasm-encoder 0.219.1",
6489+
"wasm-encoder 0.223.0",
64916490
"wasm-metadata",
6492-
"wasmparser 0.219.1",
6491+
"wasmparser 0.223.0",
64936492
"wit-parser",
64946493
]
64956494

64966495
[[package]]
64976496
name = "wit-parser"
6498-
version = "0.219.1"
6497+
version = "0.223.0"
64996498
source = "registry+https://github.com/rust-lang/crates.io-index"
6500-
checksum = "4a86f669283257e8e424b9a4fc3518e3ade0b95deb9fbc0f93a1876be3eda598"
6499+
checksum = "92772f4dcacb804b275981eea1d920b12b377993b53307f1e33d87404e080281"
65016500
dependencies = [
65026501
"anyhow",
65036502
"id-arena",
@@ -6508,7 +6507,7 @@ dependencies = [
65086507
"serde_derive",
65096508
"serde_json",
65106509
"unicode-xid",
6511-
"wasmparser 0.219.1",
6510+
"wasmparser 0.223.0",
65126511
]
65136512

65146513
[[package]]

compiler/rustc_builtin_macros/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#![feature(proc_macro_internals)]
1717
#![feature(proc_macro_quote)]
1818
#![feature(rustdoc_internals)]
19+
#![feature(string_from_utf8_lossy_owned)]
1920
#![feature(try_blocks)]
2021
#![warn(unreachable_pub)]
2122
// tidy-alphabetical-end

compiler/rustc_builtin_macros/src/source_util.rs

+6-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use rustc_expand::base::{
1313
use rustc_expand::module::DirOwnership;
1414
use rustc_lint_defs::BuiltinLintDiag;
1515
use rustc_parse::parser::{ForceCollect, Parser};
16-
use rustc_parse::{new_parser_from_file, unwrap_or_emit_fatal};
16+
use rustc_parse::{new_parser_from_file, unwrap_or_emit_fatal, utf8_error};
1717
use rustc_session::lint::builtin::INCOMPLETE_INCLUDE;
1818
use rustc_span::source_map::SourceMap;
1919
use rustc_span::{Pos, Span, Symbol};
@@ -209,9 +209,10 @@ pub(crate) fn expand_include_str(
209209
let interned_src = Symbol::intern(src);
210210
MacEager::expr(cx.expr_str(cx.with_def_site_ctxt(bsp), interned_src))
211211
}
212-
Err(_) => {
213-
let guar = cx.dcx().span_err(sp, format!("`{path}` wasn't a utf-8 file"));
214-
DummyResult::any(sp, guar)
212+
Err(utf8err) => {
213+
let mut err = cx.dcx().struct_span_err(sp, format!("`{path}` wasn't a utf-8 file"));
214+
utf8_error(cx.source_map(), path.as_str(), None, &mut err, utf8err, &bytes[..]);
215+
DummyResult::any(sp, err.emit())
215216
}
216217
},
217218
Err(dummy) => dummy,
@@ -273,7 +274,7 @@ fn load_binary_file(
273274
.and_then(|path| path.into_os_string().into_string().ok());
274275

275276
if let Some(new_path) = new_path {
276-
err.span_suggestion(
277+
err.span_suggestion_verbose(
277278
path_span,
278279
"there is a file with the same name in a different directory",
279280
format!("\"{}\"", new_path.replace('\\', "/").escape_debug()),

0 commit comments

Comments
 (0)