about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-01-30 17:01:18 +0000
committerbors <bors@rust-lang.org>2024-01-30 17:01:18 +0000
commitf3d71c9249072413f014b378bb5ea79c8a7dc9a7 (patch)
tree6d35d2fb0886ceb2aa7858c88f7694ba2f1e9801 /src
parent5ad7454f7503b6af2800bf4a7c875962cb03f913 (diff)
parent27bc49656462c48f3b98ac1d8ce2b06d446e5ad3 (diff)
downloadrust-f3d71c9249072413f014b378bb5ea79c8a7dc9a7.tar.gz
rust-f3d71c9249072413f014b378bb5ea79c8a7dc9a7.zip
Auto merge of #120496 - GuillaumeGomez:rollup-fmu9jre, r=GuillaumeGomez
Rollup of 11 pull requests

Successful merges:

 - #117906 (Improve display of crate name when hovered)
 - #118533 (Suppress unhelpful diagnostics for unresolved top level attributes)
 - #120293 (Deduplicate more sized errors on call exprs)
 - #120295 (Remove `raw_os_nonzero` feature.)
 - #120310 (adapt test for v0 symbol mangling)
 - #120342 (Remove various `has_errors` or `err_count` uses)
 - #120434 (Revert outdated version of "Add the wasm32-wasi-preview2 target")
 - #120445 (Fix some `Arc` allocator leaks)
 - #120475 (Improve error message when `cargo build` is used to build the compiler)
 - #120476 (Remove some unnecessary check logic for lang items in HIR typeck)
 - #120485 (add missing potential_query_instability for keys and values in hashmap)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/src/core/build_steps/compile.rs7
