小编Fei*_*Fei的帖子

每次在VSCode中启动RLS时,“重复的RLS配置”

我通过rustup update最近升级了Rust环境,然后每次打开编辑器时VSCode都会报告错误。编辑器的右下角会弹出两个重复的窗口,显示

Duplicated RLS configuration: rustfmt_path:rustfmt_path,rustfmt_path,,
Source: Rust (rls) (Extension)
Run Code Online (Sandbox Code Playgroud)

我可以打开VSCode的默认settings.json并确实找到重复的条目,但无法删除它们。

重新启动扩展程序可以重现该问题,我什至不知道插件本身是否正常工作。

rust visual-studio-code rust-language-server

6
推荐指数
1
解决办法
913
查看次数

如何调试“更新crates.io索引”中挂起的“货物建造”?

在我的RLS插件和终端版本之间存在一些冲突之后,我的Rust项目不再构建。我在网上搜索并发现了删除的建议~/.cargo/registry/index/*,但此后我什至无法构建任何项目。

现在构建总是在

更新crates.io索引

传递--verbose选项无济于事,所以我什至不知道它是否快要死了。接下来我该怎么办?如何调试此问题?

rust rust-cargo

5
推荐指数
1
解决办法
841
查看次数

将C++ 11 std :: function传递给带有boost :: function的遗留函数是否安全

我们有一个遗留系统,它集中使用boost :: function,现在它决定转向更新的现代C++标准.假设我们有这样的遗留函数:

void someFunction(boost::function<void(int)>);
Run Code Online (Sandbox Code Playgroud)

直接传入C++ 11函数是否安全?

//calling site, new C++11 code
std::function<void(int)> func = [](int x){
    //some implementation
}
someFunction(func); //will this always work?
Run Code Online (Sandbox Code Playgroud)

boost :: function是否也能优雅地处理标准C++ 11 lambda?

// will this also work?
someFunction([](int x)->void{
    //some implementation
});
Run Code Online (Sandbox Code Playgroud)

c++ lambda boost c++11 std-function

4
推荐指数
1
解决办法
95
查看次数