diff options
| author | bors <bors@rust-lang.org> | 2023-01-13 10:56:53 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-01-13 10:56:53 +0000 |
| commit | 5ca6f7d2c34953ee360ccf7d3c84c7853ea2df4b (patch) | |
| tree | 305d6145c0f91464cbf1bd64f12555c4cb81e584 /compiler/rustc_resolve/src/late/diagnostics.rs | |
| parent | 4a04f252f91b2ccef6fc16817b3e7a3aeda703b6 (diff) | |
| parent | c06d57eb198004b3c6dd151594a1137b8875f6f1 (diff) | |
| download | rust-5ca6f7d2c34953ee360ccf7d3c84c7853ea2df4b.tar.gz rust-5ca6f7d2c34953ee360ccf7d3c84c7853ea2df4b.zip | |
Auto merge of #106801 - JohnTitor:rollup-xqkraw0, r=JohnTitor
Rollup of 6 pull requests Successful merges: - #106608 (Render missing generics suggestion verbosely) - #106716 ([RFC 2397] Deny incorrect locations) - #106754 (Rename `Ty::is_ty_infer` -> `Ty::is_ty_or_numeric_infer`) - #106782 (Ignore tests move in git blame) - #106785 (Make blame spans better for impl wfcheck) - #106791 (Fix ICE formatting) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_resolve/src/late/diagnostics.rs')
| -rw-r--r-- | compiler/rustc_resolve/src/late/diagnostics.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_resolve/src/late/diagnostics.rs b/compiler/rustc_resolve/src/late/diagnostics.rs index d92f5a7c05e..d92b046d0b9 100644 --- a/compiler/rustc_resolve/src/late/diagnostics.rs +++ b/compiler/rustc_resolve/src/late/diagnostics.rs @@ -2065,7 +2065,11 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> { path: &[Segment], ) -> Option<(Span, &'static str, String, Applicability)> { let (ident, span) = match path { - [segment] if !segment.has_generic_args && segment.ident.name != kw::SelfUpper => { + [segment] + if !segment.has_generic_args + && segment.ident.name != kw::SelfUpper + && segment.ident.name != kw::Dyn => + { (segment.ident.to_string(), segment.ident.span) } _ => return None, |
