-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.WG-trait-system-refactorThe Rustc Trait System Refactor Initiative (-Znext-solver)The Rustc Trait System Refactor Initiative (-Znext-solver)
Description
I was trying the new trait resolver system and I am getting compiler issues with two libraries
https://github.com/rust-random/rand
https://github.com/Lokathor/tinyvec
Tinyvec
error[E0311]: the associated type `<arrayvec::ArrayVec<A> as core::ops::Index<I>>::Output` may not live long enough
|
help: consider adding an explicit lifetime bound
--> src\arrayvec.rs:175:11
|
175 | fn index<'a>(&'a self, index: I) -> &'a Self::Output where <arrayvec::ArrayVec<A> as core::ops::Index<I>>::Output: 'a {
| ++++ ++ ++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
error[E0311]: the associated type `<arrayvec::ArrayVec<A> as core::ops::Index<I>>::Output` may not live long enough
|
help: consider adding an explicit lifetime bound
--> src\arrayvec.rs:183:15
|
183 | fn index_mut<'a>(&'a mut self, index: I) -> &'a mut Self::Output where <arrayvec::ArrayVec<A> as core::ops::Index<I>>::Output: 'a {
| ++++ ++ ++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
error[E0311]: the associated type `<SliceVec<'s, T> as core::ops::Index<I>>::Output` may not live long enough
|
help: consider adding an explicit lifetime bound
--> src\slicevec.rs:53:11
|
53 | fn index<'a>(&'a self, index: I) -> &'a Self::Output where <SliceVec<'s, T> as core::ops::Index<I>>::Output: 'a {
| ++++ ++ ++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
error[E0311]: the associated type `<SliceVec<'s, T> as core::ops::Index<I>>::Output` may not live long enough
|
help: consider adding an explicit lifetime bound
--> src\slicevec.rs:64:15
|
64 | fn index_mut<'a>(&'a mut self, index: I) -> &'a mut Self::Output where <SliceVec<'s, T> as core::ops::Index<I>>::Output: 'a {
| ++++ ++ ++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rand
error[E0311]: the associated type `<ReseedingCore<R, Rsdr> as BlockRngCore>::Results` may not live long enough
|
help: consider adding an explicit lifetime bound
--> src\rngs\adapter\reseeding.rs:172:16
|
172 | fn generate<'a>(&mut self, results: &'a mut Self::Results) where <ReseedingCore<R, Rsdr> as BlockRngCore>::Results: 'a {
| ++++ ++ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
error[E0311]: the associated type `<ReseedingCore<R, Rsdr> as BlockRngCore>::Results` may not live long enough
|
help: consider adding an explicit lifetime bound
--> src\rngs\adapter\reseeding.rs:240:27
|
240 ~ fn reseed_and_generate<'a>(
241 ~ &mut self, results: &'a mut <Self as BlockRngCore>::Results, global_fork_counter: usize,
242 ~ ) where <ReseedingCore<R, Rsdr> as BlockRngCore>::Results: 'a {
|
Instead, this happened: explanation
Meta
rustc --version --verbose
:
rustc 1.77.0-nightly (d6d7a9386 2023-12-22)
binary: rustc
commit-hash: d6d7a93866f2ffcfb51828b8859bdad760b54ce0
commit-date: 2023-12-22
host: x86_64-pc-windows-msvc
release: 1.77.0-nightly
LLVM version: 17.0.6
The two libraries are depends of my project. I tried compiling them by themselves. Still getting the error.
I am not sure if this is the correct way to report this bug.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.WG-trait-system-refactorThe Rustc Trait System Refactor Initiative (-Znext-solver)The Rustc Trait System Refactor Initiative (-Znext-solver)