Skip to content

Commit 320a42f

Browse files
authored
Merge pull request #151 from nikomatsakis/publish-formality-core
Publish formality core
2 parents 3691f7c + 0b3ef4b commit 320a42f

File tree

15 files changed

+64
-42
lines changed

15 files changed

+64
-42
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
[package]
2-
name = "formality"
2+
name = "a-mir-formality"
33
version = "0.1.0"
44
edition = "2021"
5+
license = "MIT OR Apache-2.0"
6+
description = "Model of the Rust type system maintained by the Rust types team (in development)"
7+
homepage = "https://rust-lang.github.io/a-mir-formality/"
8+
repository = "https://github.com/rust-lang/a-mir-formality/"
9+
readme = "README.md"
510

611
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
712

crates/formality-core/Cargo.toml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
[package]
22
name = "formality-core"
3-
version = "0.1.0"
3+
version = "0.1.1"
44
edition = "2021"
5+
license = "MIT OR Apache-2.0"
6+
description = "Language-independent formality system used by a-mir-formality"
7+
homepage = "https://rust-lang.github.io/a-mir-formality/"
8+
repository = "https://github.com/rust-lang/a-mir-formality/"
9+
readme = "README.md"
510

611
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
712

813
[dependencies]
914
lazy_static = "1.4.0"
10-
env_logger = "*"
15+
env_logger = "0.10.0"
1116
stacker = "0.1.15"
1217
tracing = "0.1"
1318
tracing-subscriber = {version = "0.3", default-features = false, features = ["env-filter", "fmt"]}
1419
tracing-tree = { version = "0.2" }
15-
formality-macros = { path = "../formality-macros" }
20+
formality-macros = { version = "0.1.0", path = "../formality-macros" }
1621
anyhow = "1.0.75"
1722
contracts = "0.6.3"
1823

crates/formality-core/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# formality-core
2+
3+
`formality_core` is the language independent part of a-mir-formality.
4+
It can be reused by other projects looking to model formal semantics of languages besides Rust.

crates/formality-macros/Cargo.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
name = "formality-macros"
33
version = "0.1.0"
44
edition = "2021"
5+
license = "MIT OR Apache-2.0"
6+
description = "Macros used by a-mir-formality and formality-core"
7+
homepage = "https://rust-lang.github.io/a-mir-formality/"
8+
repository = "https://github.com/rust-lang/a-mir-formality/"
59

610
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
711

@@ -11,8 +15,8 @@ proc-macro = true
1115
[dependencies]
1216
quote = "1.0.21"
1317
proc-macro2 = "1.0"
14-
syn = "1.0.102"
15-
synstructure = "0.12.6"
18+
syn = { version = "2.0", features = ["full"] }
19+
synstructure = "0.13.0"
1620
tracing = "0.1"
1721
convert_case = "0.6.0"
1822

crates/formality-macros/READE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# formality-macros
2+
3+
Procedural macros used by the formality system.
4+
Don't import this crate directly.
5+
Check out formality-core instead.

crates/formality-macros/src/cast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,5 +91,5 @@ fn downcast_to_variant(s: &synstructure::Structure, v: &VariantInfo) -> TokenStr
9191
}
9292

9393
pub(crate) fn has_cast_attr(attrs: &[Attribute]) -> bool {
94-
attrs.iter().any(|a| a.path.is_ident("cast"))
94+
attrs.iter().any(|a| a.path().is_ident("cast"))
9595
}

crates/formality-macros/src/debug.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ fn debug_variant_with_attr(
237237
}
238238

239239
fn get_grammar_attr(attrs: &[Attribute]) -> Option<syn::Result<FormalitySpec>> {
240-
let attr = attrs.iter().find(|a| a.path.is_ident("grammar"))?;
240+
let attr = attrs.iter().find(|a| a.path().is_ident("grammar"))?;
241241
Some(attr.parse_args())
242242
}
243243

crates/formality-macros/src/parse.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ fn lookahead(for_field: &Ident, op: Option<&FormalitySpecOp>) -> syn::Result<Lit
206206
}
207207

208208
fn get_grammar_attr(attrs: &[Attribute]) -> Option<syn::Result<FormalitySpec>> {
209-
let attr = attrs.iter().find(|a| a.path.is_ident("grammar"))?;
209+
let attr = attrs.iter().find(|a| a.path().is_ident("grammar"))?;
210210
Some(attr.parse_args())
211211
}
212212

crates/formality-macros/src/term.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ fn remove_formality_attributes(input: &mut DeriveInput) {
4040
for variant in &mut v.variants {
4141
variant
4242
.attrs
43-
.retain(|attr| !attr.path.is_ident("grammar") && !attr.path.is_ident("cast"));
43+
.retain(|attr| !attr.path().is_ident("grammar") && !attr.path().is_ident("cast"));
4444
}
4545
}
4646
}

0 commit comments

Comments
 (0)