Skip to content

RFC 1214 warning in librustc_mir/repr.rs #28999

Closed
@apasel422

Description

@apasel422

Building nightly yields

../rust/src/librustc_mir/repr.rs:404:5: 404:38 warning: the parameter type `V` may not live long enough [E0309]
../rust/src/librustc_mir/repr.rs:404     pub elem: ProjectionElem<'tcx, V>,
                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../rust/src/librustc_mir/repr.rs:401:24: 401:33 note: in this expansion of #[derive_PartialEq] (defined in ../rust/src/librustc_mir/repr.rs)
../rust/src/librustc_mir/repr.rs:404:5: 404:38 help: run `rustc --explain E0309` to see a detailed explanation
../rust/src/librustc_mir/repr.rs:404:5: 404:38 help: consider adding an explicit lifetime bound `V: 'tcx`...
../rust/src/librustc_mir/repr.rs:404:5: 404:38 note: this warning results from recent bug fixes and clarifications; it will become a HARD ERROR in the next release. See RFC 1214 for details.
../rust/src/librustc_mir/repr.rs:404     pub elem: ProjectionElem<'tcx, V>,
                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../rust/src/librustc_mir/repr.rs:401:24: 401:33 note: in this expansion of #[derive_PartialEq] (defined in ../rust/src/librustc_mir/repr.rs)
../rust/src/librustc_mir/repr.rs:404:5: 404:38 note: ...so that the reference type `&repr::ProjectionElem<'_, V>` does not outlive the data it points at
../rust/src/librustc_mir/repr.rs:404     pub elem: ProjectionElem<'tcx, V>,
                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../rust/src/librustc_mir/repr.rs:401:24: 401:33 note: in this expansion of #[derive_PartialEq] (defined in ../rust/src/librustc_mir/repr.rs)
../rust/src/librustc_mir/repr.rs:404:5: 404:38 warning: the parameter type `V` may not live long enough [E0309]
../rust/src/librustc_mir/repr.rs:404     pub elem: ProjectionElem<'tcx, V>,
                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../rust/src/librustc_mir/repr.rs:401:24: 401:33 note: in this expansion of #[derive_PartialEq] (defined in ../rust/src/librustc_mir/repr.rs)
../rust/src/librustc_mir/repr.rs:404:5: 404:38 help: run `rustc --explain E0309` to see a detailed explanation
../rust/src/librustc_mir/repr.rs:404:5: 404:38 help: consider adding an explicit lifetime bound `V: 'tcx`...
../rust/src/librustc_mir/repr.rs:404:5: 404:38 note: this warning results from recent bug fixes and clarifications; it will become a HARD ERROR in the next release. See RFC 1214 for details.
../rust/src/librustc_mir/repr.rs:404     pub elem: ProjectionElem<'tcx, V>,
                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../rust/src/librustc_mir/repr.rs:401:24: 401:33 note: in this expansion of #[derive_PartialEq] (defined in ../rust/src/librustc_mir/repr.rs)
../rust/src/librustc_mir/repr.rs:404:5: 404:38 note: ...so that the reference type `&repr::ProjectionElem<'_, V>` does not outlive the data it points at
../rust/src/librustc_mir/repr.rs:404     pub elem: ProjectionElem<'tcx, V>,
                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../rust/src/librustc_mir/repr.rs:401:24: 401:33 note: in this expansion of #[derive_PartialEq] (defined in ../rust/src/librustc_mir/repr.rs)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions