microsoft/qdk

Public

mirrored from https://github.com/microsoft/qdkAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v1.28.0

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

source/compiler/qsc_eval/src/error.rs

19lines · modeblame

e7cc503bMine Starks2 years ago1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4use miette::SourceSpan;
5use qsc_data_structures::span::Span;
6use qsc_hir::hir::PackageId;
7use std::fmt::Debug;
8
9#[derive(Clone, Copy, Debug)]
10pub struct PackageSpan {
11pub package: PackageId,
12pub span: Span,
13}
14
15impl From<PackageSpan> for SourceSpan {
16fn from(value: PackageSpan) -> Self {
17Self::from((value.span.lo as usize)..(value.span.hi as usize))
18}
19}