1
Fork 0
rust/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate-default-method-body-is-const.rs

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

19 lines
328 B
Rust
Raw Normal View History

// This tests that `const_trait` default methods can
// be called from a const context when used across crates.
//
//@ check-pass
2023-12-19 04:28:21 +00:00
#![feature(const_trait_impl, effects)]
//@ aux-build: cross-crate.rs
extern crate cross_crate;
use cross_crate::*;
const _: () = {
Const.func();
Const.defaulted_func();
};
fn main() {}