> ## Documentation Index
> Fetch the complete documentation index at: https://docs.starknet.io/llms.txt
> Use this file to discover all available pages before exploring further.

# core::internal::bounded_int::upcast

Upcasts `FromType` to `ToType` - for types where conversion is always legal.
If done for wrong types would cause a compiler panic at the Sierra stage.

## Signature

```rust theme={null}
pub extern fn upcast(x: FromType) -> ToType nopanic;
```
