-
Notifications
You must be signed in to change notification settings - Fork 22
Explicitly bind lifetimes for NlaBuffer.value() #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
9cd7ce7
to
0d3315f
Compare
Please include unit test case proving your fix. |
0d3315f
to
25702b2
Compare
There you go, also simplified example code a little bit. |
25702b2
to
744528f
Compare
(and one more force-push to fix typo, sorry about that) |
src/nla.rs
Outdated
|
||
// compile-time test, should not result in compiler complaints regarding | ||
// lifetimes or returning values allegedly owned by this function | ||
#[allow(dead_code)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was expecting something like:
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_foo() {
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I can craft some inputs-outputs, but the whole point is that behavior doesn't change at all, it's all about lifetimes. OTOH there are no NlasIterator
tests at all, so there's no redundant work to be done, might as well hit two birds with one stone.
744528f
to
ced8f3b
Compare
I don't like how this test looks, but at least there's no |
d36d580
to
d8ac1ba
Compare
…ifetime-related compiler errors
d8ac1ba
to
c7610c4
Compare
I think I'm done for now. While I don't like |
Without this, the following results in an error: