Skip to content
This repository was archived by the owner on May 23, 2024. It is now read-only.

ices/78632.sh: fixed with no errors #740

Merged
merged 1 commit into from
May 5, 2021
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented May 5, 2021

Issue: rust-lang/rust#78632

#!/bin/bash

rustc --test - << EOF
pub trait Corge<T> {
    type Fred;
}

impl Corge<u8> for () {
    type Fred = u32;
}

pub trait Waldo {
    type Quax;
}

impl Waldo for u32 {
    type Quax = u8;
}

pub trait Grault
where
    (): Corge<Self::Thud>,
{
    type Thud;
    fn bar(_: <() as Corge<Self::Thud>>::Fred) {}
}

impl<T> Grault for T
where
    T: Waldo,
    (): Corge<T::Quax>,
    <() as Corge<T::Quax>>::Fred: Waldo,
{
    type Thud = u8;
}

pub trait Plugh<I> {
    fn baz();
}

#[derive(Copy, Clone, Debug)]
pub struct Qiz<T> {
    foo: T,
}

impl<T> Plugh<<() as Corge<T::Thud>>::Fred> for Qiz<T>
where
    T: Grault,
    (): Corge<T::Thud>,
{
    fn baz() {}
}

#[cfg(test)]
mod tests {
    use super::{Grault, Plugh, Qiz};

    #[test]
    fn test1() {
        <u32 as Grault>::bar(0u32);
    }

    #[test]
    fn test2() {
        <Qiz<u32> as Plugh<u32>>::baz();
    }
}
EOF
=== stdout ===
=== stderr ===
==============

=== stdout ===
=== stderr ===
==============
@Alexendoo Alexendoo merged commit 9f94818 into master May 5, 2021
@Alexendoo Alexendoo deleted the autofix/ices/78632.sh branch May 5, 2021 12:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants