//! > Hover

//! > test_runner_name
test_hover

//! > cairo_project.toml
[crate_roots]
hello = "src"

[config.global]
edition = "2023_11"

//! > src/lib.cairo
fn main() {
    let mut x<caret> = 5;
    p<caret>rintln!("The value of x is: {}", x);
    x<caret> = <caret>a<caret>dd_two<caret>(x);

    front<caret>_of_house::ho<caret>sting::add<caret>_to_waitlist();
}

/// `add_two` documentation.
fn add_t<caret>wo(x: u32) -> u32 { x + 2 }

/// Rectangle struct.
#[derive(Copy, Drop)]
struct Rectangle {
    /// Width of the rectangle.
    width: u64,
    /// Height of the rectangle.
    height: u64,
}

/// Rectangle trait.
trait RectangleTrait {
    /// Calculate the area of the rectangle.
    fn area(self: @Rec<caret>tangle) -> u64;
}

/// Implementing the `RectangleTrait` for the `Rectangle` struct.
impl RectangleImpl of RectangleTrait {
    fn area(self: @Rec<caret>tangle) -> u64 {
        (*self.wi<caret>dth) * (*self.height)
    }
}

/// Testing `#[generate_trait]` attribute.
#[generate_trait]
impl RectangleImpl2 of RectangleTrait2 {
    /// Calculate the area of the rectangle #2.
    fn area(self: @Rec<caret>tangle) -> u64 {
        (*self.wi<caret>dth) * (*self.height)
    }
}

enum Coin {
    Penny,
}

fn value_in_cents(coin: C<caret>oin) -> felt252 {
    match coin {
        Coin::P<caret>enny => 1,
    }
}

/// Front of house module.
pub mod front_of_house {
    /// Hosting module.
    pub mod hosting {
        /// Add to waitlist function.
        pub fn add_to_waitlist() {}
    }
}

//! > hover 1:13
// = source context
    let mut x<caret> = 5;
// = highlight
No highlight information.
// = popover
Type: `core::integer::u32`

//! > hover 2:5
// = source context
    p<caret>rintln!("The value of x is: {}", x);
// = highlight
No highlight information.
// = popover
```cairo
()
```

//! > hover 3:5
// = source context
    x<caret> = add_two(x);
// = highlight
    <sel>x</sel> = add_two(x);
// = popover
```cairo
let mut x: core::integer::u32
```

//! > hover 3:8
// = source context
    x = <caret>add_two(x);
// = highlight
    x = <sel>add_two</sel>(x);
// = popover
```cairo
fn add_two(x: u32) -> u32
```
---
`add_two` documentation.

//! > hover 3:9
// = source context
    x = a<caret>dd_two(x);
// = highlight
    x = <sel>add_two</sel>(x);
// = popover
```cairo
fn add_two(x: u32) -> u32
```
---
`add_two` documentation.

//! > hover 3:15
// = source context
    x = add_two<caret>(x);
// = highlight
    x = <sel>add_two</sel>(x);
// = popover
```cairo
fn add_two(x: u32) -> u32
```
---
`add_two` documentation.

//! > hover 5:9
// = source context
    front<caret>_of_house::hosting::add_to_waitlist();
// = highlight
No highlight information.
// = popover
```cairo
fn add_to_waitlist() -> ()
```

//! > hover 5:22
// = source context
    front_of_house::ho<caret>sting::add_to_waitlist();
// = highlight
No highlight information.
// = popover
```cairo
fn add_to_waitlist() -> ()
```

//! > hover 5:32
// = source context
    front_of_house::hosting::add<caret>_to_waitlist();
// = highlight
    front_of_house::hosting::<sel>add_to_waitlist</sel>();
// = popover
```cairo
pub fn add_to_waitlist()
```
---
Add to waitlist function.

//! > hover 9:8
// = source context
fn add_t<caret>wo(x: u32) -> u32 { x + 2 }
// = highlight
No highlight information.
// = popover

//! > hover 23:22
// = source context
    fn area(self: @Rec<caret>tangle) -> u64;
// = highlight
    fn area(self: @<sel>Rectangle</sel>) -> u64;
// = popover
```cairo
struct Rectangle {
    /// Width of the rectangle.
    width: u64,
    /// Height of the rectangle.
    height: u64,
}

```
---
Rectangle struct.

//! > hover 28:22
// = source context
    fn area(self: @Rec<caret>tangle) -> u64 {
// = highlight
    fn area(self: @<sel>Rectangle</sel>) -> u64 {
// = popover
```cairo
struct Rectangle {
    /// Width of the rectangle.
    width: u64,
    /// Height of the rectangle.
    height: u64,
}

```
---
Rectangle struct.

//! > hover 29:17
// = source context
        (*self.wi<caret>dth) * (*self.height)
// = highlight
No highlight information.
// = popover
```cairo
@core::integer::u64
```

//! > hover 37:22
// = source context
    fn area(self: @Rec<caret>tangle) -> u64 {
// = highlight
    fn area(self: @<sel>Rectangle</sel>) -> u64 {
// = popover
```cairo
struct Rectangle {
    /// Width of the rectangle.
    width: u64,
    /// Height of the rectangle.
    height: u64,
}

```
---
Rectangle struct.

//! > hover 38:17
// = source context
        (*self.wi<caret>dth) * (*self.height)
// = highlight
No highlight information.
// = popover
```cairo
@core::integer::u64
```

//! > hover 46:25
// = source context
fn value_in_cents(coin: C<caret>oin) -> felt252 {
// = highlight
fn value_in_cents(coin: <sel>Coin</sel>) -> felt252 {
// = popover
```cairo

enum Coin {
    Penny,
}

```

//! > hover 48:15
// = source context
        Coin::P<caret>enny => 1,
// = highlight
        Coin::<sel>Penny</sel> => 1,
// = popover
```cairo

enum Coin {
    Penny,
}

```
