Skip to content

Rollup of 8 pull requests #122365

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

Merged
merged 19 commits into from
Mar 12, 2024
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
3ab6936
mir-opt unnamed-fields filecheck annotations
Kirandevraj Mar 1, 2024
6f1156a
fixing mir pass name to text comment
Kirandevraj Mar 9, 2024
3af28f0
Fix 32-bit overflows in LLVM composite constants
erer1243 Mar 4, 2024
cfbc1b9
Enable creating backtraces via -Ztreat-err-as-bug when stashing errors
oli-obk Mar 8, 2024
b66d7f5
Update books
rustbot Mar 11, 2024
779ac69
Update Windows platform support
ChrisDenton Mar 10, 2024
aeec0d1
Update /NODEFAUTLIB comment for msvc
ChrisDenton Mar 11, 2024
2a1d4dd
Don't ICE when non-self part of trait goal is constrained in new solver
compiler-errors Mar 11, 2024
0b6b330
Move project -> normalize, move normalize tests
compiler-errors Mar 11, 2024
f614eae
Remove some unnecessary allow(incomplete_features)
compiler-errors Mar 11, 2024
ba70528
updating variable names in CHECK
Kirandevraj Mar 11, 2024
60ab300
Rollup merge of #115141 - ChrisDenton:windows-support, r=wesleywiser
matthiaskrgr Mar 12, 2024
b4cbc88
Rollup merge of #121865 - Kirandevraj:unnamed-fields-filecheck, r=oli…
matthiaskrgr Mar 12, 2024
60f4b7a
Rollup merge of #122000 - erer1243:issue-121868, r=nikic
matthiaskrgr Mar 12, 2024
0b127d8
Rollup merge of #122194 - oli-obk:stash_delay_bug, r=nnethercote
matthiaskrgr Mar 12, 2024
cd2efff
Rollup merge of #122319 - compiler-errors:next-solver-normalizing-sel…
matthiaskrgr Mar 12, 2024
3d5d839
Rollup merge of #122339 - rustbot:docs-update, r=ehuss
matthiaskrgr Mar 12, 2024
7b29381
Rollup merge of #122342 - ChrisDenton:defautlib, r=petrochenkov
matthiaskrgr Mar 12, 2024
39e0076
Rollup merge of #122343 - compiler-errors:rando, r=fmease
matthiaskrgr Mar 12, 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
17 changes: 9 additions & 8 deletions compiler/rustc_codegen_llvm/src/common.rs
Original file line number Diff line number Diff line change
@@ -95,11 +95,13 @@ impl<'ll> BackendTypes for CodegenCx<'ll, '_> {

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

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

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

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

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

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

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

#[inline]
21 changes: 8 additions & 13 deletions compiler/rustc_codegen_llvm/src/llvm/ffi.rs
Original file line number Diff line number Diff line change
@@ -936,10 +936,16 @@ extern "C" {
pub fn LLVMConstReal(RealTy: &Type, N: f64) -> &Value;

// Operations on composite constants
pub fn LLVMConstStringInContext(
pub fn LLVMConstArray2<'a>(
ElementTy: &'a Type,
ConstantVals: *const &'a Value,
Length: u64,
) -> &'a Value;
pub fn LLVMArrayType2(ElementType: &Type, ElementCount: u64) -> &Type;
pub fn LLVMConstStringInContext2(
C: &Context,
Str: *const c_char,
Length: c_uint,
Length: size_t,
DontNullTerminate: Bool,
) -> &Value;
pub fn LLVMConstStructInContext<'a>(
@@ -948,14 +954,6 @@ extern "C" {
Count: c_uint,
Packed: Bool,
) -> &'a Value;

// FIXME: replace with LLVMConstArray2 when bumped minimal version to llvm-17
// https://github.com/llvm/llvm-project/commit/35276f16e5a2cae0dfb49c0fbf874d4d2f177acc
pub fn LLVMConstArray<'a>(
ElementTy: &'a Type,
ConstantVals: *const &'a Value,
Length: c_uint,
) -> &'a Value;
pub fn LLVMConstVector(ScalarConstantVals: *const &Value, Size: c_uint) -> &Value;

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

// Operations on array, pointer, and vector types (sequence types)
pub fn LLVMRustArrayType(ElementType: &Type, ElementCount: u64) -> &Type;

// Operations on all values
pub fn LLVMRustGlobalAddMetadata<'a>(Val: &'a Value, KindID: c_uint, Metadata: &'a Metadata);
pub fn LLVMRustIsNonGVFunctionPointerTy(Val: &Value) -> bool;
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_llvm/src/type_.rs
Original file line number Diff line number Diff line change
@@ -233,7 +233,7 @@ impl<'ll, 'tcx> BaseTypeMethods<'tcx> for CodegenCx<'ll, 'tcx> {
}

fn type_array(&self, ty: &'ll Type, len: u64) -> &'ll Type {
unsafe { llvm::LLVMRustArrayType(ty, len) }
unsafe { llvm::LLVMArrayType2(ty, len) }
}
}

