Skip to content

chumsky-0.10.0: the parameter type T may not live long enough #194

@lcnr

Description

@lcnr
Contributor
[INFO] [stdout] error[E0311]: the parameter type `T` may not live long enough
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/chumsky-0.10.0/src/private.rs:271:49
[INFO] [stdout]     |
[INFO] [stdout] 271 |     fn from_mut<T>(_r: &mut Self::Output<T>) -> Self::Output<&mut T> {}
[INFO] [stdout]     |                        --------------------     ^^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
[INFO] [stdout]     |                        |
[INFO] [stdout]     |                        the parameter type `T` must be valid for the anonymous lifetime defined here...
[INFO] [stdout]     |
[INFO] [stdout] help: consider adding an explicit lifetime bound
[INFO] [stdout]     |
[INFO] [stdout] 271 |     fn from_mut<'a, T: 'a>(_r: &'a mut Self::Output<T>) -> Self::Output<&'a mut T> {}
[INFO] [stdout]     |                 +++  ++++       ++                                       ++

Activity

added
from-craterA regression found via a crater run, not part of our test suite
on May 5, 2025
changed the title [-]chumsky: the parameter type `T` may not live long enough[/-] [+]chumsky-0.10.0: the parameter type `T` may not live long enough[/+] on May 5, 2025
compiler-errors

compiler-errors commented on May 5, 2025

@compiler-errors
Member

Minimized:

trait Mode {
    type Output<T>;
    fn from_mut<T>(_r: &mut Self::Output<T>) -> Self::Output<&mut T>;
}

struct Check;

impl Mode for Check {
    type Output<T> = ();
    fn from_mut<T>(_r: &mut Self::Output<T>) -> Self::Output<&mut T> {}
}
moved this from unknown to in progress in -Znext-solver=globallyon May 5, 2025
added a commit that references this issue on May 5, 2025
bdbf1c6
added a commit that references this issue on May 6, 2025
lcnr

lcnr commented on May 6, 2025

@lcnr
ContributorAuthor
moved this from in progress to done in -Znext-solver=globallyon May 6, 2025
closed this as completedby moving to done in -Znext-solver=globallyon May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

from-craterA regression found via a crater run, not part of our test suite

Type

No type

Projects

Status

done

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @compiler-errors@lcnr

    Issue actions

      chumsky-0.10.0: the parameter type `T` may not live long enough · Issue #194 · rust-lang/trait-system-refactor-initiative