]> git.proxmox.com Git - rustc.git/blob - tests/ui/include-macros/mismatched-types.stderr
New upstream version 1.69.0+dfsg1
[rustc.git] / tests / ui / include-macros / mismatched-types.stderr
1 error[E0308]: mismatched types
2 --> $DIR/mismatched-types.rs:2:20
3 |
4 LL | let b: &[u8] = include_str!("file.txt");
5 | ----- ^^^^^^^^^^^^^^^^^^^^^^^^ expected `&[u8]`, found `&str`
6 | |
7 | expected due to this
8 |
9 = note: expected reference `&[u8]`
10 found reference `&'static str`
11 = note: this error originates in the macro `include_str` (in Nightly builds, run with -Z macro-backtrace for more info)
12
13 error[E0308]: mismatched types
14 --> $DIR/mismatched-types.rs:3:19
15 |
16 LL | let s: &str = include_bytes!("file.txt");
17 | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&str`, found `&[u8; 0]`
18 | |
19 | expected due to this
20 |
21 = note: expected reference `&str`
22 found reference `&'static [u8; 0]`
23 = note: this error originates in the macro `include_bytes` (in Nightly builds, run with -Z macro-backtrace for more info)
24
25 error: aborting due to 2 previous errors
26
27 For more information about this error, try `rustc --explain E0308`.