summaryrefslogtreecommitdiffstats
path: root/tests/ui/regions/regions-bounded-by-trait-requiring-static.stderr
blob: eea68cc8f1c5bc245ccb638906632caca6eefc38 (plain)
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
error: lifetime may not live long enough
  --> $DIR/regions-bounded-by-trait-requiring-static.rs:22:5
   |
LL | fn param_not_ok<'a>(x: &'a isize) {
   |                 -- lifetime `'a` defined here
LL |     assert_send::<&'a isize>();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`

error: lifetime may not live long enough
  --> $DIR/regions-bounded-by-trait-requiring-static.rs:27:5
   |
LL | fn param_not_ok1<'a>(_: &'a isize) {
   |                  -- lifetime `'a` defined here
LL |     assert_send::<&'a str>();
   |     ^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`

error: lifetime may not live long enough
  --> $DIR/regions-bounded-by-trait-requiring-static.rs:32:5
   |
LL | fn param_not_ok2<'a>(_: &'a isize) {
   |                  -- lifetime `'a` defined here
LL |     assert_send::<&'a [isize]>();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`

error: lifetime may not live long enough
  --> $DIR/regions-bounded-by-trait-requiring-static.rs:47:5
   |
LL | fn box_with_region_not_ok<'a>() {
   |                           -- lifetime `'a` defined here
LL |     assert_send::<Box<&'a isize>>();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`

error: lifetime may not live long enough
  --> $DIR/regions-bounded-by-trait-requiring-static.rs:59:5
   |
LL | fn unsafe_ok2<'a>(_: &'a isize) {
   |               -- lifetime `'a` defined here
LL |     assert_send::<*const &'a isize>();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`

error: lifetime may not live long enough
  --> $DIR/regions-bounded-by-trait-requiring-static.rs:64:5
   |
LL | fn unsafe_ok3<'a>(_: &'a isize) {
   |               -- lifetime `'a` defined here
LL |     assert_send::<*mut &'a isize>();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`

error: aborting due to 6 previous errors