]> git.lizzy.rs Git - rust.git/blob - src/test/ui/include-macros/mismatched-types.stderr
Require Drop impls to have the same constness on its bounds as the bounds on the...
[rust.git] / src / test / 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 slice `[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 array `[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`.