]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/issue-70304.stderr
Rollup merge of #102954 - GuillaumeGomez:cfg-hide-attr-checks, r=Manishearth
[rust.git] / src / test / ui / generic-associated-types / issue-70304.stderr
1 error[E0637]: `'_` cannot be used here
2   --> $DIR/issue-70304.rs:46:41
3    |
4 LL | fn create_doc() -> impl Document<Cursor<'_> = DocCursorImpl<'_>> {
5    |                                         ^^ `'_` is a reserved lifetime name
6
7 error[E0106]: missing lifetime specifier
8   --> $DIR/issue-70304.rs:46:61
9    |
10 LL | fn create_doc() -> impl Document<Cursor<'_> = DocCursorImpl<'_>> {
11    |                                                             ^^ expected named lifetime parameter
12    |
13    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
14 help: consider using the `'static` lifetime
15    |
16 LL | fn create_doc() -> impl Document<Cursor<'_> = DocCursorImpl<'static>> {
17    |                                                             ~~~~~~~
18
19 error: missing required bound on `Cursor`
20   --> $DIR/issue-70304.rs:2:5
21    |
22 LL |     type Cursor<'a>: DocCursor<'a>;
23    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
24    |                                   |
25    |                                   help: add the required where clause: `where Self: 'a`
26    |
27    = note: this bound is currently required to ensure that impls have maximum flexibility
28    = note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information
29
30 error: aborting due to 3 previous errors
31
32 Some errors have detailed explanations: E0106, E0637.
33 For more information about an error, try `rustc --explain E0106`.