Skip to content
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

Rollup of 11 pull requests #129391

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
07481b9
use old ctx if has same expand environment during decode span
bvanjoi Jul 4, 2024
0b87af9
Add `-Z embed-source=yes` to embed source code in DWARF debug info
Mrmaxmeier Apr 27, 2024
608901b
Add run-make test for -Zembed-source=yes
Mrmaxmeier Jul 16, 2024
e518451
Enable `f16` on x86 and x86-64
tgross35 Jul 29, 2024
0a5d5ff
Change `f16` doctests in core to run on x86-64
tgross35 Jul 29, 2024
8a61674
WASI fixing unsafe_op_in_unsafe_fn for std::{os, sys}
g0djan Aug 5, 2024
6899f5a
-Zembed-source: Don't try to warn about incompatible codegen backends
Mrmaxmeier Aug 6, 2024
10ef666
Add more test cases for untranslatable_diagnostic lint
GrigorenkoPV Aug 10, 2024
3cc2a6f
`untranslatable_diagnostic` lint: point at the untranslated thing
GrigorenkoPV Aug 10, 2024
e94a4ee
Refactor: `diagnostic_outside_of_impl`, `untranslatable_diagnostic`
GrigorenkoPV Aug 10, 2024
76fbf0a
Test wholearchive on rust staticlib
ChrisDenton Aug 18, 2024
9d7574f
rustdoc: animate the `:target` highlight
notriddle Aug 19, 2024
40af214
Make import libraries compatible with wholearchive
ChrisDenton Aug 19, 2024
c836739
Change `assert_unsafe_precondition` docs to refer to `check_language_ub`
ChaiTRex Aug 21, 2024
81c00dd
Add `const_cell_into_inner` to `OnceCell`
tgross35 Aug 21, 2024
7232a07
Explain the `run-make/debugger-visualizer-dep-info` Python script
Zalathar Aug 22, 2024
5fc562c
Rename `foo.py` to `my_gdb_script.py`
Zalathar Aug 22, 2024
34cdfc9
Advise against removing `run-make/libtest-junit/validate_junit.py`
Zalathar Aug 22, 2024
ca7c55f
Do not rely on names to find lifetimes.
cjgillot Aug 22, 2024
0dbfe1b
Rollup merge of #126985 - Mrmaxmeier:dwarf-embed-source, r=davidtwco
jieyouxu Aug 22, 2024
35d6344
Rollup merge of #127279 - bvanjoi:fix-112680, r=petrochenkov
jieyouxu Aug 22, 2024
c7afff3
Rollup merge of #128349 - tgross35:x86-f16, r=Noratrieb
jieyouxu Aug 22, 2024
765a045
Rollup merge of #128432 - g0djan:godjan/wasi_prohibit_implicit_unsafe…
jieyouxu Aug 22, 2024
126a5c2
Rollup merge of #128941 - GrigorenkoPV:internal-diagnostic-lints, r=d…
jieyouxu Aug 22, 2024
f24be46
Rollup merge of #129257 - ChrisDenton:rename-null-descriptor, r=jieyouxu
jieyouxu Aug 22, 2024
ccdaea7
Rollup merge of #129284 - notriddle:notriddle/animate-target=light, r…
jieyouxu Aug 22, 2024
738014a
Rollup merge of #129376 - ChaiTRex:assert_unsafe_precondition_check_l…
jieyouxu Aug 22, 2024
18d4e5b
Rollup merge of #129382 - tgross35:once-cell-const-into-inner, r=Nora…
jieyouxu Aug 22, 2024
a75f9b9
Rollup merge of #129387 - Zalathar:python-apologia, r=jieyouxu
jieyouxu Aug 22, 2024
24e7d69
Rollup merge of #129388 - cjgillot:region-def-id, r=compiler-errors
jieyouxu Aug 22, 2024
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
1 change: 0 additions & 1 deletion library/std/src/os/wasi/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
//!
//! [`std::fs`]: crate::fs

#![deny(unsafe_op_in_unsafe_fn)]
#![unstable(feature = "wasi_ext", issue = "71213")]

// Used for `File::read` on intra-doc links
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/os/wasi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

#![cfg_attr(not(target_env = "p2"), stable(feature = "rust1", since = "1.0.0"))]
#![cfg_attr(target_env = "p2", unstable(feature = "wasip2", issue = "none"))]
#![deny(unsafe_op_in_unsafe_fn)]
#![forbid(unsafe_op_in_unsafe_fn)]
#![doc(cfg(target_os = "wasi"))]

pub mod ffi;
Expand Down
1 change: 1 addition & 0 deletions library/std/src/os/wasip2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
//!
//! This module is currently empty, but will be filled over time as wasi-libc support for WASI Preview 2 is stabilized.

#![forbid(unsafe_op_in_unsafe_fn)]
#![stable(feature = "raw_ext", since = "1.1.0")]
2 changes: 1 addition & 1 deletion library/std/src/sys/pal/wasi/args.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![deny(unsafe_op_in_unsafe_fn)]
#![forbid(unsafe_op_in_unsafe_fn)]

