File: mismatch.stderr

package info (click to toggle)
rustc 1.85.0%2Bdfsg3-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, 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 (68 lines) | stat: -rw-r--r-- 2,195 bytes parent folder | download | duplicates (3)
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
warning: the feature `unsafe_binders` is incomplete and may not be safe to use and/or cause compiler crashes
  --> $DIR/mismatch.rs:1:12
   |
LL | #![feature(unsafe_binders)]
   |            ^^^^^^^^^^^^^^
   |
   = note: see issue #130516 <https://github.com/rust-lang/rust/issues/130516> for more information
   = note: `#[warn(incomplete_features)]` on by default

error: unsafe binder casts are not fully implemented
  --> $DIR/mismatch.rs:7:46
   |
LL |     let _: unsafe<'a> &'a i32 = wrap_binder!(&());
   |                                              ^^^

error[E0308]: mismatched types
  --> $DIR/mismatch.rs:7:46
   |
LL |     let _: unsafe<'a> &'a i32 = wrap_binder!(&());
   |                                              ^^^ expected `&i32`, found `&()`
   |
   = note: expected reference `&i32`
              found reference `&()`

error: unsafe binder casts are not fully implemented
  --> $DIR/mismatch.rs:13:31
   |
LL |     let _: i32 = wrap_binder!(&());
   |                               ^^^

error: `wrap_binder!()` can only wrap into unsafe binder, not `i32`
  --> $DIR/mismatch.rs:13:18
   |
LL |     let _: i32 = wrap_binder!(&());
   |                  ^^^^^^^^^^^^^^^^^
   |
   = note: unsafe binders are the only valid output of wrap
   = note: this error originates in the macro `wrap_binder` (in Nightly builds, run with -Z macro-backtrace for more info)

error: unsafe binder casts are not fully implemented
  --> $DIR/mismatch.rs:20:20
   |
LL |     unwrap_binder!(y);
   |                    ^

error: expected unsafe binder, found integer as input of `unwrap_binder!()`
  --> $DIR/mismatch.rs:20:20
   |
LL |     unwrap_binder!(y);
   |                    ^
   |
   = note: only an unsafe binder type can be unwrapped

error: unsafe binder casts are not fully implemented
  --> $DIR/mismatch.rs:27:20
   |
LL |     unwrap_binder!(unknown);
   |                    ^^^^^^^

error: unsafe binder casts are not fully implemented
  --> $DIR/mismatch.rs:34:26
   |
LL |     let x = wrap_binder!(&42);
   |                          ^^^

error: aborting due to 8 previous errors; 1 warning emitted

For more information about this error, try `rustc --explain E0308`.