Skip to content

Commit ee7cd30

Browse files
committed
Auto merge of rust-lang#138059 - jieyouxu:rollup-wxy3xpx, r=jieyouxu
Rollup of 23 pull requests Successful merges: - rust-lang#137303 (Remove `MaybeForgetReturn` suggestion) - rust-lang#137327 (Undeprecate env::home_dir) - rust-lang#137358 (Match Ergonomics 2024: add context and examples to the unstable book) - rust-lang#137534 ([rustdoc] hide item that is not marked as doc(inline) and whose src is doc(hidden)) - rust-lang#137565 (Try to point of macro expansion from resolver and method errors if it involves macro var) - rust-lang#137637 (Check dyn flavor before registering upcast goal on wide pointer cast in MIR typeck) - rust-lang#137643 (Add DWARF test case for non-C-like `repr128` enums) - rust-lang#137744 (Re-add `Clone`-derive on `Thir`) - rust-lang#137758 (fix usage of ty decl macro fragments in attributes) - rust-lang#137764 (Ensure that negative auto impls are always applicable) - rust-lang#137772 (Fix char count in `Display` for `ByteStr`) - rust-lang#137798 (ci: use ubuntu 24 on arm large runner) - rust-lang#137802 (miri native-call support: all previously exposed provenance is accessible to the callee) - rust-lang#137805 (adjust Layout debug printing to match the internal field name) - rust-lang#137808 (Do not require that unsafe fields lack drop glue) - rust-lang#137820 (Clarify why InhabitedPredicate::instantiate_opt exists) - rust-lang#137825 (Provide more context on resolve error caused from incorrect RTN) - rust-lang#137910 (Improve error message for `AsyncFn` trait failure for RPIT) - rust-lang#137920 (interpret/provenance_map: consistently use range_is_empty) - rust-lang#138038 (Update `compiler-builtins` to 0.1.151) - rust-lang#138041 (bootstrap and compiletest: Use `size_of_val` from the prelude instead of imported) - rust-lang#138046 (trim channel value in `get_closest_merge_commit`) - rust-lang#138053 (Increase the max. custom try jobs requested to `20`) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 07b5eee + e37d5bb commit ee7cd30

File tree

123 files changed

+1455
-745
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+1455
-745
lines changed

compiler/rustc_abi/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1812,7 +1812,7 @@ where
18121812
f.debug_struct("Layout")
18131813
.field("size", size)
18141814
.field("align", align)
1815-
.field("abi", backend_repr)
1815+
.field("backend_repr", backend_repr)
18161816
.field("fields", fields)
18171817
.field("largest_niche", largest_niche)
18181818
.field("uninhabited", uninhabited)

