Skip to content

Commit b0170b6

Browse files
committed
Auto merge of #122365 - matthiaskrgr:rollup-4i350h6, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #115141 (Update Windows platform support) - #121865 (Add FileCheck annotations to MIR-opt unnamed-fields tests) - #122000 (Fix 32-bit overflows in LLVM composite constants) - #122194 (Enable creating backtraces via -Ztreat-err-as-bug when stashing errors) - #122319 (Don't ICE when non-self part of trait goal is constrained in new solver) - #122339 (Update books) - #122342 (Update /NODEFAUTLIB comment for msvc) - #122343 (Remove some unnecessary `allow(incomplete_features)` in the test suite) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 0fa7fea + 39e0076 commit b0170b6

File tree

94 files changed

+396
-381
lines changed

Some content is hidden

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

94 files changed

+396
-381
lines changed

compiler/rustc_codegen_llvm/src/common.rs

+9-8
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,13 @@ impl<'ll> BackendTypes for CodegenCx<'ll, '_> {
9595

9696
impl<'ll> CodegenCx<'ll, '_> {
9797
pub fn const_array(&self, ty: &'ll Type, elts: &[&'ll Value]) -> &'ll Value {
98-
unsafe { llvm::LLVMConstArray(ty, elts.as_ptr(), elts.len() as c_uint) }
98+
let len = u64::try_from(elts.len()).expect("LLVMConstArray2 elements len overflow");
99+
unsafe { llvm::LLVMConstArray2(ty, elts.as_ptr(), len) }
99100
}
100101

