Skip to content

Commit

Permalink
Auto merge of rust-lang#135862 - jieyouxu:rollup-s3ynwhx, r=jieyouxu
Browse files Browse the repository at this point in the history
Rollup of 8 pull requests

Successful merges:

 - rust-lang#135557 (Point at invalid utf-8 span on user's source code)
 - rust-lang#135596 (Properly note when query stack is being cut off)
 - rust-lang#135638 (Make it possible to build GCC on CI)
 - rust-lang#135648 (support wasm inline assembly in `naked_asm!`)
 - rust-lang#135826 (Misc. `rustc_resolve` cleanups)
 - rust-lang#135827 (CI: free disk with in-tree script instead of GitHub Action)
 - rust-lang#135850 (Update the `wasm-component-ld` tool)
 - rust-lang#135855 (Only assert the `Parser` size on specific arches)

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed Jan 22, 2025
2 parents b2728d5 + 8acb4de commit e5eea03
Show file tree
Hide file tree
Showing 37 changed files with 1,261 additions and 675 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:
# intensive jobs to run on free runners, which however also have
# less disk space.
- name: free up disk space
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
run: src/ci/scripts/free-disk-space.sh
if: matrix.free_disk

# Rust Log Analyzer can't currently detect the PR number of a GitHub
Expand Down
41 changes: 20 additions & 21 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1525,7 +1525,6 @@ checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
dependencies = [
"ahash",
"allocator-api2",
"serde",
]

[[package]]
Expand All @@ -1535,6 +1534,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289"
dependencies = [
"foldhash",
"serde",
]

[[package]]
Expand Down Expand Up @@ -5880,9 +5880,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"

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

[[package]]
name = "wasm-bindgen"
Expand Down Expand Up @@ -5944,17 +5944,17 @@ dependencies = [

[[package]]
name = "wasm-component-ld"
version = "0.5.11"
version = "0.5.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2b05c3820968b335f10e703218459e4fd2cc91fdfc8f7936a993f1aacaa0938"
checksum = "580305a8e3f1b7a79859a8db897de643533b2851c5eb080fe5800233f16dec88"
dependencies = [
"anyhow",
"clap",
"lexopt",
"libc",
"tempfile",
"wasi-preview1-component-adapter-provider",
"wasmparser 0.219.1",
"wasmparser 0.223.0",
"wat",
"windows-sys 0.59.0",
"winsplit",
Expand Down Expand Up @@ -5991,18 +5991,19 @@ dependencies = [

[[package]]
name = "wasm-metadata"
version = "0.219.1"
version = "0.223.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2af5a8e37a5e996861e1813f8de30911c47609c9ff51a7284f7dbd754dc3a9f3"
checksum = "5c730c3379d3d20e5a0245b0724b924483e853588ca8fba547c1e21f19e7d735"
dependencies = [
"anyhow",
"indexmap",
"serde",
"serde_derive",
"serde_json",
"spdx",
"wasm-encoder 0.219.1",
"wasmparser 0.219.1",
"url",
"wasm-encoder 0.223.0",
"wasmparser 0.223.0",
]

[[package]]
Expand All @@ -6011,12 +6012,8 @@ version = "0.219.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c771866898879073c53b565a6c7b49953795159836714ac56a5befb581227c5"
dependencies = [
"ahash",
"bitflags",
"hashbrown 0.14.5",
"indexmap",
"semver",
"serde",
]

[[package]]
Expand All @@ -6035,8 +6032,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d5a99faceb1a5a84dd6084ec4bfa4b2ab153b5793b43fd8f58b89232634afc35"
dependencies = [
"bitflags",
"hashbrown 0.15.2",
"indexmap",
"semver",
"serde",
]

[[package]]
Expand Down Expand Up @@ -6476,9 +6475,9 @@ checksum = "3ab703352da6a72f35c39a533526393725640575bb211f61987a2748323ad956"

[[package]]
name = "wit-component"
version = "0.219.1"
version = "0.223.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ad1673163c0cb14a6a19ddbf44dd4efe6f015ec1ebb8156710ac32501f19fba2"
checksum = "c10ed2aeee4c8ec5715875f62f4a3de3608d6987165c116810d8c2908aa9d93b"
dependencies = [
"anyhow",
"bitflags",
Expand All @@ -6487,17 +6486,17 @@ dependencies = [
"serde",
"serde_derive",
"serde_json",
"wasm-encoder 0.219.1",
"wasm-encoder 0.223.0",
"wasm-metadata",
"wasmparser 0.219.1",
"wasmparser 0.223.0",
"wit-parser",
]

[[package]]
name = "wit-parser"
version = "0.219.1"
version = "0.223.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4a86f669283257e8e424b9a4fc3518e3ade0b95deb9fbc0f93a1876be3eda598"
checksum = "92772f4dcacb804b275981eea1d920b12b377993b53307f1e33d87404e080281"
dependencies = [
"anyhow",
"id-arena",
Expand All @@ -6508,7 +6507,7 @@ dependencies = [
"serde_derive",
"serde_json",
"unicode-xid",
"wasmparser 0.219.1",
"wasmparser 0.223.0",
]

[[package]]
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_builtin_macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#![feature(proc_macro_internals)]
#![feature(proc_macro_quote)]
#![feature(rustdoc_internals)]
#![feature(string_from_utf8_lossy_owned)]
#![feature(try_blocks)]
#![warn(unreachable_pub)]
// tidy-alphabetical-end
Expand Down
11 changes: 6 additions & 5 deletions compiler/rustc_builtin_macros/src/source_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use rustc_expand::base::{
use rustc_expand::module::DirOwnership;
use rustc_lint_defs::BuiltinLintDiag;
use rustc_parse::parser::{ForceCollect, Parser};
use rustc_parse::{new_parser_from_file, unwrap_or_emit_fatal};
use rustc_parse::{new_parser_from_file, unwrap_or_emit_fatal, utf8_error};
use rustc_session::lint::builtin::INCOMPLETE_INCLUDE;
use rustc_span::source_map::SourceMap;
use rustc_span::{Pos, Span, Symbol};
Expand Down Expand Up @@ -209,9 +209,10 @@ pub(crate) fn expand_include_str(
let interned_src = Symbol::intern(src);
MacEager::expr(cx.expr_str(cx.with_def_site_ctxt(bsp), interned_src))
}
Err(_) => {
let guar = cx.dcx().span_err(sp, format!("`{path}` wasn't a utf-8 file"));
DummyResult::any(sp, guar)
Err(utf8err) => {
let mut err = cx.dcx().struct_span_err(sp, format!("`{path}` wasn't a utf-8 file"));
utf8_error(cx.source_map(), path.as_str(), None, &mut err, utf8err, &bytes[..]);
DummyResult::any(sp, err.emit())
}
},
Err(dummy) => dummy,
Expand Down Expand Up @@ -273,7 +274,7 @@ fn load_binary_file(
.and_then(|path| path.into_os_string().into_string().ok());

if let Some(new_path) = new_path {
err.span_suggestion(
err.span_suggestion_verbose(
path_span,
"there is a file with the same name in a different directory",
format!("\"{}\"", new_path.replace('\\', "/").escape_debug()),
Expand Down
Loading

0 comments on commit e5eea03

Please sign in to comment.