diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-04-11 10:10:06 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-04-11 11:03:08 +1000 |
| commit | 7e8184fa2a712356f1827c8abc01bafcd359b122 (patch) | |
| tree | 2a9d6c6ed41d01a277877631565179171725c5fa /tests/ui/consts/static-default-lifetime/static-trait-impl.rs | |
| parent | 2205455d444f5f9da3a52e50f43c0306480218fb (diff) | |
| download | rust-7e8184fa2a712356f1827c8abc01bafcd359b122.tar.gz rust-7e8184fa2a712356f1827c8abc01bafcd359b122.zip | |
Improve `AssocItem::descr`.
The commit adds "associated" to the description of associated types and associated consts, to match the description of associated functions. This increases error message precision and consistency with `AssocKind::fmt`. The commit also notes an imperfection in `AssocKind::fmt`; fixing this imperfection is possible but beyond the scope of this PR.
Diffstat (limited to 'tests/ui/consts/static-default-lifetime/static-trait-impl.rs')
| -rw-r--r-- | tests/ui/consts/static-default-lifetime/static-trait-impl.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ui/consts/static-default-lifetime/static-trait-impl.rs b/tests/ui/consts/static-default-lifetime/static-trait-impl.rs index 1e12259e483..85746df146f 100644 --- a/tests/ui/consts/static-default-lifetime/static-trait-impl.rs +++ b/tests/ui/consts/static-default-lifetime/static-trait-impl.rs @@ -9,7 +9,7 @@ impl Bar<'_> for A { const STATIC: &str = ""; //~^ ERROR `&` without an explicit lifetime name cannot be used here //~| WARN this was previously accepted by the compiler but is being phased out - //~| ERROR lifetime parameters or bounds on const `STATIC` do not match the trait declaration + //~| ERROR lifetime parameters or bounds on associated const `STATIC` do not match the trait declaration } struct B; |
