-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add C API const qualifiers #113
Conversation
unsafe { | ||
core::intrinsics::abort(); | ||
} | ||
core::intrinsics::abort(); |
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.
What happened to make this okay to call without an unsafe
block? The documentation still lists this function as unsafe. (Same question for below)
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.
Ran across this while cleaning up the warnings:
warning: unnecessary `unsafe` block
--> src/lib.rs:232:5
|
232 | unsafe {
| ^^^^^^ unnecessary `unsafe` block
|
= note: `#[warn(unused_unsafe)]` on by default
warning: unnecessary `unsafe` block
--> src/lib.rs:240:5
|
240 | unsafe {
| ^^^^^^ unnecessary `unsafe` block
warning: 2 warnings emitted
Finished dev [unoptimized + debuginfo] target(s) in 0.48s
I haven't chased this one down yet, wonder if we should instead decorate them with allow(unused_unsafe)
for now?
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 believe I found the relevant change. rust-lang/rust#72204. Hasn't hit stable, but c'est la vie. No change necessary here.
@@ -539,20 +538,12 @@ impl<'a> DynamicHistory<'a> { | |||
if external_clock.count == 0 { | |||
continue; | |||
} | |||
let id: TracerId = match external_clock.id.try_into() { |
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.
Good catch that this check isn't strictly necessary anymore.
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.
👍
No description provided.