Skip to content

Commit

Permalink
Unrolled build for rust-lang#122949
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#122949 - ShoyuVanilla:issue-117310, r=lcnr

Add a regression test for rust-lang#117310

Closes rust-lang#117310

It seems to have been fixed in `rustc 1.79.0-nightly (1388d7a 2024-03-20)` or before, so just adding a regression test for it.
  • Loading branch information
rust-timer authored Mar 24, 2024
2 parents 6e6c721 + 37dbe40 commit cd9d1c8
Showing 1 changed file with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//@ check-pass

#![feature(type_alias_impl_trait)]
#![allow(dead_code)]

use std::ops::Deref;

trait Trait {}
impl<A, B> Trait for (A, B, u8) where A: Deref, B: Deref<Target = A::Target>, {}
impl<A, B> Trait for (A, B, i8) {}

type TaitSized = impl Sized;
fn def_tait1() -> TaitSized {}

type TaitCopy = impl Copy;
fn def_tait2() -> TaitCopy {}

fn impl_trait<T: Trait> () {}

fn test() {
impl_trait::<(&TaitSized, &TaitCopy, _)>();
impl_trait::<(&TaitCopy, &TaitSized, _)>();

impl_trait::<(&TaitCopy, &String, _)>();
impl_trait::<(&TaitSized, &String, _)>();
}

fn main() {}

0 comments on commit cd9d1c8

Please sign in to comment.