Skip to content

No type hint and no formatting #19059

New issue

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

Closed
rcitsz opened this issue Jan 28, 2025 · 6 comments · Fixed by #19061
Closed

No type hint and no formatting #19059

rcitsz opened this issue Jan 28, 2025 · 6 comments · Fixed by #19061
Labels
C-bug Category: bug

Comments

@rcitsz
Copy link

rcitsz commented Jan 28, 2025

rust-analyzer v0.3.2282
rustc 1.83.0 (90b35a623 2024-11-26)
vscode version 1.94

no custom relevant settings, all vscode config is default.

my code as follows:

 // Cannot recognize join, and there are no type hints for vals, but rust-analyzer v0.3.2273 is normal.
 let vals = [“xxx”,"yyy"].iter().map(|v| v.to_string()).collect::<Vec<_>>().join(",");

// Formating not work
async fn fx() {
   let res = async {
       // here is my code,  but formating not work
   }.await;
}

// if do this, formating is ok
async fn fx() {
   let res = async {
       // here is my code,  formating work
   };
  res.awiat;
}
@rcitsz rcitsz added the C-bug Category: bug label Jan 28, 2025
@ikatson
Copy link

ikatson commented Jan 28, 2025

Yeah, 2025-01-27 is broken, I needed to revert too. Simple repro that broke for me

use tokio::sync::mpsc::{unbounded_channel, UnboundedReceiver};
use std::sync::Mutex;

fn broken_types() {
    let (tx, rx) = unbounded_channel::<()>();
    let mutex = Mutex::new(rx);
    let g = mutex.lock().unwrap();

    /// This "poll_recv" is unrecognized by typing and autocomplete
    g.poll_recv(..);
}

@rust-lang rust-lang deleted a comment from dnlsndr Jan 28, 2025
@Veykril
Copy link
Member

Veykril commented Jan 28, 2025

@rcitsz
Your code snippet contains invalid rust characters , with those fixed stuff formats for me as normal

@Veykril
Copy link
Member

Veykril commented Jan 28, 2025

@ikatson your snippet works fine for me on the latest release (it also completes the poll_recv)

Image

@Veykril
Copy link
Member

Veykril commented Jan 28, 2025

#19012 probably broke things for <1.84 toolchains because the receiver impls are missing there

@ikatson
Copy link

ikatson commented Jan 28, 2025

Thanks for figuring it out! It works fine on 1.84, I had 1.83

@Veykril
Copy link
Member

Veykril commented Jan 28, 2025

That confirms my suspicion then, I have kicked off a new release with the fix so it should be available in an hour or so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants