Skip to content

Commit 37ff473

Browse files
committed
wording nits
1 parent 0e6d40a commit 37ff473

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/librustc_lint/builtin.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1356,9 +1356,9 @@ impl TypeAliasBounds {
13561356

13571357
fn suggest_changing_assoc_types(ty: &hir::Ty, err: &mut DiagnosticBuilder) {
13581358
// Access to associates types should use `<T as Bound>::Assoc`, which does not need a
1359-
// bound. Let's see of this type does that.
1359+
// bound. Let's see if this type does that.
13601360

1361-
// We use an AST visitor to walk the type.
1361+
// We use a HIR visitor to walk the type.
13621362
use rustc::hir::intravisit::{self, Visitor};
13631363
use syntax::ast::NodeId;
13641364
struct WalkAssocTypes<'a, 'db> where 'db: 'a {
@@ -1373,8 +1373,8 @@ impl TypeAliasBounds {
13731373
fn visit_qpath(&mut self, qpath: &'v hir::QPath, id: NodeId, span: Span) {
13741374
if TypeAliasBounds::is_type_variable_assoc(qpath) {
13751375
self.err.span_help(span,
1376-
"use absolute paths (i.e., <T as Trait>::Assoc) to refer to associated \
1377-
types in type aliases");
1376+
"use fully disambiguated paths (i.e., `<T as Trait>::Assoc`) to refer to \
1377+
associated types in type aliases");
13781378
}
13791379
intravisit::walk_qpath(self, qpath, id, span)
13801380
}

src/test/ui/type-alias-bounds.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ LL | type T1<U: Bound> = U::Assoc; //~ WARN not enforced in type aliases
4646
| ^^^^^
4747
|
4848
= help: the bound will not be checked when the type alias is used, and should be removed
49-
help: use absolute paths (i.e., <T as Trait>::Assoc) to refer to associated types in type aliases
49+
help: use fully disambiguated paths (i.e., `<T as Trait>::Assoc`) to refer to associated types in type aliases
5050
--> $DIR/type-alias-bounds.rs:57:21
5151
|
5252
LL | type T1<U: Bound> = U::Assoc; //~ WARN not enforced in type aliases
@@ -59,7 +59,7 @@ LL | type T2<U> where U: Bound = U::Assoc; //~ WARN not enforced in type aliase
5959
| ^^^^^^^^
6060
|
6161
= help: the clause will not be checked when the type alias is used, and should be removed
62-
help: use absolute paths (i.e., <T as Trait>::Assoc) to refer to associated types in type aliases
62+
help: use fully disambiguated paths (i.e., `<T as Trait>::Assoc`) to refer to associated types in type aliases
6363
--> $DIR/type-alias-bounds.rs:58:29
6464
|
6565
LL | type T2<U> where U: Bound = U::Assoc; //~ WARN not enforced in type aliases

0 commit comments

Comments
 (0)