Skip to content
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

Clarify the usage-of-qualified-ty error message. #93357

Merged
merged 1 commit into from
Jan 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_lint/src/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ impl<'tcx> LateLintPass<'tcx> for TyTyKind {
lint.build(&format!("usage of qualified `ty::{}`", t))
.span_suggestion(
path.span,
"try using it unqualified",
"try importing it and using it unqualified",
t,
// The import probably needs to be changed
Applicability::MaybeIncorrect,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error: usage of qualified `ty::Ty<'_>`
--> $DIR/qualified_ty_ty_ctxt.rs:25:11
|
LL | ty_q: ty::Ty<'_>,
| ^^^^^^^^^^ help: try using it unqualified: `Ty<'_>`
| ^^^^^^^^^^ help: try importing it and using it unqualified: `Ty<'_>`
|
note: the lint level is defined here
--> $DIR/qualified_ty_ty_ctxt.rs:4:9
Expand All @@ -14,7 +14,7 @@ error: usage of qualified `ty::TyCtxt<'_>`
--> $DIR/qualified_ty_ty_ctxt.rs:27:16
|
LL | ty_ctxt_q: ty::TyCtxt<'_>,
| ^^^^^^^^^^^^^^ help: try using it unqualified: `TyCtxt<'_>`
| ^^^^^^^^^^^^^^ help: try importing it and using it unqualified: `TyCtxt<'_>`

error: aborting due to 2 previous errors