forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove some noise from opaque type errors around associated types
- Loading branch information
Showing
3 changed files
with
17 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,20 @@ | ||
error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias | ||
--> $DIR/bound_reduction2.rs:16:60 | ||
| | ||
LL | fn foo_desugared<T: TraitWithAssoc>(_: T) -> Foo<T::Assoc> { | ||
| ____________________________________________________________^ | ||
LL | | | ||
LL | | | ||
LL | | | ||
... | | ||
LL | | () | ||
LL | | } | ||
| |_^ | ||
|
||
error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias | ||
--> $DIR/bound_reduction2.rs:16:60 | ||
| | ||
LL | fn foo_desugared<T: TraitWithAssoc>(_: T) -> Foo<T::Assoc> { | ||
| ____________________________________________________________^ | ||
LL | | | ||
LL | | | ||
LL | | | ||
... | | ||
LL | | () | ||
LL | | } | ||
| |_^ | ||
|
||
error: non-defining opaque type use in defining scope | ||
--> $DIR/bound_reduction2.rs:16:1 | ||
--> $DIR/bound_reduction2.rs:16:46 | ||
| | ||
LL | fn foo_desugared<T: TraitWithAssoc>(_: T) -> Foo<T::Assoc> { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| ^^^^^^^^^^^^^ | ||
| | ||
note: used non-generic type `<T as TraitWithAssoc>::Assoc` for generic parameter | ||
--> $DIR/bound_reduction2.rs:9:10 | ||
| | ||
LL | type Foo<V> = impl Trait<V>; | ||
| ^ | ||
|
||
error: non-defining opaque type use in defining scope | ||
--> $DIR/bound_reduction2.rs:16:1 | ||
| | ||
LL | fn foo_desugared<T: TraitWithAssoc>(_: T) -> Foo<T::Assoc> { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
note: used non-generic type `_` for generic parameter | ||
--> $DIR/bound_reduction2.rs:9:10 | ||
| | ||
LL | type Foo<V> = impl Trait<V>; | ||
| ^ | ||
|
||
error: non-defining opaque type use in defining scope | ||
--> $DIR/bound_reduction2.rs:16:1 | ||
| | ||
LL | fn foo_desugared<T: TraitWithAssoc>(_: T) -> Foo<T::Assoc> { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
note: used non-generic type `_` for generic parameter | ||
--> $DIR/bound_reduction2.rs:9:10 | ||
| | ||
LL | type Foo<V> = impl Trait<V>; | ||
| ^ | ||
|
||
error: could not find defining uses | ||
--> $DIR/bound_reduction2.rs:9:15 | ||
| | ||
LL | type Foo<V> = impl Trait<V>; | ||
| ^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 6 previous errors | ||
error: aborting due to 2 previous errors | ||
|