We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following code will cause rust analyzer to become unresponsive, exhausting all (?) available CPU and memory resources:
use std::marker::PhantomData; struct TypeWrapper<'a> { inner: InnerType, _ref: PhantomData<&'a mut BorrowWrapper<'a>>, } struct BorrowWrapper<'a> { inner: &'a mut InnerType, } struct InnerType; pub trait GetBorrow { type TypeA; type TypeB; fn get_type_a(&mut self) -> Self::TypeA; fn get_type_b(&mut self) -> Self::TypeB; } impl<'a> GetBorrow for TypeWrapper<'a> where Self::TypeA: 'a, Self::TypeB: 'a, { type TypeA = BorrowWrapper<'a>; type TypeB = BorrowWrapper<'a>; fn get_type_a(&mut self) -> Self::TypeA { BorrowWrapper { inner: &mut self.inner, } } fn get_type_b(&mut self) -> Self::TypeB { BorrowWrapper { inner: &mut self.inner, } } }
Updating, and switching between nightly and stable do not solve the issue.
nightly
stable
rustc --version --verbose gives the following:
rustc --version --verbose
rustc 1.79.0 (129f3b996 2024-06-10) binary: rustc commit-hash: 129f3b9964af4d4a709d1383930ade12dfe7c081 commit-date: 2024-06-10 host: x86_64-unknown-linux-gnu release: 1.79.0 LLVM version: 18.1.7
rust-analyzer --version gives the following:
rust-analyzer --version
rust-analyzer 1 (c4618fe14 2024-05-05)
The text was updated successfully, but these errors were encountered:
Hmm, this does not happen for me on the latest release
Sorry, something went wrong.
Can't reproduce this either.
No branches or pull requests
The following code will cause rust analyzer to become unresponsive, exhausting all (?) available CPU and memory resources:
Updating, and switching between
nightly
andstable
do not solve the issue.rustc --version --verbose
gives the following:rust-analyzer --version
gives the following:The text was updated successfully, but these errors were encountered: