blob: 0dfa482b98613d4df78aa428a04d58558bf779e6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// Ensure that the introduction of `const` and `[const]` trait bounds didn't regress this
// Rust 2015 code. See also test `macro-const-trait-bound-theoretical-regression.rs`.
//@ edition: 2015
//@ check-pass (KEEP THIS AS A PASSING TEST!)
macro_rules! check {
($ty:ty) => { compile_error!("ty"); }; // KEEP THIS RULE FIRST AND AS IS!
// DON'T MODIFY THE MATCHERS BELOW UNLESS THE CONST TRAIT MODIFIER SYNTAX CHANGES!
(dyn $c:ident) => { /* KEEP THIS EMPTY! */ };
(dyn [$c:ident]) => { /* KEEP THIS EMPTY! */ };
}
check! { dyn const }
check! { dyn [const] }
fn main() {}
|