rust-lang / rust-lang/rust-analyzer
Auto action to remove uneccessary parenthesis on triple tuple does not work
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
rust-analyzer version: rust-analyzer 1.78.0-nightly (2d24fe5 2024-03-09)
rustc version: rustc 1.76.0 (07dca489a 2024-02-04)
editor or extension: Helix
relevant settings:
.bashrc:
#
# ~/.bashrc
#
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
alias ivm='gvim -v'
alias vim='gvim -v'
alias clipboard='xclip -selection clipboard'
alias hx='helix'
alias less='less -f'
PS1='[\u@\h \W]\$ '
function cd_up() {
cd $(printf "%0.s../" $(seq 1 $1 ));
}
alias 'cd..'='cd_up'
#SFML stuff
SFML_INCLUDE_DIR=/usr/local/./include
SFML_LIBS_DIR=/usr/local/lib
# RUST stuff
alias cargo_small_check='cargo check --message-format short'
#export PATH=/home/dogunbound/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
export PATH=/home/dogunbound/.rust-extras:$PATH
export EDITOR=vim
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
bash $HOME/.cargo/env
# C stuff
export CPATH=/usr/include/SFML:$CPATH
export CPATH=/usr/local/include/SFML:$CPATH
export CPATH=/usr/local/include/:$CPATH
export CPATH=$HOME/SFML/CSFML/include/:$CPATH
export CPATH=$HOME/SFML/CSFML/src/:$CPATH
export CPATH=$HOME/SFML/SFML/include/:$CPATH
export CPATH=$HOME/SFML/SFML/src/:$CPATH
. "$HOME/.cargo/env"
.profile:
. "$HOME/.cargo/env"
Relevant link: Original ticket made on helix here
code snippet to reproduce:
fn helix_bug() -> ((i32), (i32), (i32)) {
todo!()
}
fn main() {}
Video demonstrating incorrect behavior in helix:
https://github.com/rust-lang/rust-analyzer/assets/64436119/b3b8522a-dcde-421f-ba57-a60f5ad9079a
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the behavior with the minimal Rust snippet and compare it with the Helix ticket linked in the issue. The work is done when the auto action correctly removes unnecessary parentheses in the triple-tuple return type without producing incorrect edits.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100