11 changes: 4 additions & 7 deletions compiler/rustc_errors/src/lib.rs
Original file line number Diff line number Diff line change
@@ -769,13 +769,10 @@ impl DiagCtxt {
format!("invalid level in `stash_diagnostic`: {:?}", diag.level),
);
}
Error => {
// This `unchecked_error_guaranteed` is valid. It is where the
// `ErrorGuaranteed` for stashed errors originates. See
// `DiagCtxtInner::drop`.
#[allow(deprecated)]
Some(ErrorGuaranteed::unchecked_error_guaranteed())
}
// We delay a bug here so that `-Ztreat-err-as-bug -Zeagerly-emit-delayed-bugs`
// can be used to create a backtrace at the stashing site insted of whenever the
// diagnostic context is dropped and thus delayed bugs are emitted.
Error => Some(self.span_delayed_bug(span, "stashing {key:?}")),
DelayedBug => return self.inner.borrow_mut().emit_diagnostic(diag),
ForceWarning(_) | Warning | Note | OnceNote | Help | OnceHelp | FailureNote | Allow
| Expect(_) => None,
42 changes: 34 additions & 8 deletions compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@
#include "llvm/IR/IntrinsicsARM.h"
#include "llvm/IR/LLVMRemarkStreamer.h"
#include "llvm/IR/Mangler.h"
#include "llvm/IR/Value.h"
#include "llvm/Remarks/RemarkStreamer.h"
#include "llvm/Remarks/RemarkSerializer.h"
#include "llvm/Remarks/RemarkFormat.h"
@@ -1223,14 +1224,6 @@ extern "C" void LLVMRustWriteValueToString(LLVMValueRef V,
}
}

// LLVMArrayType function does not support 64-bit ElementCount
// FIXME: replace with LLVMArrayType2 when bumped minimal version to llvm-17
// https://github.com/llvm/llvm-project/commit/35276f16e5a2cae0dfb49c0fbf874d4d2f177acc
extern "C" LLVMTypeRef LLVMRustArrayType(LLVMTypeRef ElementTy,
uint64_t ElementCount) {
return wrap(ArrayType::get(unwrap(ElementTy), ElementCount));
}

DEFINE_SIMPLE_CONVERSION_FUNCTIONS(Twine, LLVMTwineRef)

