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

ices/109299.rs: fixed with errors #1553

Merged
merged 1 commit into from
Mar 24, 2023
Merged

ices/109299.rs: fixed with errors #1553

merged 1 commit into from
Mar 24, 2023

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#109299

trait Document {
    fn cursor(&self) -> Lexer::Cursor<'_>;
}

struct Lexer<'d> {
    cursor: (),
    _phantom: std::marker::PhantomData<&'d ()>,
}

impl<'cursor> Lexer<'d> {
    type Cursor<'a> = DocCursorImpl<'a>;
}

fn main() {}
=== stdout ===
=== stderr ===
error[E0261]: use of undeclared lifetime name `'d`
  --> /home/runner/work/glacier/glacier/ices/109299.rs:10:21
   |
10 | impl<'cursor> Lexer<'d> {
   |      -              ^^ undeclared lifetime
   |      |
   |      help: consider introducing lifetime `'d` here: `'d,`

error[E0412]: cannot find type `DocCursorImpl` in this scope
  --> /home/runner/work/glacier/glacier/ices/109299.rs:11:23
   |
11 |     type Cursor<'a> = DocCursorImpl<'a>;
   |                       ^^^^^^^^^^^^^ not found in this scope

error[E0658]: inherent associated types are unstable
  --> /home/runner/work/glacier/glacier/ices/109299.rs:11:5
   |
11 |     type Cursor<'a> = DocCursorImpl<'a>;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #8995 <https://github.com/rust-lang/rust/issues/8995> for more information
   = help: add `#![feature(inherent_associated_types)]` to the crate attributes to enable

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0261, E0412, E0658.
For more information about an error, try `rustc --explain E0261`.
==============

=== stdout ===
=== stderr ===
error[E0261]: use of undeclared lifetime name `'d`
  --> /home/runner/work/glacier/glacier/ices/109299.rs:10:21
   |
10 | impl<'cursor> Lexer<'d> {
   |      -              ^^ undeclared lifetime
   |      |
   |      help: consider introducing lifetime `'d` here: `'d,`

error[E0412]: cannot find type `DocCursorImpl` in this scope
  --> /home/runner/work/glacier/glacier/ices/109299.rs:11:23
   |
11 |     type Cursor<'a> = DocCursorImpl<'a>;
   |                       ^^^^^^^^^^^^^ not found in this scope

error[E0658]: inherent associated types are unstable
  --> /home/runner/work/glacier/glacier/ices/109299.rs:11:5
   |
11 |     type Cursor<'a> = DocCursorImpl<'a>;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #8995 <rust-lang/rust#8995> for more information
   = help: add `#![feature(inherent_associated_types)]` to the crate attributes to enable

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0261, E0412, E0658.
For more information about an error, try `rustc --explain E0261`.
==============
@Alexendoo Alexendoo merged commit d916283 into master Mar 24, 2023
@Alexendoo Alexendoo deleted the autofix/ices/109299.rs branch March 24, 2023 11:51
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