mirror of
https://github.com/rust-lang/rust.git
synced 2026-01-24 23:17:31 +00:00
Auto merge of #148593 - pietroalbini:ea-1.91.1, r=BoxyUwU
[stable] Prepare Rust 1.91.1 This PR prepares the artifacts for Rust 1.91.1, targeting next Monday with the following backports: * https://github.com/rust-lang/rust/pull/148322 * https://github.com/rust-lang/rust/pull/148363 cc `@rust-lang/release`
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
Version 1.91.1 (2025-11-10)
|
||||
===========================
|
||||
|
||||
<a id="1.91.1"></a>
|
||||
|
||||
- [Enable file locking support in illumos](https://github.com/rust-lang/rust/pull/148322). This fixes Cargo not locking the build directory on illumos.
|
||||
- [Fix `wasm_import_module` attribute cross-crate](https://github.com/rust-lang/rust/pull/148363). This fixes linker errors on WASM targets.
|
||||
|
||||
Version 1.91.0 (2025-10-30)
|
||||
==========================
|
||||
|
||||
|
||||
@@ -228,7 +228,7 @@ fn compute_symbol_name<'tcx>(
|
||||
// However, we don't have the wasm import module map there yet.
|
||||
tcx.is_foreign_item(def_id)
|
||||
&& tcx.sess.target.is_like_wasm
|
||||
&& tcx.wasm_import_module_map(LOCAL_CRATE).contains_key(&def_id.into())
|
||||
&& tcx.wasm_import_module_map(def_id.krate).contains_key(&def_id.into())
|
||||
};
|
||||
|
||||
if !wasm_import_module_exception_force_mangling {
|
||||
|
||||
@@ -5,6 +5,7 @@ use rand::RngCore;
|
||||
target_os = "freebsd",
|
||||
target_os = "linux",
|
||||
target_os = "netbsd",
|
||||
target_os = "illumos",
|
||||
target_vendor = "apple",
|
||||
))]
|
||||
use crate::assert_matches::assert_matches;
|
||||
@@ -14,6 +15,7 @@ use crate::char::MAX_LEN_UTF8;
|
||||
target_os = "freebsd",
|
||||
target_os = "linux",
|
||||
target_os = "netbsd",
|
||||
target_os = "illumos",
|
||||
target_vendor = "apple",
|
||||
))]
|
||||
use crate::fs::TryLockError;
|
||||
@@ -227,6 +229,7 @@ fn file_test_io_seek_and_write() {
|
||||
target_os = "linux",
|
||||
target_os = "netbsd",
|
||||
target_os = "solaris",
|
||||
target_os = "illumos",
|
||||
target_vendor = "apple",
|
||||
))]
|
||||
fn file_lock_multiple_shared() {
|
||||
@@ -251,6 +254,7 @@ fn file_lock_multiple_shared() {
|
||||
target_os = "linux",
|
||||
target_os = "netbsd",
|
||||
target_os = "solaris",
|
||||
target_os = "illumos",
|
||||
target_vendor = "apple",
|
||||
))]
|
||||
fn file_lock_blocking() {
|
||||
@@ -276,6 +280,7 @@ fn file_lock_blocking() {
|
||||
target_os = "linux",
|
||||
target_os = "netbsd",
|
||||
target_os = "solaris",
|
||||
target_os = "illumos",
|
||||
target_vendor = "apple",
|
||||
))]
|
||||
fn file_lock_drop() {
|
||||
@@ -298,6 +303,7 @@ fn file_lock_drop() {
|
||||
target_os = "linux",
|
||||
target_os = "netbsd",
|
||||
target_os = "solaris",
|
||||
target_os = "illumos",
|
||||
target_vendor = "apple",
|
||||
))]
|
||||
fn file_lock_dup() {
|
||||
|
||||
@@ -1286,6 +1286,7 @@ impl File {
|
||||
target_os = "netbsd",
|
||||
target_os = "openbsd",
|
||||
target_os = "cygwin",
|
||||
target_os = "illumos",
|
||||
target_vendor = "apple",
|
||||
))]
|
||||
pub fn lock(&self) -> io::Result<()> {
|
||||
@@ -1310,6 +1311,7 @@ impl File {
|
||||
target_os = "openbsd",
|
||||
target_os = "cygwin",
|
||||
target_os = "solaris",
|
||||
target_os = "illumos",
|
||||
target_vendor = "apple",
|
||||
)))]
|
||||
pub fn lock(&self) -> io::Result<()> {
|
||||
@@ -1323,6 +1325,7 @@ impl File {
|
||||
target_os = "netbsd",
|
||||
target_os = "openbsd",
|
||||
target_os = "cygwin",
|
||||
target_os = "illumos",
|
||||
target_vendor = "apple",
|
||||
))]
|
||||
pub fn lock_shared(&self) -> io::Result<()> {
|
||||
@@ -1347,6 +1350,7 @@ impl File {
|
||||
target_os = "openbsd",
|
||||
target_os = "cygwin",
|
||||
target_os = "solaris",
|
||||
target_os = "illumos",
|
||||
target_vendor = "apple",
|
||||
)))]
|
||||
pub fn lock_shared(&self) -> io::Result<()> {
|
||||
@@ -1360,6 +1364,7 @@ impl File {
|
||||
target_os = "netbsd",
|
||||
target_os = "openbsd",
|
||||
target_os = "cygwin",
|
||||
target_os = "illumos",
|
||||
target_vendor = "apple",
|
||||
))]
|
||||
pub fn try_lock(&self) -> Result<(), TryLockError> {
|
||||
@@ -1400,6 +1405,7 @@ impl File {
|
||||
target_os = "openbsd",
|
||||
target_os = "cygwin",
|
||||
target_os = "solaris",
|
||||
target_os = "illumos",
|
||||
target_vendor = "apple",
|
||||
)))]
|
||||
pub fn try_lock(&self) -> Result<(), TryLockError> {
|
||||
@@ -1416,6 +1422,7 @@ impl File {
|
||||
target_os = "netbsd",
|
||||
target_os = "openbsd",
|
||||
target_os = "cygwin",
|
||||
target_os = "illumos",
|
||||
target_vendor = "apple",
|
||||
))]
|
||||
pub fn try_lock_shared(&self) -> Result<(), TryLockError> {
|
||||
@@ -1456,6 +1463,7 @@ impl File {
|
||||
target_os = "openbsd",
|
||||
target_os = "cygwin",
|
||||
target_os = "solaris",
|
||||
target_os = "illumos",
|
||||
target_vendor = "apple",
|
||||
)))]
|
||||
pub fn try_lock_shared(&self) -> Result<(), TryLockError> {
|
||||
@@ -1472,6 +1480,7 @@ impl File {
|
||||
target_os = "netbsd",
|
||||
target_os = "openbsd",
|
||||
target_os = "cygwin",
|
||||
target_os = "illumos",
|
||||
target_vendor = "apple",
|
||||
))]
|
||||
pub fn unlock(&self) -> io::Result<()> {
|
||||
@@ -1496,6 +1505,7 @@ impl File {
|
||||
target_os = "openbsd",
|
||||
target_os = "cygwin",
|
||||
target_os = "solaris",
|
||||
target_os = "illumos",
|
||||
target_vendor = "apple",
|
||||
)))]
|
||||
pub fn unlock(&self) -> io::Result<()> {
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.91.0
|
||||
1.91.1
|
||||
|
||||
7
tests/ui/wasm/auxiliary/link-name-in-foreign-crate.rs
Normal file
7
tests/ui/wasm/auxiliary/link-name-in-foreign-crate.rs
Normal file
@@ -0,0 +1,7 @@
|
||||
#![no_std]
|
||||
|
||||
#[link(wasm_import_module = "test")]
|
||||
unsafe extern "C" {
|
||||
#[link_name = "close"]
|
||||
pub fn close(x: u32) -> u32;
|
||||
}
|
||||
22
tests/ui/wasm/wasm-link-name-in-foreign-crate-respected.rs
Normal file
22
tests/ui/wasm/wasm-link-name-in-foreign-crate-respected.rs
Normal file
@@ -0,0 +1,22 @@
|
||||
//@ only-wasm32
|
||||
//@ aux-build:link-name-in-foreign-crate.rs
|
||||
//@ compile-flags: --crate-type cdylib
|
||||
//@ build-pass
|
||||
//@ no-prefer-dynamic
|
||||
|
||||
extern crate link_name_in_foreign_crate;
|
||||
|
||||
// This test that the definition of a function named `close`, which collides
|
||||
// with the `close` function in libc in theory, is handled correctly in
|
||||
// cross-crate situations. The `link_name_in_foreign_crate` dependency declares
|
||||
// `close` from a non-`env` wasm import module and then this crate attempts to
|
||||
// use the symbol. This should properly ensure that the wasm module name is
|
||||
// tagged as `test` and the `close` symbol, to LLD, is mangled, to avoid
|
||||
// colliding with the `close` symbol in libc itself.
|
||||
|
||||
#[unsafe(no_mangle)]
|
||||
pub extern "C" fn foo() {
|
||||
unsafe {
|
||||
link_name_in_foreign_crate::close(1);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user