Skip to content

Commit b8b30ae

Browse files
committed
add a ui test for #101739
1 parent 82510b9 commit b8b30ae

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#![feature(transmutability)]
2+
3+
mod assert {
4+
use std::mem::BikeshedIntrinsicFrom;
5+
6+
pub fn is_transmutable<Src, Context, const ASSUME_ALIGNMENT: bool>()
7+
where
8+
Dst: BikeshedIntrinsicFrom<Src, Context, ASSUME_ALIGNMENT>, //~ ERROR cannot find type `Dst` in this scope
9+
//~^ ERROR mismatched types
10+
{
11+
}
12+
}
13+
14+
fn via_const() {
15+
struct Context;
16+
struct Src;
17+
18+
assert::is_transmutable::<Src, Context, false>();
19+
}
20+
21+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
error[E0412]: cannot find type `Dst` in this scope
2+
--> $DIR/issues-101739.rs:8:9
3+
|
4+
LL | Dst: BikeshedIntrinsicFrom<Src, Context, ASSUME_ALIGNMENT>,
5+
| ^^^ not found in this scope
6+
7+
error[E0308]: mismatched types
8+
--> $DIR/issues-101739.rs:8:50
9+
|
10+
LL | Dst: BikeshedIntrinsicFrom<Src, Context, ASSUME_ALIGNMENT>,
11+
| ^^^^^^^^^^^^^^^^ expected struct `Assume`, found `bool`
12+
13+
error: aborting due to 2 previous errors
14+
15+
Some errors have detailed explanations: E0308, E0412.
16+
For more information about an error, try `rustc --explain E0308`.

0 commit comments

Comments
 (0)