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

ices/96287.sh: fixed with errors #1477

Merged
merged 1 commit into from
Jan 5, 2023
Merged

ices/96287.sh: fixed with errors #1477

merged 1 commit into from
Jan 5, 2023

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jan 4, 2023

Issue: rust-lang/rust#96287

#!/bin/bash

cat > out.rs <<'EOF'
#![feature(type_alias_impl_trait)]

fn main() {}

trait TraitWithAssoc {
    type Assoc;
}

type Foo<V> = impl Trait<V::Assoc>; //~ associated type `Assoc` not found for `V`

trait Trait<U> {}

impl<W> Trait<W> for () {}

fn foo_desugared<T: TraitWithAssoc>(_: T) -> Foo<T> {
    ()
}

EOF

rustdoc --edition=2021 out.rs
=== stdout ===
=== stderr ===
error[E0220]: associated type `Assoc` not found for `V`
 --> out.rs:9:29
  |
9 | type Foo<V> = impl Trait<V::Assoc>; //~ associated type `Assoc` not found for `V`
  |                             ^^^^^ there is a similarly named associated type `Assoc` in the trait `TraitWithAssoc`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0220`.
==============

=== stdout ===
=== stderr ===
error[E0220]: associated type `Assoc` not found for `V`
 --> out.rs:9:29
  |
9 | type Foo<V> = impl Trait<V::Assoc>; //~ associated type `Assoc` not found for `V`
  |                             ^^^^^ there is a similarly named associated type `Assoc` in the trait `TraitWithAssoc`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0220`.
==============
@JohnTitor JohnTitor merged commit 137176f into master Jan 5, 2023
@JohnTitor JohnTitor deleted the autofix/ices/96287.sh branch January 5, 2023 10:23
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