about summary refs log tree commit diff
path: root/tests/ui/traits/next-solver/specialization-transmute.stderr
blob: 8bd290ea19707ccfda5f7879308433f5a4d80ce7 (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
warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
  --> $DIR/specialization-transmute.rs:2:12
   |
LL | #![feature(specialization)]
   |            ^^^^^^^^^^^^^^
   |
   = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
   = help: consider using `min_specialization` instead, which is more stable and complete
   = note: `#[warn(incomplete_features)]` on by default

error[E0308]: mismatched types
  --> $DIR/specialization-transmute.rs:14:9
   |
LL |     fn intu(&self) -> &Self::Id {
   |                       --------- expected `&<T as Default>::Id` because of return type
LL |         self
   |         ^^^^ types differ
   |
   = note: expected reference `&<T as Default>::Id`
              found reference `&T`

error[E0271]: type mismatch resolving `<u8 as Default>::Id == Option<NonZero<u8>>`
  --> $DIR/specialization-transmute.rs:25:50
   |
LL |     let s = transmute::<u8, Option<NonZero<u8>>>(0);
   |             ------------------------------------ ^ types differ
   |             |
   |             required by a bound introduced by this call
   |
note: required by a bound in `transmute`
  --> $DIR/specialization-transmute.rs:18:25
   |
LL | fn transmute<T: Default<Id = U>, U: Copy>(t: T) -> U {
   |                         ^^^^^^ required by this bound in `transmute`

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

Some errors have detailed explanations: E0271, E0308.
For more information about an error, try `rustc --explain E0271`.