-rw-r--r--src/bootstrap/src/lib.rs2
-rw-r--r--src/doc/rustc/src/SUMMARY.md1
-rw-r--r--src/doc/rustc/src/platform-support.md1
-rw-r--r--src/doc/rustc/src/platform-support/wasm32-wasi-preview2.md30
-rw-r--r--src/librustdoc/html/static/css/rustdoc.css6
-rw-r--r--src/tools/clippy/clippy_lints/src/transmute/utils.rs18
7 files changed, 6 insertions, 59 deletions
diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs
index 043473287fc..ddbe18ab838 100644
--- a/src/bootstrap/src/core/build_steps/compile.rs
+++ b/src/bootstrap/src/core/build_steps/compile.rs
@@ -367,13 +367,10 @@ fn copy_self_contained_objects(
         let srcdir = builder
             .wasi_root(target)
             .unwrap_or_else(|| {
-                panic!(
-                    "Target {:?} does not have a \"wasi-root\" key in Config.toml",
-                    target.triple
-                )
+                panic!("Target {:?} does not have a \"wasi-root\" key", target.triple)
             })
             .join("lib")
-            .join(target.to_string().replace("-preview1", "").replace("-preview2", ""));
+            .join(target.to_string().replace("-preview1", ""));
         for &obj in &["libc.a", "crt1-command.o", "crt1-reactor.o"] {
             copy_and_stamp(
                 builder,
diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs
index 1726e7aacbc..1336abf6c7a 100644
--- a/src/bootstrap/src/lib.rs
+++ b/src/bootstrap/src/lib.rs
@@ -88,7 +88,7 @@ const EXTRA_CHECK_CFGS: &[(Option<Mode>, &str, Option<&[&'static str]>)] = &[
     (Some(Mode::Std), "no_sync", None),
     (Some(Mode::Std), "backtrace_in_libstd", None),
     /* Extra values not defined in the built-in targets yet, but used in std */
-    (Some(Mode::Std), "target_env", Some(&["libnx", "preview2"])),
+    (Some(Mode::Std), "target_env", Some(&["libnx"])),
     // (Some(Mode::Std), "target_os", Some(&[])),
     // #[cfg(bootstrap)] zkvm
     (Some(Mode::Std), "target_os", Some(&["zkvm"])),
diff --git a/src/doc/rustc/src/SUMMARY.md b/src/doc/rustc/src/SUMMARY.md
index 990998ea704..1998b008dc8 100644
--- a/src/doc/rustc/src/SUMMARY.md
+++ b/src/doc/rustc/src/SUMMARY.md
@@ -59,7 +59,6 @@
     - [*-unknown-openbsd](platform-support/openbsd.md)
     - [\*-unknown-uefi](platform-support/unknown-uefi.md)
     - [wasm32-wasi-preview1-threads](platform-support/wasm32-wasi-preview1-threads.md)
-    - [wasm32-wasi-preview2](platform-support/wasm32-wasi-preview2.md)
     - [wasm64-unknown-unknown](platform-support/wasm64-unknown-unknown.md)
     - [\*-win7-windows-msvc](platform-support/win7-windows-msvc.md)
     - [x86_64-fortanix-unknown-sgx](platform-support/x86_64-fortanix-unknown-sgx.md)
diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md
index fb751b7229e..f648a60b6c4 100644
--- a/src/doc/rustc/src/platform-support.md
+++ b/src/doc/rustc/src/platform-support.md
@@ -360,7 +360,6 @@ target | std | host | notes
 `thumbv7a-pc-windows-msvc` | ? |  |
 `thumbv7a-uwp-windows-msvc` | ✓ |  |
 `thumbv7neon-unknown-linux-musleabihf` | ? |  | Thumb2-mode ARMv7-A Linux with NEON, MUSL
-[`wasm32-wasi-preview2`](platform-support/wasm32-wasi-preview2.md) | ✓ |  | WebAssembly
 [`wasm64-unknown-unknown`](platform-support/wasm64-unknown-unknown.md) | ? |  | WebAssembly
 `x86_64-apple-ios-macabi` | ✓ |  | Apple Catalyst on x86_64
 [`x86_64-apple-tvos`](platform-support/apple-tvos.md) | ? |  | x86 64-bit tvOS
diff --git a/src/doc/rustc/src/platform-support/wasm32-wasi-preview2.md b/src/doc/rustc/src/platform-support/wasm32-wasi-preview2.md
deleted file mode 100644
index 837efd13d41..00000000000
--- a/src/doc/rustc/src/platform-support/wasm32-wasi-preview2.md
+++ /dev/null
@@ -1,30 +0,0 @@
-# `wasm32-wasi-preview2`
-
-**Tier: 3**
-
-The `wasm32-wasi-preview2` target is a new and still (as of January 2024) an
-experimental target. This target is an extension to `wasm32-wasi-preview1` target,
-originally known as `wasm32-wasi`. It is the next evolution in the development of
-wasi (the [WebAssembly System Interface](https://wasi.dev)) that uses the WebAssembly
-[component model] to allow for a standardized set of syscalls that are intended to empower
-WebAssembly binaries with native host capabilities.
-
-[component model]: https://github.com/WebAssembly/component-model
-
-## Target maintainers
-
-- Alex Crichton, https://github.com/alexcrichton
-- Ryan Levick, https://github.com/rylev
-
-## Requirements
-
-This target is cross-compiled. The target supports `std` fully.
-
-## Platform requirements
-
-The WebAssembly runtime should support the wasi preview 2 API set.
-
-This target is not a stable target. This means that there are only a few engines
-which implement wasi preview 2, for example:
-
-* Wasmtime - `-W component-model`
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css
index 9c593aa85d9..c01a25534f9 100644
--- a/src/librustdoc/html/static/css/rustdoc.css
+++ b/src/librustdoc/html/static/css/rustdoc.css
@@ -638,7 +638,7 @@ ul.block, .block li {
 
 .sidebar-crate h2 a {
 	display: block;
-	margin: 0 calc(-24px + 0.25rem) 0 -0.5rem;
+	margin: 0 calc(-24px + 0.25rem) 0 -0.2rem;
 	/* Align the sidebar crate link with the search bar, which have different
 		font sizes.
 
@@ -653,7 +653,7 @@ ul.block, .block li {
 		x = ( 16px - 0.57rem ) / 2
 	*/
 	padding: calc( ( 16px - 0.57rem ) / 2 ) 0.25rem;
-	padding-left: 0.5rem;
+	padding-left: 0.2rem;
 }
 
 .sidebar-crate h2 .version {
@@ -661,8 +661,6 @@ ul.block, .block li {
 	font-weight: normal;
 	font-size: 1rem;
 	overflow-wrap: break-word;
-	/* opposite of the link padding, cut in half again */
-	margin-top: calc( ( -16px + 0.57rem ) / 2 );
 }
 
 .sidebar-crate + .version {
diff --git a/src/tools/clippy/clippy_lints/src/transmute/utils.rs b/src/tools/clippy/clippy_lints/src/transmute/utils.rs
index 1cf6cf8548a..7a7bb9f9c94 100644
--- a/src/tools/clippy/clippy_lints/src/transmute/utils.rs
+++ b/src/tools/clippy/clippy_lints/src/transmute/utils.rs
@@ -37,12 +37,6 @@ pub(super) fn check_cast<'tcx>(
     let inherited = Inherited::new(cx.tcx, local_def_id);
     let fn_ctxt = FnCtxt::new(&inherited, cx.param_env, local_def_id);
 
-    // If we already have errors, we can't be sure we can pointer cast.
-    assert!(
-        !fn_ctxt.errors_reported_since_creation(),
-        "Newly created FnCtxt contained errors"
-    );
-
     if let Ok(check) = cast::CastCheck::new(
         &fn_ctxt,
         e,
@@ -53,17 +47,7 @@ pub(super) fn check_cast<'tcx>(
         DUMMY_SP,
         hir::Constness::NotConst,
     ) {
-        let res = check.do_check(&fn_ctxt);
-
-        // do_check's documentation says that it might return Ok and create
-        // errors in the fcx instead of returning Err in some cases. Those cases
-        // should be filtered out before getting here.
-        assert!(
-            !fn_ctxt.errors_reported_since_creation(),
-            "`fn_ctxt` contained errors after cast check!"
-        );
-
-        res.ok()
+        check.do_check(&fn_ctxt).ok()
     } else {
         None
     }