Skip to content

Commit 896f786

Browse files
committed
Rename chalk-macros to chalk-engine-base and consolidate base types
1 parent 81f76f6 commit 896f786

File tree

33 files changed

+79
-71
lines changed

33 files changed

+79
-71
lines changed

Cargo.lock

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ salsa = "0.10.0"
2121
serde = "1.0"
2222
serde_derive = "1.0"
2323

24-
chalk-macros = { version = "0.10.1-dev", path = "chalk-macros" }
24+
chalk-engine-base = { version = "0.10.1-dev", path = "chalk-engine-base" }
2525
chalk-derive = { version = "0.10.1-dev", path = "chalk-derive" }
2626
chalk-engine = { version = "0.10.1-dev", path = "chalk-engine" }
2727
chalk-ir = { version = "0.10.1-dev", path = "chalk-ir" }

chalk-derive/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ fn derive_zip(mut s: synstructure::Structure) -> TokenStream {
235235
});
236236

237237
// when the two variants are different
238-
quote!((_, _) => Err(::chalk_engine::fallible::NoSolution)).to_tokens(&mut body);
238+
quote!((_, _) => Err(::chalk_engine_base::results::NoSolution)).to_tokens(&mut body);
239239

240240
s.add_bounds(synstructure::AddBounds::None);
241241
s.bound_impl(
@@ -246,7 +246,7 @@ fn derive_zip(mut s: synstructure::Structure) -> TokenStream {
246246
zipper: &mut Z,
247247
a: &Self,
248248
b: &Self,
249-
) -> ::chalk_engine::fallible::Fallible<()>
249+
) -> ::chalk_engine_base::results::Fallible<()>
250250
where
251251
#interner: 'i,
252252
{
@@ -316,7 +316,7 @@ fn derive_fold(mut s: synstructure::Structure) -> TokenStream {
316316
&self,
317317
folder: &mut dyn ::chalk_ir::fold::Folder < 'i, #interner, #target_interner >,
318318
outer_binder: ::chalk_ir::DebruijnIndex,
319-
) -> ::chalk_engine::fallible::Fallible<Self::Result>
319+
) -> ::chalk_engine_base::results::Fallible<Self::Result>
320320
where
321321
#interner: 'i,
322322
#target_interner: 'i,

chalk-macros/Cargo.toml renamed to chalk-engine-base/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
2-
name = "chalk-macros"
2+
name = "chalk-engine-base"
33
version = "0.10.1-dev"
4-
description = "Macros for Chalk"
4+
description = "Base types for Chalk logic engines"
55
license = "Apache-2.0/MIT"
66
authors = ["Rust Compiler Team", "Chalk developers"]
77
repository = "https://github.com/rust-lang/chalk"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Various macros used within Chalk.
1+
Base types used by the SLG and recursive solvers.
22

33
See [Github](https://github.com/rust-lang/chalk) for up-to-date information.

chalk-engine-base/src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#[macro_use]
2+
extern crate lazy_static;
3+
4+
#[macro_use]
5+
mod macros;
6+
pub mod results;
7+
8+
pub use macros::*;
File renamed without changes.

chalk-macros/src/lib.rs renamed to chalk-engine-base/src/macros/mod.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
use std::cell::RefCell;
22

3-
#[macro_use]
4-
extern crate lazy_static;
5-
6-
#[macro_use]
73
mod index;
84

95
lazy_static! {

chalk-engine/src/fallible.rs renamed to chalk-engine-base/src/results.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,8 @@ pub type Fallible<T> = Result<T, NoSolution>;
66
/// cannot be performed.
77
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
88
pub struct NoSolution;
9+
10+
/// Error type for the `UnificationOps::program_clauses` method --
11+
/// indicates that the complete set of program clauses for this goal
12+
/// cannot be enumerated.
13+
pub struct Floundered;

chalk-engine/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ default = []
1515
[dependencies]
1616
rustc-hash = { version = "1.1.0" }
1717

18-
chalk-macros = { version = "0.10.1-dev", path = "../chalk-macros" }
18+
chalk-engine-base = { version = "0.10.1-dev", path = "../chalk-engine-base" }

0 commit comments

Comments
 (0)