I have a bit of a dilemma.
Prompted by a discussion in another thread just now I was playing around with writing some Rust that did not use std or core. I ended up with rustc crashing out with a stack dump and some messages. Including:
error: the compiler unexpectedly panicked. This is a bug
note: please attach the file at `...../rustc-ice-2026-08-20T11_40_13-22125.txt` to your bug report
Normally I would be looking where to send a bug report at this point.
But here is my dilemma: My code example was not written by me. It is the result of cycles of prompting my AI friend, seeing compile errors and prompting again. In the current atmosphere I see many projects are allergic to AI generated input from random users. Which I can understand.
So, should I report it or not?
Here is the code:
#![feature(no_core, lang_items, intrinsics, rustc_attrs)]
#![no_core]
#![no_main]
// --- Minimal Modern Layout Primitives ---
#[lang = "pointee_sized"]
pub trait PointeeSized {}
#[lang = "meta_sized"]
pub trait MetaSized: PointeeSized {}
#[lang = "sized"]
pub trait Sized: MetaSized {}
#[lang = "copy"]
pub trait Copy {}
impl Copy for i32 {}
// --- The Exact Internal Intrinsic ---
// 'unchecked_shl' is the concrete string rustc uses for raw bit-shifting.
#[rustc_intrinsic]
pub unsafe fn unchecked_shl(x: i32, y: i32) -> i32 {
loop {}
}
// --- Independent Logic Function ---
#[inline(always)]
pub fn double_i32(val: i32) -> i32 {
unsafe { unchecked_shl(val, 1) }
}
// --- Entry Point & Stubbed External Symbols ---
extern "C" {
fn rust_begin_unwind() -> !;
}
#[no_mangle]
pub extern "C" fn _start() -> ! {
let num: i32 = 21;
let _result = double_i32(num);
loop {}
}
This is how I build it:
rustc --version
rustc 1.99.0-nightly (3d6c19bb9 2026-08-11)
rustc compiler_bug.rs