Skip to content
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

RPITIT return is not checked for well-formedness #101663

Closed
Noratrieb opened this issue Sep 10, 2022 · 1 comment · Fixed by #101676
Closed

RPITIT return is not checked for well-formedness #101663

Noratrieb opened this issue Sep 10, 2022 · 1 comment · Fixed by #101676
Assignees
Labels
C-bug Category: This is a bug. F-return_position_impl_trait_in_trait `#![feature(return_position_impl_trait_in_trait)]`

Comments

@Noratrieb
Copy link
Member

I tried this code: playground

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

trait Wf<T> {}

trait Uwu {
    fn owo() -> impl ?Sized;
    fn nya() -> impl Wf<Vec<[u8]>>;
}

fn main() {}

I expected to see this happen: Code fails to compile, as these two return types are not well-formed

Instead, this happened: Compiles, but actually implementing the types will error

Meta

rustc --version --verbose:

rustc 1.65.0-nightly (1d37ed661 2022-09-09)
binary: rustc
commit-hash: 1d37ed661a6922e7a167609b8cd7eb31e972b19b
commit-date: 2022-09-09
host: x86_64-unknown-linux-gnu
release: 1.65.0-nightly
LLVM version: 15.0.0
@Noratrieb Noratrieb added the C-bug Category: This is a bug. label Sep 10, 2022
@Noratrieb
Copy link
Member Author

@rustbot label F-return_position_impl_trait_in_trait

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. F-return_position_impl_trait_in_trait `#![feature(return_position_impl_trait_in_trait)]`
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants