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

ices/79461.sh: fixed with errors #1557

Merged
merged 1 commit into from
Mar 31, 2023
Merged

ices/79461.sh: fixed with errors #1557

merged 1 commit into from
Mar 31, 2023

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#79461

#!/bin/bash

cat > out.rs <<'EOF'

trait IAmATrait {
    type Item;
    fn function(&self) -> Self::Item;
}

struct IAmAnObject(usize);

impl IAmATrait for IAmAnObject {
    type Item = _;
    fn function(&self) -> Self::Item {
        self.0
    }
}

fn main() {}

EOF

rustdoc --edition=2021 out.rs
=== stdout ===
=== stderr ===
error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated types
  --> out.rs:10:17
   |
10 |     type Item = _;
   |                 ^ not allowed in type signatures

error: aborting due to previous error

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

=== stdout ===
=== stderr ===
error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated types
  --> out.rs:10:17
   |
10 |     type Item = _;
   |                 ^ not allowed in type signatures

error: aborting due to previous error

For more information about this error, try `rustc --explain E0121`.
==============
@Alexendoo Alexendoo merged commit ffd334d into master Mar 31, 2023
@Alexendoo Alexendoo deleted the autofix/ices/79461.sh branch March 31, 2023 21:20
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