File: overcaptures-2024.stderr

package info (click to toggle)
rustc 1.85.0%2Bdfsg3-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, sid, trixie
  • size: 893,396 kB
  • sloc: xml: 158,127; python: 35,830; javascript: 19,497; cpp: 19,002; sh: 17,245; ansic: 13,127; asm: 4,376; makefile: 1,051; perl: 29; lisp: 29; ruby: 19; sql: 11
file content (169 lines) | stat: -rw-r--r-- 7,950 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
error: `impl Sized` will capture more lifetimes than possibly intended in edition 2024
  --> $DIR/overcaptures-2024.rs:7:29
   |
LL | fn named<'a>(x: &'a i32) -> impl Sized { *x }
   |                             ^^^^^^^^^^
   |
   = warning: this changes meaning in Rust 2024
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/rpit-lifetime-capture.html>
note: specifically, this lifetime is in scope but not mentioned in the type's bounds
  --> $DIR/overcaptures-2024.rs:7:10
   |
LL | fn named<'a>(x: &'a i32) -> impl Sized { *x }
   |          ^^
   = note: all lifetimes in scope will be captured by `impl Trait`s in edition 2024
note: the lint level is defined here
  --> $DIR/overcaptures-2024.rs:5:9
   |
LL | #![deny(impl_trait_overcaptures)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^
help: use the precise capturing `use<...>` syntax to make the captures explicit
   |
LL | fn named<'a>(x: &'a i32) -> impl Sized + use<> { *x }
   |                                        +++++++

error: `impl Sized` will capture more lifetimes than possibly intended in edition 2024
  --> $DIR/overcaptures-2024.rs:11:25
   |
LL | fn implicit(x: &i32) -> impl Sized { *x }
   |                         ^^^^^^^^^^
   |
   = warning: this changes meaning in Rust 2024
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/rpit-lifetime-capture.html>
note: specifically, this lifetime is in scope but not mentioned in the type's bounds
  --> $DIR/overcaptures-2024.rs:11:16
   |
LL | fn implicit(x: &i32) -> impl Sized { *x }
   |                ^
   = note: all lifetimes in scope will be captured by `impl Trait`s in edition 2024
help: use the precise capturing `use<...>` syntax to make the captures explicit
   |
LL | fn implicit(x: &i32) -> impl Sized + use<> { *x }
   |                                    +++++++

error: `impl Sized + '_` will capture more lifetimes than possibly intended in edition 2024
  --> $DIR/overcaptures-2024.rs:17:33
   |
LL |     fn hello(&self, x: &i32) -> impl Sized + '_ { self }
   |                                 ^^^^^^^^^^^^^^^
   |
   = warning: this changes meaning in Rust 2024
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/rpit-lifetime-capture.html>
note: specifically, this lifetime is in scope but not mentioned in the type's bounds
  --> $DIR/overcaptures-2024.rs:17:24
   |
LL |     fn hello(&self, x: &i32) -> impl Sized + '_ { self }
   |                        ^
   = note: all lifetimes in scope will be captured by `impl Trait`s in edition 2024
help: use the precise capturing `use<...>` syntax to make the captures explicit
   |
LL |     fn hello(&self, x: &i32) -> impl Sized + '_ + use<'_> { self }
   |                                                 +++++++++

error: `impl Sized` will capture more lifetimes than possibly intended in edition 2024
  --> $DIR/overcaptures-2024.rs:29:47
   |
LL | fn hrtb() -> impl for<'a> Higher<'a, Output = impl Sized> {}
   |                                               ^^^^^^^^^^
   |
   = warning: this changes meaning in Rust 2024
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/rpit-lifetime-capture.html>
note: specifically, this lifetime is in scope but not mentioned in the type's bounds
  --> $DIR/overcaptures-2024.rs:29:23
   |
LL | fn hrtb() -> impl for<'a> Higher<'a, Output = impl Sized> {}
   |                       ^^
   = note: all lifetimes in scope will be captured by `impl Trait`s in edition 2024
help: use the precise capturing `use<...>` syntax to make the captures explicit
   |
LL | fn hrtb() -> impl for<'a> Higher<'a, Output = impl Sized + use<>> {}
   |                                                          +++++++

