-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
ICE: unsafe_destructor and pointer to Sized? T #17959
Labels
A-DSTs
Area: Dynamically-sized types (DSTs)
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Comments
With small changes in source code rustc produces slightly different error. Here is changed version (note addition of GBox):
And here is error (differs in error message, stacktrace looks very similiar):
Hope that helps. |
Possibly related: #16758 |
Any news on that one? |
Adapted this code to modern syntax: #![feature(unsafe_destructor)]
extern crate core;
use core::ops::Drop;
trait Bar {}
struct G<T: ?Sized> {
_ptr: *const T
}
#[unsafe_destructor]
impl<T> Drop for G<T> {
fn drop(&mut self) {
if !self._ptr.is_null() {
}
}
}
fn main() {
let x:G<Bar>;
} It doesn't compile, but it doesn't ICE:
|
lnicola
pushed a commit
to lnicola/rust
that referenced
this issue
Aug 29, 2024
fix: add extra_test_bin_args to test explorer test runner `@HKalbasi` I thought I included this in rust-lang#17470 but it appears not so I have created a new issue rust-lang#17959 for this fix.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-DSTs
Area: Dynamically-sized types (DSTs)
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Hit this while trying to get Rc to work with Traits inside, here is error and trace:
Here is minimal example that produces error:
I'm using rust from master installed via
brew install --HEAD rust
, version:rustc 0.13.0-dev
.The text was updated successfully, but these errors were encountered: