mirror of
				https://github.com/bspeice/qadapt
				synced 2025-11-03 18:10:37 -05:00 
			
		
		
		
	Handle release mode compiler seeing through us
This commit is contained in:
		@ -21,6 +21,11 @@ fn into_box() -> Box<usize> {
 | 
			
		||||
#[test]
 | 
			
		||||
#[should_panic]
 | 
			
		||||
fn early_return_boxing() {
 | 
			
		||||
    if cfg!(debug_assertions) {
 | 
			
		||||
        // The release-mode compiler is able to optimize through the Box
 | 
			
		||||
        into_box();
 | 
			
		||||
    } else {
 | 
			
		||||
        panic!("Intentional")
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user