microsoft/qdk

Public

mirrored fromhttps://github.com/microsoft/qdkAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
f9ff1026ee0d8ead8c9892e7ca362a90fb72042a

Branches

Tags

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

Clone

HTTPS

Download ZIP

compiler/qsc_eval/src/error.rs

19lines · modecode

1// 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 {
11 pub package: PackageId,
12 pub span: Span,
13}
14
15impl From<PackageSpan> for SourceSpan {
16 fn from(value: PackageSpan) -> Self {
17 Self::from((value.span.lo as usize)..(value.span.hi as usize))
18 }
19}
20