]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/nll/type-alias-free-regions.rs
1 // Test that we don't assume that type aliases have the same type parameters
2 // as the type they alias and then panic when we see this.
5 // ignore-compare-mode-nll
6 //[nll] compile-flags: -Z borrowck=mir
8 type A
<'a
> = &'a
isize;
9 type B
<'a
> = Box
<A
<'a
>>;
16 fn from_box(b
: Box
<B
>) -> Self;
19 impl<'a
> FromBox
<'a
> for C
<'a
> {
20 fn from_box(b
: Box
<B
>) -> Self {
26 fn from_tuple( b
: (B
,)) -> Self;
29 impl<'a
> FromTuple
<'a
> for C
<'a
> {
30 fn from_tuple(b
: (B
,)) -> Self {
31 C { f: Box::new(b.0) }
//~ ERROR