Skip to content

Commit 2f14e10

Browse files
committed
Auto merge of #3223 - rust-lang:rustup-2023-12-12, r=RalfJung
Automatic Rustup
2 parents fdde088 + 42b590b commit 2f14e10

File tree

18 files changed

+13
-24
lines changed

18 files changed

+13
-24
lines changed

rust-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
61afc9c92896a43fce92bd5e3bba6274c5e3e960
1+
e2a3c9b3f0895c866c104bd2fff2a8bf16eaf964

src/borrow_tracker/stacked_borrows/diagnostics.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,10 @@ use smallvec::SmallVec;
22
use std::fmt;
33

44
use rustc_data_structures::fx::FxHashSet;
5-
use rustc_middle::mir::interpret::{alloc_range, AllocId, AllocRange, InterpError};
65
use rustc_span::{Span, SpanData};
76
use rustc_target::abi::Size;
87

9-
use crate::borrow_tracker::{
10-
stacked_borrows::Permission, AccessKind, GlobalStateInner, ProtectorKind,
11-
};
8+
use crate::borrow_tracker::{AccessKind, GlobalStateInner, ProtectorKind};
129
use crate::*;
1310

1411
/// Error reporting

src/borrow_tracker/stacked_borrows/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use rustc_target::abi::{Abi, Size};
1818

1919
use crate::borrow_tracker::{
2020
stacked_borrows::diagnostics::{AllocHistory, DiagnosticCx, DiagnosticCxBuilder},
21-
AccessKind, GlobalStateInner, ProtectorKind, RetagFields,
21+
AccessKind, GlobalStateInner, ProtectorKind,
2222
};
2323
use crate::*;
2424

src/borrow_tracker/tree_borrows/mod.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ use log::trace;
22

33
use rustc_target::abi::{Abi, Size};
44