101102
pub fn const_vector(&self, elts: &[&'ll Value]) -> &'ll Value {
102-
unsafe { llvm::LLVMConstVector(elts.as_ptr(), elts.len() as c_uint) }
103+
let len = c_uint::try_from(elts.len()).expect("LLVMConstVector elements len overflow");
104+
unsafe { llvm::LLVMConstVector(elts.as_ptr(), len) }
103105
}
104106

105107
pub fn const_bytes(&self, bytes: &[u8]) -> &'ll Value {
@@ -108,8 +110,8 @@ impl<'ll> CodegenCx<'ll, '_> {
108110

109111
pub fn const_get_elt(&self, v: &'ll Value, idx: u64) -> &'ll Value {
110112
unsafe {
111-
assert_eq!(idx as c_uint as u64, idx);
112-
let r = llvm::LLVMGetAggregateElement(v, idx as c_uint).unwrap();
113+
let idx = c_uint::try_from(idx).expect("LLVMGetAggregateElement index overflow");
114+
let r = llvm::LLVMGetAggregateElement(v, idx).unwrap();
113115

114116
debug!("const_get_elt(v={:?}, idx={}, r={:?})", v, idx, r);
115117

@@ -329,7 +331,7 @@ pub fn val_ty(v: &Value) -> &Type {
329331
pub fn bytes_in_context<'ll>(llcx: &'ll llvm::Context, bytes: &[u8]) -> &'ll Value {
330332
unsafe {
331333
let ptr = bytes.as_ptr() as *const c_char;
332-
llvm::LLVMConstStringInContext(llcx, ptr, bytes.len() as c_uint, True)
334+
llvm::LLVMConstStringInContext2(llcx, ptr, bytes.len(), True)
333335
}
334336
}
335337

@@ -338,9 +340,8 @@ pub fn struct_in_context<'ll>(
338340
elts: &[&'ll Value],
339341
packed: bool,
340342
) -> &'ll Value {
341-
unsafe {
342-
llvm::LLVMConstStructInContext(llcx, elts.as_ptr(), elts.len() as c_uint, packed as Bool)
343-
}
343+
let len = c_uint::try_from(elts.len()).expect("LLVMConstStructInContext elements len overflow");
344+
unsafe { llvm::LLVMConstStructInContext(llcx, elts.as_ptr(), len, packed as Bool) }
344345
}
345346

346347
#[inline]

compiler/rustc_codegen_llvm/src/llvm/ffi.rs

+8-13
Original file line numberDiff line numberDiff line change
@@ -936,10 +936,16 @@ extern "C" {
936936
pub fn LLVMConstReal(RealTy: &Type, N: f64) -> &Value;
937937

938938
// Operations on composite constants
939-
pub fn LLVMConstStringInContext(
939+
pub fn LLVMConstArray2<'a>(
940+
ElementTy: &'a Type,
941+
ConstantVals: *const &'a Value,
942+
Length: u64,
943+
) -> &'a Value;
944+
pub fn LLVMArrayType2(ElementType: &Type, ElementCount: u64) -> &Type;
945+
pub fn LLVMConstStringInContext2(
940946
C: &Context,
941947
Str: *const c_char,
942-
Length: c_uint,
948+
Length: size_t,
943949
DontNullTerminate: Bool,
944950
) -> &Value;
945951
pub fn LLVMConstStructInContext<'a>(
@@ -948,14 +954,6 @@ extern "C" {
948954
Count: c_uint,
949955
Packed: Bool,
950956
) -> &'a Value;
951-
952-
// FIXME: replace with LLVMConstArray2 when bumped minimal version to llvm-17
953-
// https://github.com/llvm/llvm-project/commit/35276f16e5a2cae0dfb49c0fbf874d4d2f177acc
954-
pub fn LLVMConstArray<'a>(
955-
ElementTy: &'a Type,
956-
ConstantVals: *const &'a Value,
957-
Length: c_uint,
958-
) -> &'a Value;
959957
pub fn LLVMConstVector(ScalarConstantVals: *const &Value, Size: c_uint) -> &Value;
960958

961959
// Constant expressions
@@ -1530,9 +1528,6 @@ extern "C" {
15301528
/// See llvm::LLVMTypeKind::getTypeID.
15311529
pub fn LLVMRustGetTypeKind(Ty: &Type) -> TypeKind;
15321530

1533-
// Operations on array, pointer, and vector types (sequence types)
1534-
pub fn LLVMRustArrayType(ElementType: &Type, ElementCount: u64) -> &Type;
1535-
15361531
// Operations on all values
15371532
pub fn LLVMRustGlobalAddMetadata<'a>(Val: &'a Value, KindID: c_uint, Metadata: &'a Metadata);
15381533
pub fn LLVMRustIsNonGVFunctionPointerTy(Val: &Value) -> bool;

compiler/rustc_codegen_llvm/src/type_.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ impl<'ll, 'tcx> BaseTypeMethods<'tcx> for CodegenCx<'ll, 'tcx> {
233233
}
234234

235235
fn type_array(&self, ty: &'ll Type, len: u64) -> &'ll Type {
236-
unsafe { llvm::LLVMRustArrayType(ty, len) }
236+
unsafe { llvm::LLVMArrayType2(ty, len) }
237237
}
238238
}
239239

compiler/rustc_errors/src/lib.rs

+4-7
Original file line numberDiff line numberDiff line change
@@ -769,13 +769,10 @@ impl DiagCtxt {
769769
format!("invalid level in `stash_diagnostic`: {:?}", diag.level),
770770
);
771771
}
772-
Error => {
773-
// This `unchecked_error_guaranteed` is valid. It is where the
774-
// `ErrorGuaranteed` for stashed errors originates. See
775-
// `DiagCtxtInner::drop`.
776-
#[allow(deprecated)]
777-
Some(ErrorGuaranteed::unchecked_error_guaranteed())
778-
}
772+
// We delay a bug here so that `-Ztreat-err-as-bug -Zeagerly-emit-delayed-bugs`
773+
// can be used to create a backtrace at the stashing site insted of whenever the
774+
// diagnostic context is dropped and thus delayed bugs are emitted.
775+
Error => Some(self.span_delayed_bug(span, "stashing {key:?}")),
779776
DelayedBug => return self.inner.borrow_mut().emit_diagnostic(diag),
780777
ForceWarning(_) | Warning | Note | OnceNote | Help | OnceHelp | FailureNote | Allow
781778
| Expect(_) => None,

compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp

+34-8
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include "llvm/IR/IntrinsicsARM.h"
1111
#include "llvm/IR/LLVMRemarkStreamer.h"
1212
#include "llvm/IR/Mangler.h"
13+
#include "llvm/IR/Value.h"
1314
#include "llvm/Remarks/RemarkStreamer.h"
1415
#include "llvm/Remarks/RemarkSerializer.h"
1516
#include "llvm/Remarks/RemarkFormat.h"
@@ -1223,14 +1224,6 @@ extern "C" void LLVMRustWriteValueToString(LLVMValueRef V,
12231224
}
12241225
}
12251226

1226-
// LLVMArrayType function does not support 64-bit ElementCount
1227-
// FIXME: replace with LLVMArrayType2 when bumped minimal version to llvm-17
1228-
// https://github.com/llvm/llvm-project/commit/35276f16e5a2cae0dfb49c0fbf874d4d2f177acc
1229-
extern "C" LLVMTypeRef LLVMRustArrayType(LLVMTypeRef ElementTy,
1230-
uint64_t ElementCount) {
1231-
return wrap(ArrayType::get(unwrap(ElementTy), ElementCount));
1232-
}
1233-
12341227
DEFINE_SIMPLE_CONVERSION_FUNCTIONS(Twine, LLVMTwineRef)
12351228

12361229
extern "C" void LLVMRustWriteTwineToString(LLVMTwineRef T, RustStringRef Str) {
@@ -2114,3 +2107,36 @@ extern "C" bool LLVMRustLLVMHasZlibCompressionForDebugSymbols() {
21142107
extern "C" bool LLVMRustLLVMHasZstdCompressionForDebugSymbols() {
21152108
return llvm::compression::zstd::isAvailable();
21162109
}
2110+
2111+
// Operations on composite constants.
2112+
// These are clones of LLVM api functions that will become available in future releases.
2113+
// They can be removed once Rust's minimum supported LLVM version supports them.
2114+
// See https://github.com/rust-lang/rust/issues/121868
2115+
// See https://llvm.org/doxygen/group__LLVMCCoreValueConstantComposite.html
2116+
2117+
// FIXME: Remove when Rust's minimum supported LLVM version reaches 19.
2118+
// https://github.com/llvm/llvm-project/commit/e1405e4f71c899420ebf8262d5e9745598419df8
2119+
#if LLVM_VERSION_LT(19, 0)
2120+
extern "C" LLVMValueRef LLVMConstStringInContext2(LLVMContextRef C,
2121+
const char *Str,
2122+
size_t Length,
2123+
bool DontNullTerminate) {
2124+
return wrap(ConstantDataArray::getString(*unwrap(C), StringRef(Str, Length), !DontNullTerminate));
2125+
}
2126+
#endif
2127+
2128+
// FIXME: Remove when Rust's minimum supported LLVM version reaches 17.
2129+
// https://github.com/llvm/llvm-project/commit/35276f16e5a2cae0dfb49c0fbf874d4d2f177acc
2130+
#if LLVM_VERSION_LT(17, 0)
2131+
extern "C" LLVMValueRef LLVMConstArray2(LLVMTypeRef ElementTy,
2132+
LLVMValueRef *ConstantVals,
2133+
uint64_t Length) {
2134+
ArrayRef<Constant *> V(unwrap<Constant>(ConstantVals, Length), Length);
2135+
return wrap(ConstantArray::get(ArrayType::get(unwrap(ElementTy), Length), V));
2136+
}
2137+
2138+
extern "C" LLVMTypeRef LLVMArrayType2(LLVMTypeRef ElementTy,
2139+
uint64_t ElementCount) {
2140+
return wrap(ArrayType::get(unwrap(ElementTy), ElementCount));
2141+
}
2142+
#endif

compiler/rustc_target/src/spec/base/windows_msvc.rs

+12-8
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,19 @@ pub fn opts() -> TargetOptions {
1717
crt_static_allows_dylibs: true,
1818
crt_static_respected: true,
1919
requires_uwtable: true,
20-
// Currently we don't pass the /NODEFAULTLIB flag to the linker on MSVC
21-
// as there's been trouble in the past of linking the C++ standard
22-
// library required by LLVM. This likely needs to happen one day, but
23-
// in general Windows is also a more controlled environment than
24-
// Unix, so it's not necessarily as critical that this be implemented.
20+
// We don't pass the /NODEFAULTLIB flag to the linker on MSVC
21+
// as that prevents linker directives embedded in object files from
22+
// including other necessary libraries.
2523
//
26-
// Note that there are also some licensing worries about statically
27-
// linking some libraries which require a specific agreement, so it may
28-
// not ever be possible for us to pass this flag.
24+
// For example, msvcrt.lib embeds a linker directive like:
25+
// /DEFAULTLIB:vcruntime.lib /DEFAULTLIB:ucrt.lib
26+
// So that vcruntime.lib and ucrt.lib are included when the entry point
27+
// in msvcrt.lib is used. Using /NODEFAULTLIB would mean having to
28+
// manually add those two libraries and potentially further dependencies
29+
// they bring in.
30+
//
31+
// See also https://learn.microsoft.com/en-us/cpp/preprocessor/comment-c-cpp?view=msvc-170#lib
32+
// for documention on including library dependencies in C/C++ code.
2933
no_default_libraries: false,
3034
has_thread_local: true,
3135

compiler/rustc_target/src/spec/targets/i686_pc_windows_msvc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub fn target() -> Target {
2424
Target {
2525
llvm_target: "i686-pc-windows-msvc".into(),
2626
metadata: crate::spec::TargetMetadata {
27-
description: Some("32-bit MSVC (Windows 7+)".into()),
27+
description: Some("32-bit MSVC (Windows 10+)".into()),
2828
tier: Some(1),
2929
host_tools: Some(true),
3030
std: Some(true),

compiler/rustc_target/src/spec/targets/x86_64_pc_windows_msvc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub fn target() -> Target {
1111
Target {
1212
llvm_target: "x86_64-pc-windows-msvc".into(),
1313
metadata: crate::spec::TargetMetadata {
14-
description: Some("64-bit MSVC (Windows 7+)".into()),
14+
description: Some("64-bit MSVC (Windows 10+)".into()),
1515
tier: Some(1),
1616
host_tools: Some(true),
1717
std: Some(true),

compiler/rustc_trait_selection/src/solve/assembly/mod.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,9 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
274274

275275
let goal =
276276
goal.with(self.tcx(), goal.predicate.with_self_ty(self.tcx(), normalized_self_ty));
277-
debug_assert_eq!(goal, self.resolve_vars_if_possible(goal));
277+
// Vars that show up in the rest of the goal substs may have been constrained by
278+
// normalizing the self type as well, since type variables are not uniquified.
279+
let goal = self.resolve_vars_if_possible(goal);
278280

279281
let mut candidates = vec![];
280282

src/doc/rustc/src/platform-support.md

+4-6
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ All tier 1 targets with host tools support the full standard library.
3333
target | notes
3434
-------|-------
3535
`aarch64-unknown-linux-gnu` | ARM64 Linux (kernel 4.1, glibc 2.17+)
36-
`i686-pc-windows-gnu` | 32-bit MinGW (Windows 7+) [^windows-support] [^x86_32-floats-return-ABI]
37-
`i686-pc-windows-msvc` | 32-bit MSVC (Windows 7+) [^windows-support] [^x86_32-floats-return-ABI]
36+
`i686-pc-windows-gnu` | 32-bit MinGW (Windows 10+) [^windows-support] [^x86_32-floats-return-ABI]
37+
`i686-pc-windows-msvc` | 32-bit MSVC (Windows 10+) [^windows-support] [^x86_32-floats-return-ABI]
3838
`i686-unknown-linux-gnu` | 32-bit Linux (kernel 3.2+, glibc 2.17+) [^x86_32-floats-return-ABI]
3939
`x86_64-apple-darwin` | 64-bit macOS (10.12+, Sierra+)
40-
`x86_64-pc-windows-gnu` | 64-bit MinGW (Windows 7+) [^windows-support]
41-
`x86_64-pc-windows-msvc` | 64-bit MSVC (Windows 7+) [^windows-support]
40+
`x86_64-pc-windows-gnu` | 64-bit MinGW (Windows 10+) [^windows-support]
41+
`x86_64-pc-windows-msvc` | 64-bit MSVC (Windows 10+) [^windows-support]
4242
`x86_64-unknown-linux-gnu` | 64-bit Linux (kernel 3.2+, glibc 2.17+)
4343

4444
[^windows-support]: Only Windows 10 currently undergoes automated testing. Earlier versions of Windows rely on testing and support from the community.
@@ -292,7 +292,6 @@ target | std | host | notes
292292
[`i586-pc-nto-qnx700`](platform-support/nto-qnx.md) | * | | 32-bit x86 QNX Neutrino 7.0 RTOS [^x86_32-floats-return-ABI]
293293
[`i586-unknown-netbsd`](platform-support/netbsd.md) | ✓ | | 32-bit x86, restricted to Pentium
294294
`i686-apple-darwin` | ✓ | ✓ | 32-bit macOS (10.12+, Sierra+) [^x86_32-floats-return-ABI]
295-
`i686-pc-windows-msvc` | * | | 32-bit Windows XP support [^x86_32-floats-return-ABI]
296295
[`i686-pc-windows-gnullvm`](platform-support/pc-windows-gnullvm.md) | ✓ | ✓ | [^x86_32-floats-return-ABI]
297296
`i686-unknown-haiku` | ✓ | ✓ | 32-bit Haiku [^x86_32-floats-return-ABI]
298297
[`i686-unknown-hurd-gnu`](platform-support/hurd.md) | ✓ | ✓ | 32-bit GNU/Hurd [^x86_32-floats-return-ABI]
@@ -369,7 +368,6 @@ target | std | host | notes
369368
[`x86_64-apple-watchos-sim`](platform-support/apple-watchos.md) | ✓ | | x86 64-bit Apple WatchOS simulator
370369
[`x86_64-pc-nto-qnx710`](platform-support/nto-qnx.md) | ✓ | | x86 64-bit QNX Neutrino 7.1 RTOS |
371370
[`x86_64-pc-windows-gnullvm`](platform-support/pc-windows-gnullvm.md) | ✓ | ✓ |
372-
`x86_64-pc-windows-msvc` | * | | 64-bit Windows XP support
373371
[`x86_64-unikraft-linux-musl`](platform-support/unikraft-linux-musl.md) | ✓ | | 64-bit Unikraft with musl 1.2.3
374372
`x86_64-unknown-dragonfly` | ✓ | ✓ | 64-bit DragonFlyBSD
375373
`x86_64-unknown-haiku` | ✓ | ✓ | 64-bit Haiku

tests/mir-opt/unnamed-fields/field_access.rs

+20-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// skip-filecheck
1+
// Tests the correct handling of unnamed fields within structs and unions marked with #[repr(C)].
2+
23
// EMIT_MIR field_access.foo.SimplifyCfg-initial.after.mir
34
// EMIT_MIR field_access.bar.SimplifyCfg-initial.after.mir
45

@@ -36,18 +37,36 @@ union Bar {
3637

3738
fn access<T>(_: T) {}
3839

40+
// CHECK-LABEL: fn foo(
3941
fn foo(foo: Foo) {
42+
// CHECK [[a:_.*]] = (_1.0: u8);
43+
// CHECK _.* = access::<u8>(move [[a]]) -> [return: bb1, unwind: bb5];
4044
access(foo.a);
45+
// CHECK [[b:_.*]] = ((_1.1: Foo::{anon_adt#0}).0: i8);
46+
// CHECK _.* = access::<i8>(move [[b]]) -> [return: bb2, unwind: bb5];
4147
access(foo.b);
48+
// CHECK [[c:_.*]] = ((_1.1: Foo::{anon_adt#0}).1: bool);
49+
// CHECK _.* = access::<bool>(move [[c]]) -> [return: bb3, unwind: bb5];
4250
access(foo.c);
51+
// CHECK [[d:_.*]] = (((_1.2: Foo::{anon_adt#1}).0: Foo::{anon_adt#1}::{anon_adt#0}).0: [u8; 1]);
52+
// CHECK _.* = access::<[u8; 1]>(move [[d]]) -> [return: bb4, unwind: bb5];
4353
access(foo.d);
4454
}
4555

56+
// CHECK-LABEL: fn bar(
4657
fn bar(bar: Bar) {
4758
unsafe {
59+
// CHECK [[a:_.*]] = (_1.0: u8);
60+
// CHECK _.* = access::<u8>(move [[a]]) -> [return: bb1, unwind: bb5];
4861
access(bar.a);
62+
// CHECK [[b:_.*]] = ((_1.1: Bar::{anon_adt#0}).0: i8);
63+
// CHECK _.* = access::<i8>(move [[b]]) -> [return: bb2, unwind: bb5];
4964
access(bar.b);
65+
// CHECK [[c:_.*]] = ((_1.1: Bar::{anon_adt#0}).1: bool);
66+
// CHECK _.* = access::<bool>(move [[c]]) -> [return: bb3, unwind: bb5];
5067
access(bar.c);
68+
// CHECK [[d:_.*]] = (((_1.2: Bar::{anon_adt#1}).0: Bar::{anon_adt#1}::{anon_adt#0}).0: [u8; 1]);
69+
// CHECK _.* = access::<[u8; 1]>(move [[d]]) -> [return: bb4, unwind: bb5];
5170
access(bar.d);
5271
}
5372
}

tests/ui/async-await/in-trait/early-bound-2.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
//@ check-pass
22
//@ edition:2021
33

4-
#![allow(incomplete_features)]
5-
64
pub trait Foo {
75
#[allow(async_fn_in_trait)]
86
async fn foo(&mut self);

tests/ui/async-await/in-trait/fn-not-async-err.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
//@ edition: 2021
22

3-
#![allow(incomplete_features)]
4-
53
trait MyTrait {
64
async fn foo(&self) -> i32;
75
}

tests/ui/async-await/in-trait/fn-not-async-err.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: method should be `async` or return a future, but it is synchronous
2-
--> $DIR/fn-not-async-err.rs:10:5
2+
--> $DIR/fn-not-async-err.rs:8:5
33
|
44
LL | fn foo(&self) -> i32 {
55
| ^^^^^^^^^^^^^^^^^^^^
66
|
77
note: this method is `async` so it expects a future to be returned
8-
--> $DIR/fn-not-async-err.rs:6:5
8+
--> $DIR/fn-not-async-err.rs:4:5
99
|
1010
LL | async fn foo(&self) -> i32;
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/ui/async-await/in-trait/fn-not-async-err2.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
//@ edition: 2021
22
//@ check-pass
33

4-
#![allow(incomplete_features)]
5-
64
use std::future::Future;
75

86
trait MyTrait {

tests/ui/async-await/in-trait/generics-mismatch.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
//@ edition: 2021
22

3-
#![allow(incomplete_features)]
4-
53
trait Foo {
64
async fn foo<T>();
75
}

tests/ui/async-await/in-trait/generics-mismatch.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0053]: method `foo` has an incompatible generic parameter for trait `Foo`
2-
--> $DIR/generics-mismatch.rs:10:18
2+
--> $DIR/generics-mismatch.rs:8:18
33
|
44
LL | trait Foo {
55
| ---

tests/ui/async-await/in-trait/implied-bounds.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
//@ check-pass
22
//@ edition: 2021
33

4-
#![allow(incomplete_features)]
5-
64
trait TcpStack {
75
type Connection<'a>: Sized where Self: 'a;
86
fn connect<'a>(&'a self) -> Self::Connection<'a>;

tests/ui/async-await/in-trait/issue-102138.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
//@ check-pass
22
//@ edition:2021
33

4-
#![allow(incomplete_features)]
5-
64
use std::future::Future;
75

86
async fn yield_now() {}

0 commit comments

Comments
 (0)