Skip to content

Commit

Permalink
Merge branch 'main' into capital-base-specifier
Browse files Browse the repository at this point in the history
  • Loading branch information
jlapeyre committed Oct 29, 2024
2 parents 25a230b + 9c4fb16 commit 15bf583
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-11, windows-latest]
os: [ubuntu-latest, macos-13, windows-latest]
steps:
- uses: actions/checkout@v3
- name: Rust Format
Expand All @@ -33,7 +33,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-11, windows-latest]
os: [ubuntu-latest, macos-13, windows-latest]
steps:
- uses: actions/checkout@v3
- name: Install Rust toolchain
Expand Down
2 changes: 1 addition & 1 deletion crates/oq3_semantics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ doctest = false
oq3_source_file.workspace = true
oq3_syntax.workspace = true
hashbrown = { version = "0.12.3" }
rowan = "0.15.11"
rowan = {version = "<=0.15.15"}
boolenum = "0.1"

[dev-dependencies]
Expand Down
3 changes: 1 addition & 2 deletions crates/oq3_syntax/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ either = "1.7.0"
indexmap = "2.0.0"
itertools = "0.10.5"
once_cell = "1.17.0"
rowan = "0.15.11"
rowan = {version = "<=0.15.15"}
rustc-hash = "1.1.0"
smol_str = "0.2.0"
stdx = { version = "0.0.188", package = "ra_ap_stdx"}
triomphe = { version = "<= 0.1.11", default-features = false, features = ["std"] }
xshell = "0.2.2"
rustversion = "1.0"
Expand Down
23 changes: 17 additions & 6 deletions crates/oq3_syntax/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@
semicolon_in_expressions_from_macros
)]

#[allow(unused)]
macro_rules! eprintln {
($($tt:tt)*) => { stdx::eprintln!($($tt)*) };
}

mod parsing;
mod ptr;
mod sourcegen;
Expand All @@ -48,7 +43,6 @@ pub mod ted;

use std::marker::PhantomData;

use stdx::format_to;
use triomphe::Arc;

pub use crate::{
Expand Down Expand Up @@ -452,3 +446,20 @@ fn api_walkthrough() {
}
assert_eq!(exprs_cast, exprs_visit);
}

// #229
// This macro is copied from ra_ap_stdx. It is the only feature
// we needed from ra_ap_stdx. But that crate put us in a version bind.
/// Appends formatted string to a `String`.
#[macro_export]
macro_rules! format_to {
($buf:expr) => ();
($buf:expr, $lit:literal $($arg:tt)*) => {
{
use ::std::fmt::Write as _;
// We can't do ::std::fmt::Write::write_fmt($buf, format_args!($lit $($arg)*))
// unfortunately, as that loses out on autoref behavior.
_ = $buf.write_fmt(format_args!($lit $($arg)*))
}
};
}
2 changes: 0 additions & 2 deletions crates/oq3_syntax/src/tests.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// Copyright contributors to the openqasm-parser project
// SPDX-License-Identifier: Apache-2.0

#[cfg(not(feature = "in-rust-tree"))]
mod ast_src;
#[cfg(not(feature = "in-rust-tree"))]
mod sourcegen_ast;

use crate::ast;
Expand Down

0 comments on commit 15bf583

Please sign in to comment.