rust/tests/ui/parser/impls-nested-within-anon-consts-semantic.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
562 B
Rust
Raw Permalink Normal View History

// Regression test for issue #89342 and for part of #119924.
//@ check-pass
struct Expr<const N: u32>;
trait Trait0 {
fn required(_: Expr<{
struct Type;
impl Type {
// This visibility qualifier used to get rejected.
pub fn perform() {}
}
0
}>);
}
trait Trait1 {}
impl Trait1 for ()
where
[(); {
struct Type;
impl Type {
// This visibility qualifier used to get rejected.
pub const STORE: Self = Self;
}
0
}]:
{}
fn main() {}