Skip to content

Commit 19beef4

Browse files
committedJun 15, 2025
Merge from rustc
2 parents a576180 + 0cbc076 commit 19beef4

File tree

182 files changed

+2618
-2902
lines changed

Some content is hidden

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

182 files changed

+2618
-2902
lines changed
 

‎compiler/rustc_borrowck/src/type_check/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
373373
}
374374

375375
fn unsized_feature_enabled(&self) -> bool {
376-
let features = self.tcx().features();
377-
features.unsized_locals() || features.unsized_fn_params()
376+
self.tcx().features().unsized_fn_params()
378377
}
379378

380379
/// Equate the inferred type and the annotated type for user type annotations
@@ -957,7 +956,7 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {
957956
}
958957
}
959958

960-
// When `unsized_fn_params` or `unsized_locals` is enabled, only function calls
959+
// When `unsized_fn_params` is enabled, only function calls
961960
// and nullary ops are checked in `check_call_dest`.
962961
if !self.unsized_feature_enabled() {
963962
match self.body.local_kind(local) {
@@ -1941,7 +1940,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
19411940
);
19421941
}
19431942

1944-
// When `unsized_fn_params` and `unsized_locals` are both not enabled,
1943+
// When `unsized_fn_params` is not enabled,
19451944
// this check is done at `check_local`.
19461945
if self.unsized_feature_enabled() {
19471946
let span = term.source_info.span;

‎compiler/rustc_codegen_cranelift/example/arbitrary_self_types_pointers_and_wrappers.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ impl<T: CoerceUnsized<U>, U> CoerceUnsized<Wrapper<U>> for Wrapper<T> {}
3232
impl<T: DispatchFromDyn<U>, U> DispatchFromDyn<Wrapper<U>> for Wrapper<T> {}
3333

3434
trait Trait {
35-
// This method isn't object-safe yet. Unsized by-value `self` is object-safe (but not callable
36-
// without unsized_locals), but wrappers around `Self` currently are not.
37-
// FIXME (mikeyhew) uncomment this when unsized rvalues object-safety is implemented
38-
// fn wrapper(self: Wrapper<Self>) -> i32;
3935
fn ptr_wrapper(self: Ptr<Wrapper<Self>>) -> i32;
4036
fn wrapper_ptr(self: Wrapper<Ptr<Self>>) -> i32;
4137
fn wrapper_ptr_wrapper(self: Wrapper<Ptr<Wrapper<Self>>>) -> i32;

0 commit comments

Comments
 (0)
Please sign in to comment.