rust/tests/ui/traits/const-traits/fn-ptr-lub.rs
Michael Goulet 25c9253379 Add tests
2024-10-24 09:46:36 +00:00

21 lines
313 B
Rust

//@ compile-flags: -Znext-solver
//@ check-pass
#![feature(const_trait_impl, effects)]
//~^ WARN the feature `effects` is incomplete
const fn foo() {}
const fn bar() {}
fn baz() {}
const fn caller(branch: bool) {
let mut x = if branch {
foo
} else {
bar
};
x = baz;
}
fn main() {}