Skip to content

RPITIT return is not checked for well-formedness #101663

Closed
@Noratrieb

Description

@Noratrieb

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions