diff options
| author | Frank King <frankking1729@gmail.com> | 2024-12-25 14:54:49 +0800 |
|---|---|---|
| committer | Frank King <frankking1729@gmail.com> | 2025-01-16 16:34:05 +0800 |
| commit | 5079acc060b1c7225de95ee3cdd84b5719ff189c (patch) | |
| tree | b6a96cf0efc47a35ac0f9244339dc4e120f6ce46 /compiler/rustc_error_codes | |
| parent | 4e5fec2f1ea4b1cfecaa14304c9f56de59b344cb (diff) | |
| download | rust-5079acc060b1c7225de95ee3cdd84b5719ff189c.tar.gz rust-5079acc060b1c7225de95ee3cdd84b5719ff189c.zip | |
Implement `use` associated items of traits
Diffstat (limited to 'compiler/rustc_error_codes')
| -rw-r--r-- | compiler/rustc_error_codes/src/error_codes/E0253.md | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0253.md b/compiler/rustc_error_codes/src/error_codes/E0253.md index aea51d40238..705d1bfc53e 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0253.md +++ b/compiler/rustc_error_codes/src/error_codes/E0253.md @@ -1,19 +1,19 @@ -Attempt was made to import an unimportable value. This can happen when trying -to import a method from a trait. +Attempt was made to import an unimportable type. This can happen when trying +to import a type from a trait. Erroneous code example: ```compile_fail,E0253 mod foo { pub trait MyTrait { - fn do_something(); + type SomeType; } } -use foo::MyTrait::do_something; -// error: `do_something` is not directly importable +use foo::MyTrait::SomeType; +// error: `SomeType` is not directly importable fn main() {} ``` -It's invalid to directly import methods belonging to a trait or concrete type. +It's invalid to directly import types belonging to a trait. |
