//! > Hover
//! > test_runner_name
test_hover
//! > cairo_project.toml
[crate_roots]
hello = "src"
[config.global]
edition = "2023_11"
//! > cairo_code
const SOME_CONST: felt252 = 0x<caret>123;
const WRONG_TYPE_CONST: u8 = 123_<caret>felt252;
/// Declares many variables and does nothing.
fn many_variables() {
let a = 'short<caret>_string';
let b: ByteArray = "normal_string<caret>";
let c = <caret>0x21_felt252;
let d = 0x3<caret>3_u32;
let e = 5<caret>0;
let f = 0b<caret>1111;
let g = 0o<caret>77;
}
/// Declares many variables generating errors.
fn many_wrong_variables() {
let a: u32 = 0x<caret>170_felt252;
let b: u8 = "some_st<caret>ring";
let c: u8 = 0x<caret>fff;
}
//! > hover #0
// = source context
const SOME_CONST: felt252 = 0x<caret>123;
// = highlight
const SOME_CONST: felt252 = <sel>0x123</sel>;
// = popover
```cairo
core::felt252
```
---
value of literal: `291 (0x123 | 0b100100011)`
//! > hover #1
// = source context
const WRONG_TYPE_CONST: u8 = 123_<caret>felt252;
// = highlight
const WRONG_TYPE_CONST: u8 = <sel>123_felt252</sel>;
// = popover
```cairo
core::felt252
```
---
value of literal: `123 (0x7b | 0b1111011)`
//! > hover #2
// = source context
let a = 'short<caret>_string';
// = highlight
let a = <sel>'short_string'</sel>;
// = popover
```cairo
core::felt252
```
---
value of literal: `'short_string' (0x73686f72745f737472696e67)`
//! > hover #3
// = source context
let b: ByteArray = "normal_string<caret>";
// = highlight
let b: ByteArray = <sel>"normal_string"</sel>;
// = popover
```cairo
core::byte_array::ByteArray
```
//! > hover #4
// = source context
let c = <caret>0x21_felt252;
// = highlight
let c = <sel>0x21_felt252</sel>;
// = popover
```cairo
core::felt252
```
---
value of literal: `33 (0x21 | 0b100001)`
//! > hover #5
// = source context
let d = 0x3<caret>3_u32;
// = highlight
let d = <sel>0x33_u32</sel>;
// = popover
```cairo
core::integer::u32
```
---
value of literal: `51 (0x33 | 0b110011)`
//! > hover #6
// = source context
let e = 5<caret>0;
// = highlight
let e = <sel>50</sel>;
// = popover
```cairo
core::felt252
```
---
value of literal: `50 (0x32 | 0b110010)`
//! > hover #7
// = source context
let f = 0b<caret>1111;
// = highlight
let f = <sel>0b1111</sel>;
// = popover
```cairo
core::felt252
```
---
value of literal: `15 (0xf | 0b1111)`
//! > hover #8
// = source context
let g = 0o<caret>77;
// = highlight
let g = <sel>0o77</sel>;
// = popover
```cairo
core::felt252
```
---
value of literal: `63 (0x3f | 0b111111)`
//! > hover #9
// = source context
let a: u32 = 0x<caret>170_felt252;
// = highlight
let a: u32 = <sel>0x170_felt252</sel>;
// = popover
```cairo
core::felt252
```
---
value of literal: `368 (0x170 | 0b101110000)`
//! > hover #10
// = source context
let b: u8 = "some_st<caret>ring";
// = highlight
let b: u8 = <sel>"some_string"</sel>;
// = popover
```cairo
core::integer::u8
```
//! > hover #11
// = source context
let c: u8 = 0x<caret>fff;
// = highlight
let c: u8 = <sel>0xfff</sel>;
// = popover
```cairo
core::integer::u8
```
---
value of literal: `4095 (0xfff | 0b111111111111)`