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

ices/83764.rs: fixed with no errors #1032

Merged
merged 1 commit into from
Dec 4, 2021
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Dec 4, 2021

Issue: rust-lang/rust#83764

#![allow(dead_code)]

pub fn main() {
    // Instantiating Foo with a concrete type will not fail
    let _ = Foo::<dyn FooTrait>::new();
}

pub struct Foo<T: FooTrait + ?Sized> {
    base: FooBase,
    value: T,
}

impl<T: FooTrait + ?Sized> Foo<T> {
    pub fn new() -> Box<Foo<T>> {
        todo!()
    }
}

pub trait FooTrait {}

pub struct FooBase {
    cls: Bar,
}

// Bar *must* be a fieldless enum
pub enum Bar {}
=== stdout ===
=== stderr ===
==============

=== stdout ===
=== stderr ===
==============
@Alexendoo Alexendoo merged commit 3393c9d into master Dec 4, 2021
@Alexendoo Alexendoo deleted the autofix/ices/83764.rs branch December 4, 2021 14:33
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