A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/rust-lang/rust/issues/79450 below:

`impl const` wrongly accepts impl with non-const provided methods · Issue #79450 · rust-lang/rust · GitHub

This prints no error, but prov is not const-safe, so the impl const Tr should not be accepted:

#![feature(const_trait_impl)]

trait Tr {
    fn req(&self);
    
    fn prov(&self) {
        println!("lul");
        self.req();
    }
}

struct S;

impl const Tr for S {
    fn req(&self) {}
}

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4