rust/tests/ui/layout/post-mono-layout-cycle-2.stderr
Luca Versari c8b76bcf58 Emit warning when calling/declaring functions with unavailable vectors.
On some architectures, vector types may have a different ABI depending
on whether the relevant target features are enabled. (The ABI when the
feature is disabled is often not specified, but LLVM implements some
de-facto ABI.)

As discussed in rust-lang/lang-team#235, this turns out to very easily
lead to unsound code.

This commit makes it a post-monomorphization future-incompat warning to
declare or call functions using those vector types in a context in which
the corresponding target features are disabled, if using an ABI for
which the difference is relevant. This ensures that these functions are
always called with a consistent ABI.

See the [nomination comment](https://github.com/rust-lang/rust/pull/127731#issuecomment-2288558187)
for more discussion.

Part of #116558
2024-11-01 22:24:35 +01:00

24 lines
803 B
Plaintext

error[E0733]: recursion in an async fn requires boxing
--> $DIR/post-mono-layout-cycle-2.rs:30:5
|
LL | / async fn iter<T>(&mut self, iterator: T)
LL | |
LL | | where
LL | | T: IntoIterator<Item = ()>,
| |___________________________________^
LL | {
LL | Blah::iter(self, iterator).await
| -------------------------------- recursive call here
|
= note: a recursive `async fn` call must introduce indirection such as `Box::pin` to avoid an infinitely sized future
note: the above error was encountered while instantiating `fn Wrap::<()>::ice`
--> $DIR/post-mono-layout-cycle-2.rs:56:9
|
LL | t.ice();
| ^^^^^^^
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0733`.