5-
use crate::borrow_tracker::{
6-
AccessKind, GlobalState, GlobalStateInner, ProtectorKind, RetagFields,
7-
};
5+
use crate::borrow_tracker::{AccessKind, GlobalState, GlobalStateInner, ProtectorKind};
86
use rustc_middle::{
97
mir::{Mutability, RetagKind},
108
ty::{

src/borrow_tracker/tree_borrows/tree.rs

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ use std::fmt;
1414

1515
use smallvec::SmallVec;
1616

17-
use rustc_const_eval::interpret::InterpResult;
1817
use rustc_data_structures::fx::FxHashSet;
1918
use rustc_span::Span;
2019
use rustc_target::abi::Size;

src/concurrency/weak_memory.rs

-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ use std::{
8282
collections::VecDeque,
8383
};
8484

85-
use rustc_const_eval::interpret::{alloc_range, AllocRange, InterpResult, MPlaceTy, Scalar};
8685
use rustc_data_structures::fx::FxHashMap;
8786

8887
use crate::*;

src/eval.rs

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ use std::thread;
1010
use log::info;
1111
use rustc_middle::ty::Ty;
1212

13-
use crate::borrow_tracker::RetagFields;
1413
use crate::concurrency::thread::TlsAllocAction;
1514
use crate::diagnostics::report_leaks;
1615
use rustc_data_structures::fx::FxHashSet;

src/shims/env.rs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use std::ffi::{OsStr, OsString};
33
use std::io::ErrorKind;
44
use std::mem;
55

6-
use rustc_const_eval::interpret::Pointer;
76
use rustc_data_structures::fx::FxHashMap;
87
use rustc_middle::ty::layout::LayoutOf;
98
use rustc_middle::ty::Ty;

src/shims/unix/fs.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use std::any::Any;
22
use std::borrow::Cow;
33
use std::collections::BTreeMap;
4-
use std::convert::TryInto;
54
use std::fs::{
65
read_dir, remove_dir, remove_file, rename, DirBuilder, File, FileType, OpenOptions, ReadDir,
76
};

src/shims/unix/linux/sync.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::time::SystemTime;
22

3-
use crate::concurrency::thread::{MachineCallback, Time};
3+
use crate::concurrency::thread::MachineCallback;
44
use crate::*;
55

66
/// Implementation of the SYS_futex syscall.

src/shims/unix/sync.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::time::SystemTime;
22

33
use crate::concurrency::sync::CondvarLock;
4-
use crate::concurrency::thread::{MachineCallback, Time};
4+
use crate::concurrency::thread::MachineCallback;
55
use crate::*;
66

77
// pthread_mutexattr_t is either 4 or 8 bytes, depending on the platform.

tests/pass-dep/shims/libc-fs.rs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#![feature(io_error_more)]
55
#![feature(io_error_uncategorized)]
66

7-
use std::convert::TryInto;
87
use std::ffi::CString;
98
use std::fs::{canonicalize, remove_dir_all, remove_file, File};
109
use std::io::{Error, ErrorKind, Write};

tests/pass/arrays.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
use std::convert::TryFrom;
2-
31
fn empty_array() -> [u16; 0] {
42
[]
53
}

tests/pass/binary-heap.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use std::collections::BinaryHeap;
2-
use std::iter::Iterator;
32

43
fn zero_sized_push() {
54
const N: usize = 8;

tests/pass/enum-nullable-const-null-with-fields.rs

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
use std::result::Result;
2-
use std::result::Result::Ok;
3-
41
static C: Result<(), Box<isize>> = Ok(());
52

63
// This is because of yet another bad assertion (ICE) about the null side of a nullable enum.

tests/pass/function_calls/abi_compat.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ fn main() {
7171
test_abi_compat(0isize, 0i64);
7272
}
7373
test_abi_compat(42u32, num::NonZeroU32::new(1).unwrap());
74+
// - `char` and `u32`.
75+
test_abi_compat(42u32, 'x');
7476
// - Reference/pointer types with the same pointee.
7577
test_abi_compat(&0u32, &0u32 as *const u32);
7678
test_abi_compat(&mut 0u32 as *mut u32, Box::new(0u32));
@@ -81,7 +83,7 @@ fn main() {
8183
test_abi_compat(main as fn(), id::<i32> as fn(i32) -> i32);
8284
// - 1-ZST
8385
test_abi_compat((), [0u8; 0]);
84-
// - Guaranteed null-pointer-optimizations.
86+
// - Guaranteed null-pointer-optimizations (RFC 3391).
8587
test_abi_compat(&0u32 as *const u32, Some(&0u32));
8688
test_abi_compat(main as fn(), Some(main as fn()));
8789
test_abi_compat(0u32, Some(num::NonZeroU32::new(1).unwrap()));
@@ -103,6 +105,8 @@ fn main() {
103105
test_abi_newtype::<Option<num::NonZeroU32>>();
104106

105107
// Extra test for assumptions made by arbitrary-self-dyn-receivers.
108+
// This is interesting since these types are not `repr(transparent)`. So this is not part of our
109+
// public ABI guarantees, but is relied on by the compiler.
106110
let rc = Rc::new(0);
107111
let rc_ptr: *mut i32 = unsafe { mem::transmute_copy(&rc) };
108112
test_abi_compat(rc, rc_ptr);

tests/pass/pointers.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
//@[tree]compile-flags: -Zmiri-tree-borrows
33
//@compile-flags: -Zmiri-permissive-provenance
44
#![feature(ptr_metadata, const_raw_ptr_comparison)]
5+
#![allow(ambiguous_wide_pointer_comparisons)]
56

67
use std::mem::{self, transmute};
78
use std::ptr;

tests/pass/rc.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
//@compile-flags: -Zmiri-strict-provenance
44
#![feature(new_uninit)]
55
#![feature(get_mut_unchecked)]
6+
#![allow(ambiguous_wide_pointer_comparisons)]
67

78
use std::cell::{Cell, RefCell};
89
use std::fmt::Debug;

0 commit comments

Comments
 (0)