diff options
Diffstat (limited to 'third_party/rust/extend/tests/compile_pass/associated_constants.rs')
-rw-r--r-- | third_party/rust/extend/tests/compile_pass/associated_constants.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/third_party/rust/extend/tests/compile_pass/associated_constants.rs b/third_party/rust/extend/tests/compile_pass/associated_constants.rs new file mode 100644 index 0000000000..5cb982c6a4 --- /dev/null +++ b/third_party/rust/extend/tests/compile_pass/associated_constants.rs @@ -0,0 +1,10 @@ +use extend::ext; + +#[ext] +impl Option<String> { + const FOO: usize = 1; +} + +fn main() { + assert_eq!(Option::<String>::FOO, 1); +} |