compiler/rustc_ast_lowering/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,6 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
926926
if let Some(first_char) = constraint.ident.as_str().chars().next()
927927
&& first_char.is_ascii_lowercase()
928928
{
929-
tracing::info!(?data, ?data.inputs);
930929
let err = match (&data.inputs[..], &data.output) {
931930
([_, ..], FnRetTy::Default(_)) => {
932931
errors::BadReturnTypeNotation::Inputs { span: data.inputs_span }

compiler/rustc_ast_lowering/src/path.rs

-1
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,6 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
268268
}
269269
GenericArgs::Parenthesized(data) => match generic_args_mode {
270270
GenericArgsMode::ReturnTypeNotation => {
271-
tracing::info!(?data, ?data.inputs);
272271
let err = match (&data.inputs[..], &data.output) {
273272
([_, ..], FnRetTy::Default(_)) => {
274273
BadReturnTypeNotation::Inputs { span: data.inputs_span }

compiler/rustc_attr_parsing/src/parser.rs

+9
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,15 @@ impl<'a> MetaItemListParserContext<'a> {
473473
{
474474
self.inside_delimiters.next();
475475
return Some(MetaItemOrLitParser::Lit(lit));
476+
} else if let Some(TokenTree::Delimited(.., Delimiter::Invisible(_), inner_tokens)) =
477+
self.inside_delimiters.peek()
478+
{
479+
self.inside_delimiters.next();
480+
return MetaItemListParserContext {
481+
inside_delimiters: inner_tokens.iter().peekable(),
482+
dcx: self.dcx,
483+
}
484+
.next();
476485
}
477486

478487
// or a path.

compiler/rustc_borrowck/src/type_check/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2120,8 +2120,8 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
21202120
//
21212121
// Note that other checks (such as denying `dyn Send` -> `dyn
21222122
// Debug`) are in `rustc_hir_typeck`.
2123-
if let ty::Dynamic(src_tty, _src_lt, _) = *src_tail.kind()
2124-
&& let ty::Dynamic(dst_tty, dst_lt, _) = *dst_tail.kind()
2123+
if let ty::Dynamic(src_tty, _src_lt, ty::Dyn) = *src_tail.kind()
2124+
&& let ty::Dynamic(dst_tty, dst_lt, ty::Dyn) = *dst_tail.kind()
21252125
&& src_tty.principal().is_some()
21262126
&& dst_tty.principal().is_some()
21272127
{

compiler/rustc_codegen_cranelift/patches/0029-stdlib-Disable-f16-and-f128-in-compiler-builtins.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ index 7165c3e48af..968552ad435 100644
1616

1717
[dependencies]
1818
core = { path = "../core", public = true }
19-
-compiler_builtins = { version = "=0.1.150", features = ['rustc-dep-of-std'] }
20-
+compiler_builtins = { version = "=0.1.150", features = ['rustc-dep-of-std', 'no-f16-f128'] }
19+
-compiler_builtins = { version = "=0.1.151", features = ['rustc-dep-of-std'] }
20+
+compiler_builtins = { version = "=0.1.151", features = ['rustc-dep-of-std', 'no-f16-f128'] }
2121

2222
[dev-dependencies]
2323
rand = { version = "0.8.5", default-features = false, features = ["alloc"] }

compiler/rustc_const_eval/src/interpret/memory.rs

+5-10
Original file line numberDiff line numberDiff line change
@@ -955,18 +955,13 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
955955

956956
/// Handle the effect an FFI call might have on the state of allocations.
957957
/// This overapproximates the modifications which external code might make to memory:
958-
/// We set all reachable allocations as initialized, mark all provenances as exposed
958+
/// We set all reachable allocations as initialized, mark all reachable provenances as exposed
959959
/// and overwrite them with `Provenance::WILDCARD`.
960-
pub fn prepare_for_native_call(
961-
&mut self,
962-
id: AllocId,
963-
initial_prov: M::Provenance,
964-
) -> InterpResult<'tcx> {
965-
// Expose provenance of the root allocation.
966-
M::expose_provenance(self, initial_prov)?;
967-
960+
///
961+
/// The allocations in `ids` are assumed to be already exposed.
962+
pub fn prepare_for_native_call(&mut self, ids: Vec<AllocId>) -> InterpResult<'tcx> {
968963
let mut done = FxHashSet::default();
969-
let mut todo = vec![id];
964+
let mut todo = ids;
970965
while let Some(id) = todo.pop() {
971966
if !done.insert(id) {
972967
// We already saw this allocation before, don't process it again.

compiler/rustc_data_structures/src/marker.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use std::alloc::Allocator;
2+
13
#[rustc_on_unimplemented(message = "`{Self}` doesn't implement `DynSend`. \
24
Add it to `rustc_data_structures::marker` or use `IntoDynSyncSend` if it's already `Send`")]
35
// This is an auto trait for types which can be sent across threads if `sync::is_dyn_thread_safe()`
@@ -28,8 +30,8 @@ impls_dyn_send_neg!(
2830
[*const T where T: ?Sized]
2931
[*mut T where T: ?Sized]
3032
[std::ptr::NonNull<T> where T: ?Sized]
31-
[std::rc::Rc<T> where T: ?Sized]
32-
[std::rc::Weak<T> where T: ?Sized]
33+
[std::rc::Rc<T, A> where T: ?Sized, A: Allocator]
34+
[std::rc::Weak<T, A> where T: ?Sized, A: Allocator]
3335
[std::sync::MutexGuard<'_, T> where T: ?Sized]
3436
[std::sync::RwLockReadGuard<'_, T> where T: ?Sized]
3537
[std::sync::RwLockWriteGuard<'_, T> where T: ?Sized]
@@ -96,8 +98,8 @@ impls_dyn_sync_neg!(
9698
[std::cell::RefCell<T> where T: ?Sized]
9799
[std::cell::UnsafeCell<T> where T: ?Sized]
98100
[std::ptr::NonNull<T> where T: ?Sized]
99-
[std::rc::Rc<T> where T: ?Sized]
100-
[std::rc::Weak<T> where T: ?Sized]
101+
[std::rc::Rc<T, A> where T: ?Sized, A: Allocator]
102+
[std::rc::Weak<T, A> where T: ?Sized, A: Allocator]
101103
[std::cell::OnceCell<T> where T]
102104
[std::sync::mpsc::Receiver<T> where T]
103105
[std::sync::mpsc::Sender<T> where T]

compiler/rustc_errors/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,6 @@ pub enum StashKey {
626626
MaybeFruTypo,
627627
CallAssocMethod,
628628
AssociatedTypeSuggestion,
629-
MaybeForgetReturn,
630629
/// Query cycle detected, stashing in favor of a better error.
631630
Cycle,
632631
UndeterminedMacroResolution,

compiler/rustc_hir_analysis/messages.ftl

+2-7
Original file line numberDiff line numberDiff line change
@@ -278,13 +278,6 @@ hir_analysis_invalid_union_field =
278278
hir_analysis_invalid_union_field_sugg =
279279
wrap the field type in `ManuallyDrop<...>`
280280
281-
hir_analysis_invalid_unsafe_field =
282-
field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be unsafe
283-
.note = unsafe fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
284-
285-
hir_analysis_invalid_unsafe_field_sugg =
286-
wrap the field type in `ManuallyDrop<...>`
287-
288281
hir_analysis_late_bound_const_in_apit = `impl Trait` can only mention const parameters from an fn or impl
289282
.label = const parameter declared here
290283
@@ -620,6 +613,8 @@ hir_analysis_variances_of = {$variances}
620613
hir_analysis_where_clause_on_main = `main` function is not allowed to have a `where` clause
621614
.label = `main` cannot have a `where` clause
622615
616+
hir_analysis_within_macro = due to this macro variable
617+
623618
hir_analysis_wrong_number_of_generic_arguments_to_intrinsic =
624619
intrinsic has wrong number of {$descr} parameters: found {$found}, expected {$expected}
625620
.label = expected {$expected} {$descr} {$expected ->

0 commit comments

Comments
 (0)