Commit aff365f
committed
Add regression test for issue 281
Without #![feature(impl_trait_in_bindings)]:
error[E0562]: `impl Trait` is not allowed in paths
--> tests/test.rs:1680:42
|
1680 | async fn method(&self) -> Result<impl AsRef<str> + Send + Sync, Self::Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
error[E0562]: `impl Trait` is not allowed in the type of variable bindings
--> tests/test.rs:1680:42
|
1680 | async fn method(&self) -> Result<impl AsRef<str> + Send + Sync, Self::Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
= note: see issue #63065 <rust-lang/rust#63065> for more information
= help: add `#![feature(impl_trait_in_bindings)]` to the crate attributes to enable
= note: this compiler was built on 2025-01-02; consider upgrading it if it is out of date
With #![feature(impl_trait_in_bindings)]:
error[E0562]: `impl Trait` is not allowed in paths
--> tests/test.rs:1680:42
|
1680 | async fn method(&self) -> Result<impl AsRef<str> + Send + Sync, Self::Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods1 parent 7d8519d commit aff365f
1 file changed
+21
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1661 | 1661 | | |
1662 | 1662 | | |
1663 | 1663 | | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
0 commit comments