未验证 提交 268f09f9 编写于 作者: D Dylan DPC 提交者: GitHub

Rollup merge of #70912 - estebank:reduce-type-param-sugg-verbosity, r=davidtwco

Do not suggest adding type param when `use` is already suggested

Fix #70365, cc #70572.
......@@ -2480,8 +2480,7 @@ fn report_with_use_injections(&mut self, krate: &Crate) {
let (span, found_use) = UsePlacementFinder::check(krate, node_id);
if !candidates.is_empty() {
diagnostics::show_candidates(&mut err, span, &candidates, better, found_use);
}
if let Some((span, msg, sugg, appl)) = suggestion {
} else if let Some((span, msg, sugg, appl)) = suggestion {
err.span_suggestion(span, msg, sugg, appl);
}
err.emit();
......
......@@ -63,10 +63,6 @@ LL | use foo2::Bar;
|
LL | use foo3::Bar;
|
help: you might be missing a type parameter
|
LL | fn test_glob3<Bar>() {
| ^^^^^
error[E0107]: wrong number of const arguments: expected 0, found 1
--> $DIR/privacy-ns1.rs:35:17
......
......@@ -8,10 +8,6 @@ help: possible candidate is found in another module, you can import it into scop
|
LL | use foo::Foo;
|
help: you might be missing a type parameter
|
LL | type Output<Foo> = Option<Foo>;
| ^^^^^
error: aborting due to previous error
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册