These are chat archives for rust-lang/rust

17th
Apr 2018
TatriX
@TatriX
Apr 17 2018 10:19
I want to reuse some utility functions in the integration tests. How can I do this?
Manuel Holtgrewe
@holtgrewe
Apr 17 2018 11:13
Hi, can I somehow import use this trait? https://doc.rust-lang.org/1.1.0/test/stats/trait.Stats.html
Ingvar Stepanyan
@RReverser
Apr 17 2018 11:27
Only on nightly Rust
Or use one of forks of libtest
But I guess it's easier to find something specialised just for stats
Andrey Lesnikov
@ozkriff
Apr 17 2018 11:32
@TatriX move these functions to some other helper crate?
Manuel Holtgrewe
@holtgrewe
Apr 17 2018 12:59
I'm getting an error from cargo build when switching from Ubuntu 16.04 machine to CentOS 7.4. Would anyone care to have a look? I'm using the current nightly on both. https://pastebin.com/87yPJn5U
Christian Witts
@ChristianWitts
Apr 17 2018 13:09
looks like you’re missing glibc-devel packages on your centos machine
Manuel Holtgrewe
@holtgrewe
Apr 17 2018 13:11
Ah, thanks. I had the wrong GCC activated apparently...
Dirk Van Haerenborgh
@vhdirk
Apr 17 2018 17:34
Hi
When creating the notmuch-rs bindings, I used Phantomdata's to link lifetimes of wrappers for raw pointers
The root of these lifetime is Database. From that, you can get a Query<'d> where 'd is the lifetime of the database.
and from Query<'d> you can get a Threads<'q, 'd:'q> iterator, where 'q is the lifetime of the query
what I've been unable to find is how I can have a struct hold the Threads iterator, as well as the Query and Database objects
but I was hoping there'd be a nicer solution?
Dirk Van Haerenborgh
@vhdirk
Apr 17 2018 17:51
or rather: how can I keep using the Threads iterator, keeping the lifetime requirements of Query and Database satisfied?