Closed
Description
Problem
A Certain combination of lifetime bounds cause compiler to exit with a non-zero status.
Appears to be reproducible only on Linux. Compiles as expected on MacOs with similar versions of rustup and cargo.
Steps
pub trait SomeTrait {}
struct SomeGeneric<T>{
field : T
}
pub type SomeType<T: 'static + SomeTrait + ?Sized> = SomeGeneric<T>;
- Attempt to compile above code via
cargo build
Notes
Removing any one of the above bounds results in a successful compilation, e.g:
type | compiles correctly |
---|---|
pub type SomeType<T: 'static + SomeTrait > = SomeGeneric; | ✔️ |
pub type SomeType<T: 'static + ?Sized> = SomeGeneric; | ✔️ |
pub type SomeType<T: SomeTrait + ?Sized> = SomeGeneric; | ✔️ |
pub type SomeType<T: 'static + SomeTrait + ?Sized> = SomeGeneric; | ❌ |
cargo | 1.41.0 (626f0f40e 2019-12-03) |
---|---|
rustup | 1.21.1 (7832b2ebe 2019-12-20) |
toolchain | stable-x86_64-unknown-linux-gnu |
# lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic
Metadata
Metadata
Assignees
Labels
No labels