Skip to content

Commit b0c6b48

Browse files
committed
Add test for cross-crate const ctor paths
Currently ICEs on this branch but should pass.
1 parent 4852bd9 commit b0c6b48

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#![feature(adt_const_params)]
2+
3+
use std::marker::ConstParamTy;
4+
5+
#[derive(Eq, PartialEq, ConstParamTy)]
6+
pub struct Foo;
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//@ check-pass
2+
//@ aux-build:xcrate-const-ctor-a.rs
3+
4+
#![feature(adt_const_params)]
5+
6+
extern crate xcrate_const_ctor_a;
7+
use xcrate_const_ctor_a::Foo;
8+
9+
fn bar<const N: Foo>() {}
10+
11+
fn baz() {
12+
bar::<{ Foo }>();
13+
}
14+
15+
fn main() {}

0 commit comments

Comments
 (0)