PonasKovas/rlaunch

Fails to build on i386: error[E0308]: mismatched types

yurivict opened this issue · 2 comments

error[E0308]: mismatched types
  --> src/x11.rs:87:17
   |
87 |                 root,
   |                 ^^^^ expected `u64`, found `u32`
   |
help: you can convert a `u32` to a `u64`
   |
87 |                 root: root.into(),
   |                 +++++     +++++++

error[E0308]: mismatched types
   --> src/x11.rs:105:17
    |
103 |             (self.xlib.XQueryPointer)(
    |             ------------------------- arguments to this function are incorrect
104 |                 self.display,
105 |                 self.root,
    |                 ^^^^^^^^^ expected `u32`, found `u64`
    |
help: you can convert a `u64` to a `u32` and panic if the converted value doesn't fit
    |
105 |                 self.root.try_into().unwrap(),
    |                          ++++++++++++++++++++

error[E0308]: mismatched types
   --> src/x11.rs:126:21
    |
124 |                 window: (self.xlib.XCreateWindow)(
    |                         ------------------------- arguments to this function are incorrect
125 |                     self.display,
126 |                     self.root,
    |                     ^^^^^^^^^ expected `u32`, found `u64`
    |
help: you can convert a `u64` to a `u32` and panic if the converted value doesn't fit
    |
126 |                     self.root.try_into().unwrap(),
    |                              ++++++++++++++++++++

error[E0308]: mismatched types
   --> src/x11.rs:124:25
    |
124 |                   window: (self.xlib.XCreateWindow)(
    |  _________________________^
125 | |                     self.display,
126 | |                     self.root,
127 | |                     pos.0,
..   |
136 | |                     &mut attributes,
137 | |                 ),
    | |_________________^ expected `u64`, found `u32`

error[E0308]: mismatched types
   --> src/x11.rs:143:50
    |
143 |             (self.xlib.XMapRaised)(self.display, window.window);
    |             ----------------------               ^^^^^^^^^^^^^ expected `u32`, found `u64`
    |             |
    |             arguments to this function are incorrect
    |
help: you can convert a `u64` to a `u32` and panic if the converted value doesn't fit
    |
143 |             (self.xlib.XMapRaised)(self.display, window.window.try_into().unwrap());
    |                                                               ++++++++++++++++++++

error[E0308]: mismatched types
   --> src/x11.rs:151:21
    |
149 |                 (self.xlib.XGrabKeyboard)(
    |                 ------------------------- arguments to this function are incorrect
150 |                     self.display,
151 |                     self.root,
    |                     ^^^^^^^^^ expected `u32`, found `u64`
    |
help: you can convert a `u64` to a `u32` and panic if the converted value doesn't fit
    |
151 |                     self.root.try_into().unwrap(),
    |                              ++++++++++++++++++++

error[E0308]: mismatched types
   --> src/x11.rs:178:63
    |
178 |             let draw = (self.xft.XftDrawCreate)(self.display, window.window, visual, cmap);
    |                        ------------------------               ^^^^^^^^^^^^^ expected `u32`, found `u64`
    |                        |
    |                        arguments to this function are incorrect
    |
help: you can convert a `u64` to a `u32` and panic if the converted value doesn't fit
    |
178 |             let draw = (self.xft.XftDrawCreate)(self.display, window.window.try_into().unwrap(), visual, cmap);
    |                                                                            ++++++++++++++++++++

error[E0308]: mismatched types
   --> src/x11.rs:181:17
    |
181 |                 cmap,
    |                 ^^^^ expected `u64`, found `u32`
    |
help: you can convert a `u32` to a `u64`
    |
181 |                 cmap: cmap.into(),
    |                 +++++     +++++++

error[E0308]: mismatched types
   --> src/x11.rs:196:17
    |
193 |             (self.xft.XftColorAllocName)(
    |             ---------------------------- arguments to this function are incorrect
..
196 |                 trc.cmap,
    |                 ^^^^^^^^ expected `u32`, found `u64`
    |
help: you can convert a `u64` to a `u32` and panic if the converted value doesn't fit
    |
196 |                 trc.cmap.try_into().unwrap(),
    |                         ++++++++++++++++++++

error[E0308]: mismatched types
   --> src/x11.rs:210:57
    |
210 |                 gc: (self.xlib.XCreateGC)(self.display, window.window, 0, &mut xgc_values),
    |                     ---------------------               ^^^^^^^^^^^^^ expected `u32`, found `u64`
    |                     |
    |                     arguments to this function are incorrect
    |
help: you can convert a `u64` to a `u32` and panic if the converted value doesn't fit
    |
210 |                 gc: (self.xlib.XCreateGC)(self.display, window.window.try_into().unwrap(), 0, &mut xgc_values),
    |                                                                      ++++++++++++++++++++

error[E0308]: mismatched types
   --> src/x11.rs:251:61
    |
251 |             (self.xlib.XSetForeground)(self.display, gc.gc, color);
    |             --------------------------                      ^^^^^ expected `u32`, found `u64`
    |             |
    |             arguments to this function are incorrect
    |
help: you can convert a `u64` to a `u32` and panic if the converted value doesn't fit
    |
251 |             (self.xlib.XSetForeground)(self.display, gc.gc, color.try_into().unwrap());
    |                                                                  ++++++++++++++++++++

error[E0308]: mismatched types
   --> src/x11.rs:252:54
    |
252 |             (self.xlib.XFillRectangle)(self.display, gc.window, gc.gc, x, y, width, height);
    |             --------------------------               ^^^^^^^^^ expected `u32`, found `u64`
    |             |
    |             arguments to this function are incorrect
    |
help: you can convert a `u64` to a `u32` and panic if the converted value doesn't fit
    |
252 |             (self.xlib.XFillRectangle)(self.display, gc.window.try_into().unwrap(), gc.gc, x, y, width, height);
    |                                                               ++++++++++++++++++++

For more information about this error, try `rustc --explain E0308`.
error: could not compile `rlaunch` due to 12 previous errors

Version: 1.3.13

This should be trivial to fix, not sure when I'll have time to do it, but will try to come back as soon as I can

Should be fixed by 8e3d22f. Sorry it took so long