profile
viewpoint

Ask questionsasync fn + rustfmt don't "just work" inside of RLS

If you create a new rust project in the RLS and try to use async fn:

async fn foo() { }
fn main() { }

you will get errors from rustfmt that async fn is not supported in the 2015 Edition when you attempt to format. This is true even if your project is in Rust 2018. Presumably the RLS is not supplying the correct version information. I view this as a fairly large "user experience" problem.

Note: Probably this should be filed on the RLS repository, but I wanted to file a bug here so that we could track it more easily as a potential blocker for stabilization (I would consider it to be one). I think in the future we should be tracking said bugs through repository-wise searches to avoid this sort of dilemma, but anyway.

cc @Xanewok -- any thoughts?

rust-lang/rust

Answer questions cramertj

Hey @Centril you're tagging all of this issues as async/await blocking -- can you explain why that is? IMO bugs in editors and things shouldn't block stabilization of async/await.

useful!

Related questions

Spurious NaNs produced by trig functions with valid inputs on Windows GNU toolchains hot 2
using 'cargo install xsv' on windows 10 triggers rustc internal error hot 1
chain() make collect very slow hot 1
if/while Some(n) = &mut foo sugar will leak a temporary mutable borrow to current scope in particular situation hot 1
build an empty project failed (undefined reference to `__onexitbegin') hot 1
Invalid collision with TryFrom implementation? hot 1
Crater runs for Rust 1.38.0 hot 1
Spurious NaNs produced by trig functions with valid inputs on Windows GNU toolchains hot 1
under latest MinGW, cannot link with C code using stdout hot 1
Archive all nightlies hot 1
Building LLVM with Clang fails hot 1
Internal compiler error: can't buffer lints after HIR lowering hot 1
E0373 help suggests `move async` but the correct syntax is `async move` hot 1
Tracking issue for `Option::contains` and `Result::contains` hot 1
Include images in rustdoc output hot 1
Github User Rank List