File: type-mismatch.stderr

package info (click to toggle)
rustc 1.88.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 934,128 kB
  • sloc: xml: 158,127; python: 36,062; javascript: 19,855; sh: 19,700; cpp: 18,947; ansic: 12,993; asm: 4,792; makefile: 690; lisp: 29; perl: 29; ruby: 19; sql: 11
file content (34 lines) | stat: -rw-r--r-- 1,193 bytes parent folder | download | duplicates (9)
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
warning: the feature `unsafe_binders` is incomplete and may not be safe to use and/or cause compiler crashes
  --> $DIR/type-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[E0308]: mismatched types
  --> $DIR/type-mismatch.rs:5:27
   |
LL |     let x: unsafe<> i32 = 0;
   |            ------------   ^ expected `unsafe<> i32`, found integer
   |            |
   |            expected due to this
   |
   = note: expected unsafe binder `unsafe<> i32`
                       found type `{integer}`

error[E0308]: mismatched types
  --> $DIR/type-mismatch.rs:7:33
   |
LL |     let x: unsafe<'a> &'a i32 = &0;
   |            ------------------   ^^ expected `unsafe<'a> &i32`, found `&{integer}`
   |            |
   |            expected due to this
   |
   = note: expected unsafe binder `unsafe<'a> &'a i32`
                  found reference `&{integer}`

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

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