diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-03-26 21:23:47 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-26 21:23:47 +0100 |
| commit | ff8cdc9e14a4e0840fa60b5fdd2e7029a0c664bb (patch) | |
| tree | ae7f63fca0a79cceb38f23df980062be8e3e1114 /compiler/rustc_parse/messages.ftl | |
| parent | 9162776c6640fddd909edf755d0b9489730c89c2 (diff) | |
| parent | 3879acbec090b36454c0384cd8602047b806f47a (diff) | |
| download | rust-ff8cdc9e14a4e0840fa60b5fdd2e7029a0c664bb.tar.gz rust-ff8cdc9e14a4e0840fa60b5fdd2e7029a0c664bb.zip | |
Rollup merge of #122120 - fmease:sugg-assoc-ty-bound-on-eq-bound, r=compiler-errors
Suggest associated type bounds on problematic associated equality bounds Fixes #105056. TL;DR: Suggest `Trait<Ty: Bound>` on `Trait<Ty = Bound>` in Rust >=2021. ~~Blocked on #122055 (stabilization of `associated_type_bounds`), I'd say.~~ (merged)
Diffstat (limited to 'compiler/rustc_parse/messages.ftl')
| -rw-r--r-- | compiler/rustc_parse/messages.ftl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/compiler/rustc_parse/messages.ftl b/compiler/rustc_parse/messages.ftl index aa735f3de1f..8957d7d1bd3 100644 --- a/compiler/rustc_parse/messages.ftl +++ b/compiler/rustc_parse/messages.ftl @@ -14,10 +14,6 @@ parse_array_index_offset_of = array indexing not supported in offset_of parse_assignment_else_not_allowed = <assignment> ... else {"{"} ... {"}"} is not allowed -parse_assoc_lifetime = associated lifetimes are not supported - .label = the lifetime is given here - .help = if you meant to specify a trait object, write `dyn Trait + 'lifetime` - parse_associated_static_item_not_allowed = associated `static` items are not allowed parse_async_block_in_2015 = `async` blocks are only allowed in Rust 2018 or later @@ -445,6 +441,12 @@ parse_lifetime_in_borrow_expression = borrow expressions cannot be annotated wit .suggestion = remove the lifetime annotation .label = annotated with lifetime here +parse_lifetime_in_eq_constraint = lifetimes are not permitted in this context + .label = lifetime is not allowed here + .context_label = this introduces an associated item binding + .help = if you meant to specify a trait object, write `dyn /* Trait */ + {$lifetime}` + .colon_sugg = you might have meant to write a bound here + parse_lone_slash = invalid trailing slash in literal .label = {parse_lone_slash} |
