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

ices/105742.sh: fixed with errors #1479

Merged
merged 1 commit into from
Jan 5, 2023
Merged

Conversation

github-actions[bot]
Copy link
Contributor

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

Issue: rust-lang/rust#105742

#!/bin/bash

cat > out.rs << EOF
use std::ops::Index;

fn next<'a, T>(s: &'a mut dyn SVec<Item = T, Output = T>) {
    let _ = s;
}

trait SVec: Index<<Self as SVec>::Item, Output = <Index<<Self as SVec>::Item, Output = <Self as SVec>::Item> as SVec>::Item> {
    type Item<'a, T>;

    fn len(&self) -> <Self as SVec>::Item;
}

fn main() {}

EOF

rustdoc -Znormalize-docs out.rs
=== stdout ===
=== stderr ===
error[E0107]: missing generics for associated type `SVec::Item`
 --> out.rs:7:35
  |
7 | trait SVec: Index<<Self as SVec>::Item, Output = <Index<<Self as SVec>::Item, Output = <Self as SVec>::Item> as SVec>::Item> {
  |                                   ^^^^ expected 1 lifetime argument
  |
note: associated type defined here, with 1 lifetime parameter: `'a`
 --> out.rs:8:10
  |
8 |     type Item<'a, T>;
  |          ^^^^ --
help: add missing lifetime argument
  |
7 | trait SVec: Index<<Self as SVec>::Item<'a>, Output = <Index<<Self as SVec>::Item, Output = <Self as SVec>::Item> as SVec>::Item> {
  |                                   ~~~~~~~~

error[E0107]: missing generics for associated type `SVec::Item`
 --> out.rs:7:35
  |
7 | trait SVec: Index<<Self as SVec>::Item, Output = <Index<<Self as SVec>::Item, Output = <Self as SVec>::Item> as SVec>::Item> {
  |                                   ^^^^ expected 1 generic argument
  |
note: associated type defined here, with 1 generic parameter: `T`
 --> out.rs:8:10
  |
8 |     type Item<'a, T>;
  |          ^^^^     -
help: add missing generic argument
  |
7 | trait SVec: Index<<Self as SVec>::Item<T>, Output = <Index<<Self as SVec>::Item, Output = <Self as SVec>::Item> as SVec>::Item> {
  |                                   ~~~~~~~

error[E0107]: missing generics for associated type `SVec::Item`
 --> out.rs:7:73
  |
7 | trait SVec: Index<<Self as SVec>::Item, Output = <Index<<Self as SVec>::Item, Output = <Self as SVec>::Item> as SVec>::Item> {
  |                                                                         ^^^^ expected 1 lifetime argument
  |
note: associated type defined here, with 1 lifetime parameter: `'a`
 --> out.rs:8:10
  |
8 |     type Item<'a, T>;
  |          ^^^^ --
help: add missing lifetime argument
  |
7 | trait SVec: Index<<Self as SVec>::Item, Output = <Index<<Self as SVec>::Item<'a>, Output = <Self as SVec>::Item> as SVec>::Item> {
  |                                                                         ~~~~~~~~

error[E0107]: missing generics for associated type `SVec::Item`
 --> out.rs:7:73
  |
7 | trait SVec: Index<<Self as SVec>::Item, Output = <Index<<Self as SVec>::Item, Output = <Self as SVec>::Item> as SVec>::Item> {
  |                                                                         ^^^^ expected 1 generic argument
  |
note: associated type defined here, with 1 generic parameter: `T`
 --> out.rs:8:10
  |
8 |     type Item<'a, T>;
  |          ^^^^     -
help: add missing generic argument
  |
7 | trait SVec: Index<<Self as SVec>::Item, Output = <Index<<Self as SVec>::Item<T>, Output = <Self as SVec>::Item> as SVec>::Item> {
  |                                                                         ~~~~~~~

error[E0107]: missing generics for associated type `SVec::Item`
 --> out.rs:7:104
  |
7 | trait SVec: Index<<Self as SVec>::Item, Output = <Index<<Self as SVec>::Item, Output = <Self as SVec>::Item> as SVec>::Item> {
  |                                                                                                        ^^^^ expected 1 lifetime argument
  |
note: associated type defined here, with 1 lifetime parameter: `'a`
 --> out.rs:8:10
  |
8 |     type Item<'a, T>;
  |          ^^^^ --
help: add missing lifetime argument
  |
7 | trait SVec: Index<<Self as SVec>::Item, Output = <Index<<Self as SVec>::Item, Output = <Self as SVec>::Item<'a>> as SVec>::Item> {
  |                                                                                                        ~~~~~~~~

error[E0107]: missing generics for associated type `SVec::Item`
 --> out.rs:7:104
  |
7 | trait SVec: Index<<Self as SVec>::Item, Output = <Index<<Self as SVec>::Item, Output = <Self as SVec>::Item> as SVec>::Item> {
  |                                                                                                        ^^^^ expected 1 generic argument
  |
note: associated type defined here, with 1 generic parameter: `T`
 --> out.rs:8:10
  |
8 |     type Item<'a, T>;
  |          ^^^^     -
help: add missing generic argument
  |
7 | trait SVec: Index<<Self as SVec>::Item, Output = <Index<<Self as SVec>::Item, Output = <Self as SVec>::Item<T>> as SVec>::Item> {
  |                                                                                                        ~~~~~~~

error[E0107]: missing generics for associated type `SVec::Item`
 --> out.rs:7:120
  |
7 | trait SVec: Index<<Self as SVec>::Item, Output = <Index<<Self as SVec>::Item, Output = <Self as SVec>::Item> as SVec>::Item> {
  |                                                                                                                        ^^^^ expected 1 lifetime argument
  |
note: associated type defined here, with 1 lifetime parameter: `'a`
 --> out.rs:8:10
  |
8 |     type Item<'a, T>;
  |          ^^^^ --
help: add missing lifetime argument
  |
7 | trait SVec: Index<<Self as SVec>::Item, Output = <Index<<Self as SVec>::Item, Output = <Self as SVec>::Item> as SVec>::Item<'a>> {
  |                                                                                                                        ~~~~~~~~

error[E0107]: missing generics for associated type `SVec::Item`
 --> out.rs:7:120
  |
7 | trait SVec: Index<<Self as SVec>::Item, Output = <Index<<Self as SVec>::Item, Output = <Self as SVec>::Item> as SVec>::Item> {
  |                                                                                                                        ^^^^ expected 1 generic argument
  |
note: associated type defined here, with 1 generic parameter: `T`
 --> out.rs:8:10
  |
8 |     type Item<'a, T>;
  |          ^^^^     -
help: add missing generic argument
  |
7 | trait SVec: Index<<Self as SVec>::Item, Output = <Index<<Self as SVec>::Item, Output = <Self as SVec>::Item> as SVec>::Item<T>> {
  |                                                                                                                        ~~~~~~~

error[E0107]: missing generics for associated type `SVec::Item`
  --> out.rs:10:38
   |
10 |     fn len(&self) -> <Self as SVec>::Item;
   |                                      ^^^^ expected 1 lifetime argument
   |
note: associated type defined here, with 1 lifetime parameter: `'a`
  --> out.rs:8:10
   |
8  |     type Item<'a, T>;
   |          ^^^^ --
help: add missing lifetime argument
   |
10 |     fn len(&self) -> <Self as SVec>::Item<'_>;
   |                                      ~~~~~~~~

error[E0107]: missing generics for associated type `SVec::Item`
  --> out.rs:10:38
   |
10 |     fn len(&self) -> <Self as SVec>::Item;
   |                                      ^^^^ expected 1 generic argument
   |
note: associated type defined here, with 1 generic parameter: `T`
  --> out.rs:8:10
   |
8  |     type Item<'a, T>;
   |          ^^^^     -
help: add missing generic argument
   |
10 |     fn len(&self) -> <Self as SVec>::Item<T>;
   |                                      ~~~~~~~

error: aborting due to 10 previous errors

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

=== stdout ===
=== stderr ===
error[E0107]: missing generics for associated type `SVec::Item`
 --> out.rs:7:35
  |
7 | trait SVec: Index<<Self as SVec>::Item, Output = <Index<<Self as SVec>::Item, Output = <Self as SVec>::Item> as SVec>::Item> {
  |                                   ^^^^ expected 1 lifetime argument
  |
note: associated type defined here, with 1 lifetime parameter: `'a`
 --> out.rs:8:10
  |
8 |     type Item<'a, T>;
  |          ^^^^ --
help: add missing lifetime argument
  |
7 | trait SVec: Index<<Self as SVec>::Item<'a>, Output = <Index<<Self as SVec>::Item, Output = <Self as SVec>::Item> as SVec>::Item> {
  |                                   ~~~~~~~~

error[E0107]: missing generics for associated type `SVec::Item`
 --> out.rs:7:35
  |
7 | trait SVec: Index<<Self as SVec>::Item, Output = <Index<<Self as SVec>::Item, Output = <Self as SVec>::Item> as SVec>::Item> {
  |                                   ^^^^ expected 1 generic argument
  |
note: associated type defined here, with 1 generic parameter: `T`
 --> out.rs:8:10
  |
8 |     type Item<'a, T>;
  |          ^^^^     -
help: add missing generic argument
  |
7 | trait SVec: Index<<Self as SVec>::Item<T>, Output = <Index<<Self as SVec>::Item, Output = <Self as SVec>::Item> as SVec>::Item> {
  |                                   ~~~~~~~

error[E0107]: missing generics for associated type `SVec::Item`
 --> out.rs:7:73
  |
7 | trait SVec: Index<<Self as SVec>::Item, Output = <Index<<Self as SVec>::Item, Output = <Self as SVec>::Item> as SVec>::Item> {
  |                                                                         ^^^^ expected 1 lifetime argument
  |
note: associated type defined here, with 1 lifetime parameter: `'a`
 --> out.rs:8:10
  |
8 |     type Item<'a, T>;
  |          ^^^^ --
help: add missing lifetime argument
  |
7 | trait SVec: Index<<Self as SVec>::Item, Output = <Index<<Self as SVec>::Item<'a>, Output = <Self as SVec>::Item> as SVec>::Item> {
  |                                                                         ~~~~~~~~

error[E0107]: missing generics for associated type `SVec::Item`
 --> out.rs:7:73
  |
7 | trait SVec: Index<<Self as SVec>::Item, Output = <Index<<Self as SVec>::Item, Output = <Self as SVec>::Item> as SVec>::Item> {
  |                                                                         ^^^^ expected 1 generic argument
  |
note: associated type defined here, with 1 generic parameter: `T`
 --> out.rs:8:10
  |
8 |     type Item<'a, T>;
  |          ^^^^     -
help: add missing generic argument
  |
7 | trait SVec: Index<<Self as SVec>::Item, Output = <Index<<Self as SVec>::Item<T>, Output = <Self as SVec>::Item> as SVec>::Item> {
  |                                                                         ~~~~~~~

error[E0107]: missing generics for associated type `SVec::Item`
 --> out.rs:7:104
  |
7 | trait SVec: Index<<Self as SVec>::Item, Output = <Index<<Self as SVec>::Item, Output = <Self as SVec>::Item> as SVec>::Item> {
  |                                                                                                        ^^^^ expected 1 lifetime argument
  |
note: associated type defined here, with 1 lifetime parameter: `'a`
 --> out.rs:8:10
  |
8 |     type Item<'a, T>;
  |          ^^^^ --
help: add missing lifetime argument
  |
7 | trait SVec: Index<<Self as SVec>::Item, Output = <Index<<Self as SVec>::Item, Output = <Self as SVec>::Item<'a>> as SVec>::Item> {
  |                                                                                                        ~~~~~~~~

error[E0107]: missing generics for associated type `SVec::Item`
 --> out.rs:7:104
  |
7 | trait SVec: Index<<Self as SVec>::Item, Output = <Index<<Self as SVec>::Item, Output = <Self as SVec>::Item> as SVec>::Item> {
  |                                                                                                        ^^^^ expected 1 generic argument
  |
note: associated type defined here, with 1 generic parameter: `T`
 --> out.rs:8:10
  |
8 |     type Item<'a, T>;
  |          ^^^^     -
help: add missing generic argument
  |
7 | trait SVec: Index<<Self as SVec>::Item, Output = <Index<<Self as SVec>::Item, Output = <Self as SVec>::Item<T>> as SVec>::Item> {
  |                                                                                                        ~~~~~~~

error[E0107]: missing generics for associated type `SVec::Item`
 --> out.rs:7:120
  |
7 | trait SVec: Index<<Self as SVec>::Item, Output = <Index<<Self as SVec>::Item, Output = <Self as SVec>::Item> as SVec>::Item> {
  |                                                                                                                        ^^^^ expected 1 lifetime argument
  |
note: associated type defined here, with 1 lifetime parameter: `'a`
 --> out.rs:8:10
  |
8 |     type Item<'a, T>;
  |          ^^^^ --
help: add missing lifetime argument
  |
7 | trait SVec: Index<<Self as SVec>::Item, Output = <Index<<Self as SVec>::Item, Output = <Self as SVec>::Item> as SVec>::Item<'a>> {
  |                                                                                                                        ~~~~~~~~

error[E0107]: missing generics for associated type `SVec::Item`
 --> out.rs:7:120
  |
7 | trait SVec: Index<<Self as SVec>::Item, Output = <Index<<Self as SVec>::Item, Output = <Self as SVec>::Item> as SVec>::Item> {
  |                                                                                                                        ^^^^ expected 1 generic argument
  |
note: associated type defined here, with 1 generic parameter: `T`
 --> out.rs:8:10
  |
8 |     type Item<'a, T>;
  |          ^^^^     -
help: add missing generic argument
  |
7 | trait SVec: Index<<Self as SVec>::Item, Output = <Index<<Self as SVec>::Item, Output = <Self as SVec>::Item> as SVec>::Item<T>> {
  |                                                                                                                        ~~~~~~~

error[E0107]: missing generics for associated type `SVec::Item`
  --> out.rs:10:38
   |
10 |     fn len(&self) -> <Self as SVec>::Item;
   |                                      ^^^^ expected 1 lifetime argument
   |
note: associated type defined here, with 1 lifetime parameter: `'a`
  --> out.rs:8:10
   |
8  |     type Item<'a, T>;
   |          ^^^^ --
help: add missing lifetime argument
   |
10 |     fn len(&self) -> <Self as SVec>::Item<'_>;
   |                                      ~~~~~~~~

error[E0107]: missing generics for associated type `SVec::Item`
  --> out.rs:10:38
   |
10 |     fn len(&self) -> <Self as SVec>::Item;
   |                                      ^^^^ expected 1 generic argument
   |
note: associated type defined here, with 1 generic parameter: `T`
  --> out.rs:8:10
   |
8  |     type Item<'a, T>;
   |          ^^^^     -
help: add missing generic argument
   |
10 |     fn len(&self) -> <Self as SVec>::Item<T>;
   |                                      ~~~~~~~

error: aborting due to 10 previous errors

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