use crate::ffi::{CStr, OsStr, OsString};
use crate::os::wasi::ffi::OsStrExt;
Expand Down
2 changes: 2 additions & 0 deletions library/std/src/sys/pal/wasi/env.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![forbid(unsafe_op_in_unsafe_fn)]

pub mod os {
pub const FAMILY: &str = "";
pub const OS: &str = "";
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/sys/pal/wasi/fd.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![deny(unsafe_op_in_unsafe_fn)]
#![forbid(unsafe_op_in_unsafe_fn)]
#![allow(dead_code)]

use super::err2io;
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/sys/pal/wasi/fs.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![deny(unsafe_op_in_unsafe_fn)]
#![forbid(unsafe_op_in_unsafe_fn)]

use super::fd::WasiFd;
use crate::ffi::{CStr, OsStr, OsString};
Expand Down
2 changes: 2 additions & 0 deletions library/std/src/sys/pal/wasi/helpers.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![forbid(unsafe_op_in_unsafe_fn)]

use crate::{io as std_io, mem};

#[inline]
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/sys/pal/wasi/io.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![deny(unsafe_op_in_unsafe_fn)]
#![forbid(unsafe_op_in_unsafe_fn)]

use crate::marker::PhantomData;
use crate::os::fd::{AsFd, AsRawFd};
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/sys/pal/wasi/net.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![deny(unsafe_op_in_unsafe_fn)]
#![forbid(unsafe_op_in_unsafe_fn)]

use super::err2io;
use super::fd::WasiFd;
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/sys/pal/wasi/os.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![deny(unsafe_op_in_unsafe_fn)]
#![forbid(unsafe_op_in_unsafe_fn)]

use core::slice::memchr;

Expand Down
2 changes: 1 addition & 1 deletion library/std/src/sys/pal/wasi/stdio.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![deny(unsafe_op_in_unsafe_fn)]
#![forbid(unsafe_op_in_unsafe_fn)]

use super::fd::WasiFd;
use crate::io::{self, IoSlice, IoSliceMut};
Expand Down
18 changes: 10 additions & 8 deletions library/std/src/sys/pal/wasi/thread.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![forbid(unsafe_op_in_unsafe_fn)]

use crate::ffi::CStr;
use crate::num::NonZero;
use crate::sys::unsupported;
Expand Down Expand Up @@ -73,13 +75,13 @@ impl Thread {
if #[cfg(target_feature = "atomics")] {
pub unsafe fn new(stack: usize, p: Box<dyn FnOnce()>) -> io::Result<Thread> {
let p = Box::into_raw(Box::new(p));
let mut native: libc::pthread_t = mem::zeroed();
let mut attr: libc::pthread_attr_t = mem::zeroed();
assert_eq!(libc::pthread_attr_init(&mut attr), 0);
let mut native: libc::pthread_t = unsafe { mem::zeroed() };
let mut attr: libc::pthread_attr_t = unsafe { mem::zeroed() };
assert_eq!(unsafe { libc::pthread_attr_init(&mut attr) }, 0);

let stack_size = cmp::max(stack, DEFAULT_MIN_STACK_SIZE);

match libc::pthread_attr_setstacksize(&mut attr, stack_size) {
match unsafe { libc::pthread_attr_setstacksize(&mut attr, stack_size) } {
0 => {}
n => {
assert_eq!(n, libc::EINVAL);
Expand All @@ -90,20 +92,20 @@ impl Thread {
let page_size = os::page_size();
let stack_size =
(stack_size + page_size - 1) & (-(page_size as isize - 1) as usize - 1);
assert_eq!(libc::pthread_attr_setstacksize(&mut attr, stack_size), 0);
assert_eq!(unsafe { libc::pthread_attr_setstacksize(&mut attr, stack_size) }, 0);
}
};

let ret = libc::pthread_create(&mut native, &attr, thread_start, p as *mut _);
let ret = unsafe { libc::pthread_create(&mut native, &attr, thread_start, p as *mut _) };
// Note: if the thread creation fails and this assert fails, then p will
// be leaked. However, an alternative design could cause double-free
// which is clearly worse.
assert_eq!(libc::pthread_attr_destroy(&mut attr), 0);
assert_eq!(unsafe {libc::pthread_attr_destroy(&mut attr) }, 0);

return if ret != 0 {
// The thread failed to start and as a result p was not consumed. Therefore, it is
// safe to reconstruct the box so that it gets deallocated.
drop(Box::from_raw(p));
unsafe { drop(Box::from_raw(p)); }
Err(io::Error::from_raw_os_error(ret))
} else {
Ok(Thread { id: native })
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/sys/pal/wasi/time.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![deny(unsafe_op_in_unsafe_fn)]
#![forbid(unsafe_op_in_unsafe_fn)]

use crate::time::Duration;

Expand Down