erikjohnston / synapse-find-unreferenced-state-groups

Finds unreferenced state groups persisted by synapse
MIT License
37 stars 2 forks source link

Doesn't build on rustc 1.48.0 / Debian Bullseye #6

Open olmari opened 2 years ago

olmari commented 2 years ago

Current master of this doesn't build on rustc 1.48.0 that is available with Debian Bullseye repositories, should it?

olmari@morpheus:~/synapse-find-unreferenced-state-groups$ cargo build
   Compiling regex v1.5.4
   Compiling unicode-normalization v0.1.19
   Compiling getrandom v0.2.4
   Compiling parking_lot_core v0.8.5
   Compiling socket2 v0.4.4
   Compiling terminal_size v0.1.17
   Compiling os_str_bytes v6.0.0
   Compiling atty v0.2.14
error[E0658]: the `unsafe_op_in_unsafe_fn` lint is unstable
   --> /home/olmari/.cargo/registry/src/github.com-1ecc6299db9ec823/os_str_bytes-6.0.0/src/lib.rs:159:1
    |
159 | #![forbid(unsafe_op_in_unsafe_fn)]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #71668 <https://github.com/rust-lang/rust/issues/71668> for more information

error[E0658]: use of unstable library feature 'slice_strip'
   --> /home/olmari/.cargo/registry/src/github.com-1ecc6299db9ec823/os_str_bytes-6.0.0/src/raw_str.rs:606:16
    |
606 |         self.0.strip_prefix(pat).map(Self::from_raw_bytes_unchecked)
    |                ^^^^^^^^^^^^
    |
    = note: see issue #73413 <https://github.com/rust-lang/rust/issues/73413> for more information

error[E0658]: use of unstable library feature 'slice_strip'
   --> /home/olmari/.cargo/registry/src/github.com-1ecc6299db9ec823/os_str_bytes-6.0.0/src/raw_str.rs:636:16
    |
636 |         self.0.strip_suffix(pat).map(Self::from_raw_bytes_unchecked)
    |                ^^^^^^^^^^^^
    |
    = note: see issue #73413 <https://github.com/rust-lang/rust/issues/73413> for more information

error[E0658]: use of unstable library feature 'slice_strip'
   --> /home/olmari/.cargo/registry/src/github.com-1ecc6299db9ec823/os_str_bytes-6.0.0/src/raw_str.rs:727:39
    |
727 |         impl_trim_matches!(self, pat, strip_suffix)
    |                                       ^^^^^^^^^^^^
    |
    = note: see issue #73413 <https://github.com/rust-lang/rust/issues/73413> for more information

error[E0658]: use of unstable library feature 'slice_strip'
   --> /home/olmari/.cargo/registry/src/github.com-1ecc6299db9ec823/os_str_bytes-6.0.0/src/raw_str.rs:750:39
    |
750 |         impl_trim_matches!(self, pat, strip_prefix)
    |                                       ^^^^^^^^^^^^
    |
    = note: see issue #73413 <https://github.com/rust-lang/rust/issues/73413> for more information

error: aborting due to 5 previous errors

For more information about this error, try `rustc --explain E0658`.
error: could not compile `os_str_bytes`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

and the rustc --explain E0658 gives:

An unstable feature was used.

Erroneous code example:

'''
#[repr(u128)] // error: use of unstable library feature 'repr128'
enum Foo {
    Bar(u64),
}
'''

If you're using a stable or a beta version of rustc, you won't be able to use
any unstable features. In order to do so, please switch to a nightly version of
rustc (by using rustup).

If you're using a nightly version of rustc, just add the corresponding feature
to be able to use it:

'''
#![feature(repr128)]

#[repr(u128)] // ok!
enum Foo {
    Bar(u64),
}
'''
olmari commented 2 years ago

Tool does build with rust tools installed with https://doc.rust-lang.org/cargo/getting-started/installation.html which gets rustc 1.58.1 (db9d1b20b 2022-01-20) So there is that... But that's per user installation and meh... Then again still manageable at the least, so there's that (I'm starting to hate rust :P ).