error: `impl Sized` will capture more lifetimes than possibly intended in edition 2024
  --> $DIR/overcaptures-2024.rs:33:28
   |
LL | fn apit(_: &impl Sized) -> impl Sized {}
   |                            ^^^^^^^^^^
   |
   = warning: this changes meaning in Rust 2024
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/rpit-lifetime-capture.html>
note: specifically, this lifetime is in scope but not mentioned in the type's bounds
  --> $DIR/overcaptures-2024.rs:33:12
   |
LL | fn apit(_: &impl Sized) -> impl Sized {}
   |            ^
   = note: all lifetimes in scope will be captured by `impl Trait`s in edition 2024
note: you could use a `use<...>` bound to explicitly specify captures, but argument-position `impl Trait`s are not nameable
  --> $DIR/overcaptures-2024.rs:33:13
   |
LL | fn apit(_: &impl Sized) -> impl Sized {}
   |             ^^^^^^^^^^
help: use the precise capturing `use<...>` syntax to make the captures explicit
   |
LL | fn apit<T: Sized>(_: &T) -> impl Sized + use<T> {}
   |        ++++++++++     ~                ++++++++

error: `impl Sized` will capture more lifetimes than possibly intended in edition 2024
  --> $DIR/overcaptures-2024.rs:37:38
   |
LL | fn apit2<U>(_: &impl Sized, _: U) -> impl Sized {}
   |                                      ^^^^^^^^^^
   |
   = warning: this changes meaning in Rust 2024
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/rpit-lifetime-capture.html>
note: specifically, this lifetime is in scope but not mentioned in the type's bounds
  --> $DIR/overcaptures-2024.rs:37:16
   |
LL | fn apit2<U>(_: &impl Sized, _: U) -> impl Sized {}
   |                ^
   = note: all lifetimes in scope will be captured by `impl Trait`s in edition 2024
note: you could use a `use<...>` bound to explicitly specify captures, but argument-position `impl Trait`s are not nameable
  --> $DIR/overcaptures-2024.rs:37:17
   |
LL | fn apit2<U>(_: &impl Sized, _: U) -> impl Sized {}
   |                 ^^^^^^^^^^
help: use the precise capturing `use<...>` syntax to make the captures explicit
   |
LL | fn apit2<U, T: Sized>(_: &T, _: U) -> impl Sized + use<U, T> {}
   |           ++++++++++      ~                      +++++++++++

error: `impl Sized` will capture more lifetimes than possibly intended in edition 2024
  --> $DIR/overcaptures-2024.rs:41:37
   |
LL | async fn async_fn<'a>(x: &'a ()) -> impl Sized {}
   |                                     ^^^^^^^^^^
   |
   = warning: this changes meaning in Rust 2024
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/rpit-lifetime-capture.html>
note: specifically, this lifetime is in scope but not mentioned in the type's bounds
  --> $DIR/overcaptures-2024.rs:41:19
   |
LL | async fn async_fn<'a>(x: &'a ()) -> impl Sized {}
   |                   ^^
   = note: all lifetimes in scope will be captured by `impl Trait`s in edition 2024
help: use the precise capturing `use<...>` syntax to make the captures explicit
   |
LL | async fn async_fn<'a>(x: &'a ()) -> impl Sized + use<> {}
   |                                                +++++++

error: `impl Clone` will capture more lifetimes than possibly intended in edition 2024
  --> $DIR/overcaptures-2024.rs:45:28
   |
LL | pub fn parens(x: &i32) -> &impl Clone { x }
   |                            ^^^^^^^^^^
   |
   = warning: this changes meaning in Rust 2024
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/rpit-lifetime-capture.html>
note: specifically, this lifetime is in scope but not mentioned in the type's bounds
  --> $DIR/overcaptures-2024.rs:45:18
   |
LL | pub fn parens(x: &i32) -> &impl Clone { x }
   |                  ^
   = note: all lifetimes in scope will be captured by `impl Trait`s in edition 2024
help: use the precise capturing `use<...>` syntax to make the captures explicit
   |
LL | pub fn parens(x: &i32) -> &(impl Clone + use<>) { x }
   |                            +           ++++++++

error: aborting due to 8 previous errors