extern "C" void LLVMRustWriteTwineToString(LLVMTwineRef T, RustStringRef Str) {
@@ -2114,3 +2107,36 @@ extern "C" bool LLVMRustLLVMHasZlibCompressionForDebugSymbols() {
extern "C" bool LLVMRustLLVMHasZstdCompressionForDebugSymbols() {
return llvm::compression::zstd::isAvailable();
}

// Operations on composite constants.
// These are clones of LLVM api functions that will become available in future releases.
// They can be removed once Rust's minimum supported LLVM version supports them.
// See https://github.com/rust-lang/rust/issues/121868
// See https://llvm.org/doxygen/group__LLVMCCoreValueConstantComposite.html

// FIXME: Remove when Rust's minimum supported LLVM version reaches 19.
// https://github.com/llvm/llvm-project/commit/e1405e4f71c899420ebf8262d5e9745598419df8
#if LLVM_VERSION_LT(19, 0)
extern "C" LLVMValueRef LLVMConstStringInContext2(LLVMContextRef C,
const char *Str,
size_t Length,
bool DontNullTerminate) {
return wrap(ConstantDataArray::getString(*unwrap(C), StringRef(Str, Length), !DontNullTerminate));
}
#endif

// FIXME: Remove when Rust's minimum supported LLVM version reaches 17.
// https://github.com/llvm/llvm-project/commit/35276f16e5a2cae0dfb49c0fbf874d4d2f177acc
#if LLVM_VERSION_LT(17, 0)
extern "C" LLVMValueRef LLVMConstArray2(LLVMTypeRef ElementTy,
LLVMValueRef *ConstantVals,
uint64_t Length) {
ArrayRef<Constant *> V(unwrap<Constant>(ConstantVals, Length), Length);
return wrap(ConstantArray::get(ArrayType::get(unwrap(ElementTy), Length), V));
}

extern "C" LLVMTypeRef LLVMArrayType2(LLVMTypeRef ElementTy,
uint64_t ElementCount) {
return wrap(ArrayType::get(unwrap(ElementTy), ElementCount));
}
#endif
20 changes: 12 additions & 8 deletions compiler/rustc_target/src/spec/base/windows_msvc.rs
Original file line number Diff line number Diff line change
@@ -17,15 +17,19 @@ pub fn opts() -> TargetOptions {
crt_static_allows_dylibs: true,
crt_static_respected: true,
requires_uwtable: true,
// Currently we don't pass the /NODEFAULTLIB flag to the linker on MSVC
// as there's been trouble in the past of linking the C++ standard
// library required by LLVM. This likely needs to happen one day, but
// in general Windows is also a more controlled environment than
// Unix, so it's not necessarily as critical that this be implemented.
// We don't pass the /NODEFAULTLIB flag to the linker on MSVC
// as that prevents linker directives embedded in object files from
// including other necessary libraries.
//
// Note that there are also some licensing worries about statically
// linking some libraries which require a specific agreement, so it may
// not ever be possible for us to pass this flag.
// For example, msvcrt.lib embeds a linker directive like:
// /DEFAULTLIB:vcruntime.lib /DEFAULTLIB:ucrt.lib
// So that vcruntime.lib and ucrt.lib are included when the entry point
// in msvcrt.lib is used. Using /NODEFAULTLIB would mean having to
// manually add those two libraries and potentially further dependencies
// they bring in.
//
// See also https://learn.microsoft.com/en-us/cpp/preprocessor/comment-c-cpp?view=msvc-170#lib
// for documention on including library dependencies in C/C++ code.
no_default_libraries: false,
has_thread_local: true,

Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ pub fn target() -> Target {
Target {
llvm_target: "i686-pc-windows-msvc".into(),
metadata: crate::spec::TargetMetadata {
description: Some("32-bit MSVC (Windows 7+)".into()),
description: Some("32-bit MSVC (Windows 10+)".into()),
tier: Some(1),
host_tools: Some(true),
std: Some(true),
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ pub fn target() -> Target {
Target {
llvm_target: "x86_64-pc-windows-msvc".into(),
metadata: crate::spec::TargetMetadata {
description: Some("64-bit MSVC (Windows 7+)".into()),
description: Some("64-bit MSVC (Windows 10+)".into()),
tier: Some(1),
host_tools: Some(true),
std: Some(true),
4 changes: 3 additions & 1 deletion compiler/rustc_trait_selection/src/solve/assembly/mod.rs
Original file line number Diff line number Diff line change
@@ -274,7 +274,9 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {

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

let mut candidates = vec![];

2 changes: 1 addition & 1 deletion src/doc/reference
2 changes: 1 addition & 1 deletion src/doc/rust-by-example
10 changes: 4 additions & 6 deletions src/doc/rustc/src/platform-support.md
Original file line number Diff line number Diff line change
@@ -33,12 +33,12 @@ All tier 1 targets with host tools support the full standard library.
target | notes
-------|-------
`aarch64-unknown-linux-gnu` | ARM64 Linux (kernel 4.1, glibc 2.17+)
`i686-pc-windows-gnu` | 32-bit MinGW (Windows 7+) [^windows-support] [^x86_32-floats-return-ABI]
`i686-pc-windows-msvc` | 32-bit MSVC (Windows 7+) [^windows-support] [^x86_32-floats-return-ABI]
`i686-pc-windows-gnu` | 32-bit MinGW (Windows 10+) [^windows-support] [^x86_32-floats-return-ABI]
`i686-pc-windows-msvc` | 32-bit MSVC (Windows 10+) [^windows-support] [^x86_32-floats-return-ABI]
`i686-unknown-linux-gnu` | 32-bit Linux (kernel 3.2+, glibc 2.17+) [^x86_32-floats-return-ABI]
`x86_64-apple-darwin` | 64-bit macOS (10.12+, Sierra+)
`x86_64-pc-windows-gnu` | 64-bit MinGW (Windows 7+) [^windows-support]
`x86_64-pc-windows-msvc` | 64-bit MSVC (Windows 7+) [^windows-support]
`x86_64-pc-windows-gnu` | 64-bit MinGW (Windows 10+) [^windows-support]
`x86_64-pc-windows-msvc` | 64-bit MSVC (Windows 10+) [^windows-support]
`x86_64-unknown-linux-gnu` | 64-bit Linux (kernel 3.2+, glibc 2.17+)

[^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
[`i586-pc-nto-qnx700`](platform-support/nto-qnx.md) | * | | 32-bit x86 QNX Neutrino 7.0 RTOS [^x86_32-floats-return-ABI]
[`i586-unknown-netbsd`](platform-support/netbsd.md) | ✓ | | 32-bit x86, restricted to Pentium
`i686-apple-darwin` | ✓ | ✓ | 32-bit macOS (10.12+, Sierra+) [^x86_32-floats-return-ABI]
`i686-pc-windows-msvc` | * | | 32-bit Windows XP support [^x86_32-floats-return-ABI]
[`i686-pc-windows-gnullvm`](platform-support/pc-windows-gnullvm.md) | ✓ | ✓ | [^x86_32-floats-return-ABI]
`i686-unknown-haiku` | ✓ | ✓ | 32-bit Haiku [^x86_32-floats-return-ABI]
[`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
[`x86_64-apple-watchos-sim`](platform-support/apple-watchos.md) | ✓ | | x86 64-bit Apple WatchOS simulator
[`x86_64-pc-nto-qnx710`](platform-support/nto-qnx.md) | ✓ | | x86 64-bit QNX Neutrino 7.1 RTOS |
[`x86_64-pc-windows-gnullvm`](platform-support/pc-windows-gnullvm.md) | ✓ | ✓ |
`x86_64-pc-windows-msvc` | * | | 64-bit Windows XP support
[`x86_64-unikraft-linux-musl`](platform-support/unikraft-linux-musl.md) | ✓ | | 64-bit Unikraft with musl 1.2.3
`x86_64-unknown-dragonfly` | ✓ | ✓ | 64-bit DragonFlyBSD
`x86_64-unknown-haiku` | ✓ | ✓ | 64-bit Haiku
21 changes: 20 additions & 1 deletion tests/mir-opt/unnamed-fields/field_access.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// skip-filecheck
// Tests the correct handling of unnamed fields within structs and unions marked with #[repr(C)].

// EMIT_MIR field_access.foo.SimplifyCfg-initial.after.mir
// EMIT_MIR field_access.bar.SimplifyCfg-initial.after.mir

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

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

// CHECK-LABEL: fn foo(
fn foo(foo: Foo) {
// CHECK [[a:_.*]] = (_1.0: u8);
// CHECK _.* = access::<u8>(move [[a]]) -> [return: bb1, unwind: bb5];
access(foo.a);
// CHECK [[b:_.*]] = ((_1.1: Foo::{anon_adt#0}).0: i8);
// CHECK _.* = access::<i8>(move [[b]]) -> [return: bb2, unwind: bb5];
access(foo.b);
// CHECK [[c:_.*]] = ((_1.1: Foo::{anon_adt#0}).1: bool);
// CHECK _.* = access::<bool>(move [[c]]) -> [return: bb3, unwind: bb5];
access(foo.c);
// CHECK [[d:_.*]] = (((_1.2: Foo::{anon_adt#1}).0: Foo::{anon_adt#1}::{anon_adt#0}).0: [u8; 1]);
// CHECK _.* = access::<[u8; 1]>(move [[d]]) -> [return: bb4, unwind: bb5];
access(foo.d);
}

// CHECK-LABEL: fn bar(
fn bar(bar: Bar) {
unsafe {
// CHECK [[a:_.*]] = (_1.0: u8);
// CHECK _.* = access::<u8>(move [[a]]) -> [return: bb1, unwind: bb5];
access(bar.a);
// CHECK [[b:_.*]] = ((_1.1: Bar::{anon_adt#0}).0: i8);
// CHECK _.* = access::<i8>(move [[b]]) -> [return: bb2, unwind: bb5];
access(bar.b);
// CHECK [[c:_.*]] = ((_1.1: Bar::{anon_adt#0}).1: bool);
// CHECK _.* = access::<bool>(move [[c]]) -> [return: bb3, unwind: bb5];
access(bar.c);
// CHECK [[d:_.*]] = (((_1.2: Bar::{anon_adt#1}).0: Bar::{anon_adt#1}::{anon_adt#0}).0: [u8; 1]);
// CHECK _.* = access::<[u8; 1]>(move [[d]]) -> [return: bb4, unwind: bb5];
access(bar.d);
}
}
2 changes: 0 additions & 2 deletions tests/ui/async-await/in-trait/early-bound-2.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//@ check-pass
//@ edition:2021

#![allow(incomplete_features)]

pub trait Foo {
#[allow(async_fn_in_trait)]
async fn foo(&mut self);
2 changes: 0 additions & 2 deletions tests/ui/async-await/in-trait/fn-not-async-err.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//@ edition: 2021

#![allow(incomplete_features)]

trait MyTrait {
async fn foo(&self) -> i32;
}
4 changes: 2 additions & 2 deletions tests/ui/async-await/in-trait/fn-not-async-err.stderr
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error: method should be `async` or return a future, but it is synchronous
--> $DIR/fn-not-async-err.rs:10:5
--> $DIR/fn-not-async-err.rs:8:5
|
LL | fn foo(&self) -> i32 {
| ^^^^^^^^^^^^^^^^^^^^
|
note: this method is `async` so it expects a future to be returned
--> $DIR/fn-not-async-err.rs:6:5
--> $DIR/fn-not-async-err.rs:4:5
|
LL | async fn foo(&self) -> i32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 changes: 0 additions & 2 deletions tests/ui/async-await/in-trait/fn-not-async-err2.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//@ edition: 2021
//@ check-pass

#![allow(incomplete_features)]

use std::future::Future;

trait MyTrait {
2 changes: 0 additions & 2 deletions tests/ui/async-await/in-trait/generics-mismatch.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//@ edition: 2021

#![allow(incomplete_features)]

trait Foo {
async fn foo<T>();
}
2 changes: 1 addition & 1 deletion tests/ui/async-await/in-trait/generics-mismatch.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0053]: method `foo` has an incompatible generic parameter for trait `Foo`
--> $DIR/generics-mismatch.rs:10:18
--> $DIR/generics-mismatch.rs:8:18
|
LL | trait Foo {
| ---
2 changes: 0 additions & 2 deletions tests/ui/async-await/in-trait/implied-bounds.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//@ check-pass
//@ edition: 2021

#![allow(incomplete_features)]

trait TcpStack {
type Connection<'a>: Sized where Self: 'a;
fn connect<'a>(&'a self) -> Self::Connection<'a>;
2 changes: 0 additions & 2 deletions tests/ui/async-await/in-trait/issue-102138.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//@ check-pass
//@ edition:2021

#![allow(incomplete_features)]

use std::future::Future;

async fn yield_now() {}
2 changes: 0 additions & 2 deletions tests/ui/async-await/in-trait/issue-102219.rs
Original file line number Diff line number Diff line change
@@ -2,8 +2,6 @@
//@ edition:2021
//@ check-pass

#![allow(incomplete_features)]

trait T {
#[allow(async_fn_in_trait)]
async fn foo();
2 changes: 0 additions & 2 deletions tests/ui/async-await/in-trait/issue-102310.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//@ check-pass
//@ edition:2021

#![allow(incomplete_features)]

pub trait SpiDevice {
#[allow(async_fn_in_trait)]
async fn transaction<F, R>(&mut self);
2 changes: 0 additions & 2 deletions tests/ui/async-await/in-trait/issue-104678.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//@ edition:2021
//@ check-pass

#![allow(incomplete_features)]

use std::future::Future;
pub trait Pool {
type Conn;
2 changes: 0 additions & 2 deletions tests/ui/async-await/in-trait/nested-rpit.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//@ edition: 2021
//@ check-pass

#![allow(incomplete_features)]

use std::future::Future;
use std::marker::PhantomData;

1 change: 0 additions & 1 deletion tests/ui/const-generics/auxiliary/generics_of_parent.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![feature(generic_const_exprs)]
#![allow(incomplete_features)]

// library portion of regression test for #87674
pub struct Foo<const N: usize>([(); N + 1])
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![feature(generic_const_exprs)]
#![allow(incomplete_features)]

// library portion of testing that `impl Trait<{ expr }>` doesnt
// ice because of a `DefKind::TyParam` parent
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![feature(generic_const_exprs)]
#![allow(incomplete_features)]

pub struct Foo<const N: usize>;

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![feature(generic_const_exprs)]
#![allow(incomplete_features)]

pub fn test1<T>() -> [u8; std::mem::size_of::<T>() - 1]
where
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ LL | let _ = const_evaluatable_lib::test1::<T>();
|
= help: try adding a `where` bound using this expression: `where [(); std::mem::size_of::<T>() - 1]:`
note: required by a bound in `test1`
--> $DIR/auxiliary/const_evaluatable_lib.rs:6:10
--> $DIR/auxiliary/const_evaluatable_lib.rs:5:10
|
LL | pub fn test1<T>() -> [u8; std::mem::size_of::<T>() - 1]
| ----- required by a bound in this function
@@ -22,7 +22,7 @@ LL | let _ = const_evaluatable_lib::test1::<T>();
|
= help: try adding a `where` bound using this expression: `where [(); std::mem::size_of::<T>() - 1]:`
note: required by a bound in `test1`
--> $DIR/auxiliary/const_evaluatable_lib.rs:4:27
--> $DIR/auxiliary/const_evaluatable_lib.rs:3:27
|
LL | pub fn test1<T>() -> [u8; std::mem::size_of::<T>() - 1]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `test1`
@@ -35,7 +35,7 @@ LL | let _ = const_evaluatable_lib::test1::<T>();
|
= help: try adding a `where` bound using this expression: `where [(); std::mem::size_of::<T>() - 1]:`
note: required by a bound in `test1`
--> $DIR/auxiliary/const_evaluatable_lib.rs:6:10
--> $DIR/auxiliary/const_evaluatable_lib.rs:5:10
|
LL | pub fn test1<T>() -> [u8; std::mem::size_of::<T>() - 1]
| ----- required by a bound in this function
@@ -51,7 +51,7 @@ LL | let _ = const_evaluatable_lib::test1::<T>();
|
= help: try adding a `where` bound using this expression: `where [(); std::mem::size_of::<T>() - 1]:`
note: required by a bound in `test1`
--> $DIR/auxiliary/const_evaluatable_lib.rs:4:27
--> $DIR/auxiliary/const_evaluatable_lib.rs:3:27
|
LL | pub fn test1<T>() -> [u8; std::mem::size_of::<T>() - 1]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `test1`
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![feature(generic_const_exprs)]
#![allow(incomplete_features)]

// All of these three items must be in `lib2` to reproduce the error

Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ LL | generics_of_parent_impl_trait::foo([()]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `foo`
|
note: required by a bound in `foo`
--> $DIR/auxiliary/generics_of_parent_impl_trait.rs:6:48
--> $DIR/auxiliary/generics_of_parent_impl_trait.rs:5:48
|
LL | pub fn foo<const N: usize>(foo: impl Into<[(); N + 1]>) {
| ^^^^^ required by this bound in `foo`
1 change: 0 additions & 1 deletion tests/ui/consts/auxiliary/closure-in-foreign-crate.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#![crate_type = "lib"]
#![feature(const_closures, const_trait_impl, effects)]
#![allow(incomplete_features)]

pub const fn test() {
let cl = const || {};
1 change: 0 additions & 1 deletion tests/ui/dyn-star/auxiliary/dyn-star-foreign.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![feature(dyn_star)]
#![allow(incomplete_features)]

use std::fmt::Display;

2 changes: 1 addition & 1 deletion tests/ui/dyn-star/no-implicit-dyn-star.stderr
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ LL | dyn_star_foreign::require_dyn_star_display(1usize);
found type `usize`
= help: `usize` implements `Display`, `#[feature(dyn_star)]` is likely not enabled; that feature it is currently incomplete
note: function defined here
--> $DIR/auxiliary/dyn-star-foreign.rs:6:8
--> $DIR/auxiliary/dyn-star-foreign.rs:5:8
|
LL | pub fn require_dyn_star_display(_: dyn* Display) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
1 change: 0 additions & 1 deletion tests/ui/generic-associated-types/issue-90014-tait2.rs
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@
//@ error-pattern: expected generic lifetime parameter, found `'a`

#![feature(type_alias_impl_trait)]
#![allow(incomplete_features)]

use std::future::Future;

2 changes: 1 addition & 1 deletion tests/ui/generic-associated-types/issue-90014-tait2.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0792]: expected generic lifetime parameter, found `'a`
--> $DIR/issue-90014-tait2.rs:27:9
--> $DIR/issue-90014-tait2.rs:26:9
|
LL | type Fut<'a> = impl Future<Output = ()>;
| -- this generic parameter must be used with a generic lifetime parameter
1 change: 0 additions & 1 deletion tests/ui/impl-trait/in-trait/deep-match-works.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//@ check-pass

#![feature(lint_reasons)]
#![allow(incomplete_features)]

pub struct Wrapper<T>(T);

2 changes: 0 additions & 2 deletions tests/ui/impl-trait/in-trait/default-body-type-err-2.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//@ edition:2021

#![allow(incomplete_features)]

pub trait Foo {
async fn woopsie_async(&self) -> String {
42
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> $DIR/default-body-type-err-2.rs:7:9
--> $DIR/default-body-type-err-2.rs:5:9
|
LL | async fn woopsie_async(&self) -> String {
| ------ expected `String` because of return type
2 changes: 0 additions & 2 deletions tests/ui/impl-trait/in-trait/default-body-with-rpit.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//@ edition:2021
//@ check-pass

#![allow(incomplete_features)]

use std::fmt::Debug;

trait Foo {
2 changes: 0 additions & 2 deletions tests/ui/impl-trait/in-trait/default-body.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//@ check-pass
//@ edition:2021

#![allow(incomplete_features)]

use std::fmt::Debug;

trait Foo {
2 changes: 0 additions & 2 deletions tests/ui/impl-trait/in-trait/early.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//@ check-pass
//@ edition:2021

#![allow(incomplete_features)]

pub trait Foo {
#[allow(async_fn_in_trait)]
async fn bar<'a: 'a>(&'a mut self);
2 changes: 0 additions & 2 deletions tests/ui/impl-trait/in-trait/encode.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//@ build-pass
//@ compile-flags: --crate-type=lib

#![allow(incomplete_features)]

trait Foo {
fn bar() -> impl Sized;
}
2 changes: 0 additions & 2 deletions tests/ui/impl-trait/in-trait/issue-102301.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//@ check-pass

#![allow(incomplete_features)]

trait Foo<T> {
fn foo<F2: Foo<T>>(self) -> impl Foo<T>;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0053]: method `early` has an incompatible type for trait
--> $DIR/method-signature-matches.rs:57:27
--> $DIR/method-signature-matches.rs:55:27
|
LL | fn early<'late, T>(_: &'late ()) {}
| - ^^^^^^^^^
@@ -9,7 +9,7 @@ LL | fn early<'late, T>(_: &'late ()) {}
| expected this type parameter
|
note: type in trait
--> $DIR/method-signature-matches.rs:52:28
--> $DIR/method-signature-matches.rs:50:28
|
LL | fn early<'early, T>(x: &'early T) -> impl Sized;
| ^^^^^^^^^
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0053]: method `owo` has an incompatible type for trait
--> $DIR/method-signature-matches.rs:13:15
--> $DIR/method-signature-matches.rs:11:15
|
LL | fn owo(_: u8) {}
| ^^
@@ -8,7 +8,7 @@ LL | fn owo(_: u8) {}
| help: change the parameter type to match the trait: `()`
|
note: type in trait
--> $DIR/method-signature-matches.rs:8:15
--> $DIR/method-signature-matches.rs:6:15
|
LL | fn owo(x: ()) -> impl Sized;
| ^^
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0053]: method `owo` has an incompatible type for trait
--> $DIR/method-signature-matches.rs:24:21
--> $DIR/method-signature-matches.rs:22:21
|
LL | async fn owo(_: u8) {}
| ^^
@@ -8,7 +8,7 @@ LL | async fn owo(_: u8) {}
| help: change the parameter type to match the trait: `()`
|
note: type in trait
--> $DIR/method-signature-matches.rs:19:21
--> $DIR/method-signature-matches.rs:17:21
|
LL | async fn owo(x: ()) {}
| ^^
2 changes: 0 additions & 2 deletions tests/ui/impl-trait/in-trait/method-signature-matches.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//@ edition: 2021
//@ revisions: mismatch mismatch_async too_many too_few lt

#![allow(incomplete_features)]

#[cfg(mismatch)]
trait Uwu {
fn owo(x: ()) -> impl Sized;
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0050]: method `come_on_a_little_more_effort` has 0 parameters but the declaration in trait `TooLittle::come_on_a_little_more_effort` has 3
--> $DIR/method-signature-matches.rs:46:5
--> $DIR/method-signature-matches.rs:44:5
|
LL | fn come_on_a_little_more_effort(_: (), _: (), _: ()) -> impl Sized;
| ---------------- trait requires 3 parameters
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0050]: method `calm_down_please` has 3 parameters but the declaration in trait `TooMuch::calm_down_please` has 0
--> $DIR/method-signature-matches.rs:35:28
--> $DIR/method-signature-matches.rs:33:28
|
LL | fn calm_down_please() -> impl Sized;
| ------------------------------------ trait requires 0 parameters
1 change: 0 additions & 1 deletion tests/ui/impl-trait/in-trait/nested-rpitit.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//@ check-pass

#![feature(lint_reasons)]
#![allow(incomplete_features)]

use std::fmt::Display;
use std::ops::Deref;
2 changes: 0 additions & 2 deletions tests/ui/impl-trait/in-trait/opaque-in-impl.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//@ check-pass

#![allow(incomplete_features)]

use std::fmt::Debug;

trait Foo {
1 change: 0 additions & 1 deletion tests/ui/impl-trait/in-trait/reveal.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//@ check-pass

#![feature(lint_reasons)]
#![allow(incomplete_features)]

pub trait Foo {
fn f() -> Box<impl Sized>;
1 change: 0 additions & 1 deletion tests/ui/impl-trait/in-trait/success.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//@ check-pass

#![feature(lint_reasons)]
#![allow(incomplete_features)]

use std::fmt::Display;

2 changes: 0 additions & 2 deletions tests/ui/impl-trait/in-trait/wf-bounds.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// issue #101663

#![allow(incomplete_features)]

use std::fmt::Display;

trait Wf<T> {
12 changes: 6 additions & 6 deletions tests/ui/impl-trait/in-trait/wf-bounds.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
--> $DIR/wf-bounds.rs:14:22
--> $DIR/wf-bounds.rs:12:22
|
LL | fn nya() -> impl Wf<Vec<[u8]>>;
| ^^^^^^^^^^^^^ doesn't have a size known at compile-time
@@ -9,14 +9,14 @@ note: required by an implicit `Sized` bound in `Vec`
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL

error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
--> $DIR/wf-bounds.rs:17:23
--> $DIR/wf-bounds.rs:15:23
|
LL | fn nya2() -> impl Wf<[u8]>;
| ^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `[u8]`
note: required by an implicit `Sized` bound in `Wf`
--> $DIR/wf-bounds.rs:7:10
--> $DIR/wf-bounds.rs:5:10
|
LL | trait Wf<T> {
| ^ required by the implicit `Sized` requirement on this type parameter in `Wf`
@@ -26,7 +26,7 @@ LL | trait Wf<T: ?Sized> {
| ++++++++

error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
--> $DIR/wf-bounds.rs:20:44
--> $DIR/wf-bounds.rs:18:44
|
LL | fn nya3() -> impl Wf<(), Output = impl Wf<Vec<[u8]>>>;
| ^^^^^^^^^^^^^ doesn't have a size known at compile-time
@@ -36,14 +36,14 @@ note: required by an implicit `Sized` bound in `Vec`
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL

error[E0277]: `T` doesn't implement `std::fmt::Display`
--> $DIR/wf-bounds.rs:23:26
--> $DIR/wf-bounds.rs:21:26
|
LL | fn nya4<T>() -> impl Wf<NeedsDisplay<T>>;
| ^^^^^^^^^^^^^^^^^^^ `T` cannot be formatted with the default formatter
|
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
note: required by a bound in `NeedsDisplay`
--> $DIR/wf-bounds.rs:11:24
--> $DIR/wf-bounds.rs:9:24
|
LL | struct NeedsDisplay<T: Display>(T);
| ^^^^^^^ required by this bound in `NeedsDisplay`
2 changes: 0 additions & 2 deletions tests/ui/impl-trait/in-trait/where-clause.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//@ check-pass
//@ edition: 2021

#![allow(incomplete_features)]

use std::fmt::Debug;

trait Foo<Item> {
1 change: 0 additions & 1 deletion tests/ui/lazy-type-alias/auxiliary/lazy.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(lazy_type_alias)]
#![allow(incomplete_features)]

pub type Alias<T: Copy> = Option<T>;
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ LL | let _: lazy::Alias<String>;
| ^^^^^^ the trait `Copy` is not implemented for `String`
|
note: required by a bound in `lazy::Alias`
--> $DIR/auxiliary/lazy.rs:4:19
--> $DIR/auxiliary/lazy.rs:3:19
|
LL | pub type Alias<T: Copy> = Option<T>;
| ^^^^ required by this bound in `Alias`
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ LL | let _: lazy::Alias<String>;
| ^^^^^^ the trait `Copy` is not implemented for `String`
|
note: required by a bound in `lazy::Alias`
--> $DIR/auxiliary/lazy.rs:4:19
--> $DIR/auxiliary/lazy.rs:3:19
|
LL | pub type Alias<T: Copy> = Option<T>;
| ^^^^ required by this bound in `Alias`
2 changes: 0 additions & 2 deletions tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-2.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![allow(incomplete_features)]

mod child {
trait Main {
fn main() -> impl std::process::Termination;
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error[E0277]: the trait bound `Something: Termination` is not satisfied
--> $DIR/issue-103052-2.rs:11:22
--> $DIR/issue-103052-2.rs:9:22
|
LL | fn main() -> Something {
| ^^^^^^^^^ the trait `Termination` is not implemented for `Something`
|
note: required by a bound in `Main::{synthetic#0}`
--> $DIR/issue-103052-2.rs:5:27
--> $DIR/issue-103052-2.rs:3:27
|
LL | fn main() -> impl std::process::Termination;
| ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Main::{synthetic#0}`
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//@ check-pass

#![feature(type_changing_struct_update)]
#![allow(incomplete_features)]

use std::any::Any;

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//@ check-pass

#![feature(type_changing_struct_update)]
#![allow(incomplete_features)]

use std::borrow::Cow;
use std::marker::PhantomData;
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![feature(type_changing_struct_update)]
#![allow(incomplete_features)]

#[derive(Clone)]
struct Machine<'a, S> {
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0597]: `s` does not live long enough
--> $DIR/lifetime-update.rs:20:17
--> $DIR/lifetime-update.rs:19:17
|
LL | let s = String::from("hello");
| - binding `s` declared here
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![feature(type_changing_struct_update)]
#![allow(incomplete_features)]

struct Machine<'a, S, M> {
state: S,
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> $DIR/type-generic-update.rs:46:11
--> $DIR/type-generic-update.rs:45:11
|
LL | ..m1
| ^^ expected `Machine<'_, i32, f64>`, found `Machine<'_, f64, f64>`
@@ -8,7 +8,7 @@ LL | ..m1
found struct `Machine<'_, f64, _>`

error[E0308]: mismatched types
--> $DIR/type-generic-update.rs:51:11
--> $DIR/type-generic-update.rs:50:11
|
LL | ..m1
| ^^ expected `Machine<'_, i32, i32>`, found `Machine<'_, f64, f64>`
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//@ check-pass

// This goal is also possible w/ a GAT, but lazy_type_alias
// makes the behavior a bit more readable.
#![feature(lazy_type_alias)]
//~^ WARN the feature `lazy_type_alias` is incomplete

struct Wr<T>(T);
trait Foo {}
impl Foo for Wr<i32> {}

type Alias<T> = (T,)
where Wr<T>: Foo;

fn hello<T>() where Alias<T>: Into<(T,)>, Wr<T>: Foo {}

fn main() {
// When calling `hello`, proving `Alias<?0>: Into<(?0,)>` will require
// normalizing the self type of the goal. This will emit the where
// clause `Wr<?0>: Foo`, which constrains `?0` in both the self type
// *and* the non-self part of the goal. That used to trigger a debug
// assertion.
hello::<_>();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
warning: the feature `lazy_type_alias` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/normalize-self-type-constrains-trait-args.rs:5:12
|
LL | #![feature(lazy_type_alias)]
| ^^^^^^^^^^^^^^^
|
= note: see issue #112792 <https://github.com/rust-lang/rust/issues/112792> for more information
= note: `#[warn(incomplete_features)]` on by default

warning: 1 warning emitted

228 changes: 114 additions & 114 deletions tests/ui/transmutability/primitives/numbers.current.stderr

Large diffs are not rendered by default.

228 changes: 114 additions & 114 deletions tests/ui/transmutability/primitives/numbers.next.stderr

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion tests/ui/transmutability/primitives/numbers.rs
Original file line number Diff line number Diff line change
@@ -5,7 +5,6 @@
#![crate_type = "lib"]
#![feature(transmutability)]
#![allow(dead_code)]
#![allow(incomplete_features)]

mod assert {
use std::mem::BikeshedIntrinsicFrom;
1 change: 0 additions & 1 deletion tests/ui/transmutability/unions/boolish.rs
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
#![feature(transmutability)]
#![feature(marker_trait_attr)]
#![allow(dead_code)]
#![allow(incomplete_features)]

mod assert {
use std::mem::{Assume, BikeshedIntrinsicFrom};
1 change: 0 additions & 1 deletion tests/ui/type-alias-impl-trait/issue-65384.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![feature(type_alias_impl_trait)]
#![allow(incomplete_features)]

trait MyTrait {}

2 changes: 1 addition & 1 deletion tests/ui/type-alias-impl-trait/issue-65384.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0119]: conflicting implementations of trait `MyTrait` for type `()`
--> $DIR/issue-65384.rs:10:1
--> $DIR/issue-65384.rs:9:1
|
LL | impl MyTrait for () {}
| ------------------- first implementation here