sun::borrow_checker

sun::borrow_checker

namespace · Source (opens in a new tab)

Checks ownership and lifetimes so references cannot outlive their values.

Classes

Structs

Functions

buildBorrowCheckError

public · function · Source (opens in a new tab)

SunError sun::borrow_checker::buildBorrowCheckError(const std::vector< BorrowError > &errors)

Turn the borrow errors of one compilation into the single error the driver throws.

Combines ownership violations into a compiler error with source context.

The first error gives the message and location; every other error and related borrow rides along as a related diagnostic, so printing the error shows them all with carets and a tool catching it (the language server) can point at each one in the source. Requires a non-empty list.

Related: sun::support::SunError, BorrowError

Enums

BorrowKind

public · enum · Source (opens in a new tab)

enum class sun::borrow_checker::BorrowKind

The kind of borrow - determines what operations are allowed.

Shared

Shared

No documentation comment.

Mutable

Mutable

No documentation comment.

Type Aliases