Skip to content

Commit 4061896

Browse files
authored
Merge branch 'master' into GAT-step3
2 parents a9ebee0 + 7b21259 commit 4061896

File tree

16 files changed

+205
-46
lines changed

16 files changed

+205
-46
lines changed

Cargo.lock

Lines changed: 9 additions & 18 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
@@ -30,7 +30,7 @@ version = "0.1.0"
3030
path = "chalk-macros"
3131

3232
[dependencies.chalk-engine]
33-
version = "0.5.0"
33+
version = "0.6.0"
3434
path = "chalk-engine"
3535

3636
[workspace]

chalk-engine/Cargo.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "chalk-engine"
3-
version = "0.5.0"
3+
version = "0.6.0"
44
description = "Core trait engine from Chalk project"
55
license = "Apache-2.0/MIT"
66
authors = ["Rust Compiler Team", "Chalk developers"]
@@ -9,13 +9,12 @@ readme = "README.md"
99
keywords = ["compiler", "traits", "prolog"]
1010

1111
[features]
12-
default = ["stack_protection", "stabler"]
12+
default = ["stack_protection"]
1313
stack_protection = ["stacker"]
14-
stabler = ["fxhash"]
1514

1615
[dependencies]
1716
stacker = { version = "0.1.2", optional = true }
18-
fxhash = { version = "0.2.1", optional = true }
17+
rustc-hash = { version = "1.0.0" }
1918

2019
[dependencies.chalk-macros]
2120
version = "0.1.0"

chalk-engine/src/hashmap.rs

Lines changed: 0 additions & 8 deletions
This file was deleted.

chalk-engine/src/lib.rs

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,35 +56,30 @@
5656
#![feature(step_trait)]
5757
#![feature(non_modrs_mods)]
5858
#![feature(rustc_private)]
59-
6059
//FIXME(2018-05-14): In rustc we build using beta and dyn trait is still unstable right now, so we
6160
// need to allow this to remove the warning about dyn_trait being stable in the latest rust.
6261
// We should probably eventually remove this `allow` and delete any unecessary `feature` declarations.
6362
#![allow(stable_features)]
6463
#![feature(dyn_trait)]
6564

66-
#[macro_use] extern crate chalk_macros;
65+
#[macro_use]
66+
extern crate chalk_macros;
6767

6868
#[cfg(feature = "stack_protection")]
6969
extern crate stacker;
7070

71-
#[cfg(feature = "stabler")]
72-
extern crate fxhash;
73-
74-
#[cfg(not(feature = "stabler"))]
75-
extern crate rustc_data_structures;
71+
extern crate rustc_hash;
7672

7773
use crate::context::Context;
78-
use crate::hashmap::FxHashSet;
74+
use rustc_hash::FxHashSet;
7975
use std::cmp::min;
8076
use std::usize;
8177

8278
pub mod context;
79+
mod derived;
8380
pub mod fallible;
8481
pub mod forest;
85-
pub mod hashmap;
8682
pub mod hh;
87-
mod derived;
8883
mod logic;
8984
mod simplify;
9085
mod stack;

chalk-engine/src/logic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use crate::hh::HhGoal;
77
use crate::stack::StackIndex;
88
use crate::strand::{CanonicalStrand, SelectedSubgoal, Strand};
99
use crate::table::{Answer, AnswerIndex};
10-
use crate::hashmap::FxHashSet;
10+
use rustc_hash::FxHashSet;
1111
use std::marker::PhantomData;
1212
use std::mem;
1313

chalk-engine/src/table.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::{DelayedLiteralSet, DelayedLiteralSets};
22
use crate::context::prelude::*;
33
use crate::strand::CanonicalStrand;
4-
use crate::hashmap::FxHashMap;
4+
use rustc_hash::FxHashMap;
55
use std::collections::VecDeque;
66
use std::collections::hash_map::Entry;
77
use std::mem;

chalk-engine/src/tables.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::TableIndex;
22
use crate::context::prelude::*;
33
use crate::table::Table;
4-
use crate::hashmap::FxHashMap;
4+
use rustc_hash::FxHashMap;
55
use std::ops::{Index, IndexMut};
66

77
/// See `Forest`.

chalk-parse/src/ast.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ pub struct StructDefn {
3434

3535
pub struct StructFlags {
3636
pub external: bool,
37+
pub fundamental: bool,
3738
}
3839

3940
pub struct TraitDefn {

chalk-parse/src/parser.lalrpop

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ ExternalKeyword: () = "extern";
3939
AutoKeyword: () = "#" "[" "auto" "]";
4040
MarkerKeyword: () = "#" "[" "marker" "]";
4141
DerefLangItem: () = "#" "[" "lang_deref" "]";
42+
FundamentalKeyword: () = "#" "[" "fundamental" "]";
4243

4344
StructDefn: StructDefn = {
44-
<external:ExternalKeyword?> "struct" <n:Id><p:Angle<ParameterKind>>
45+
<fundamental:FundamentalKeyword?> <external:ExternalKeyword?> "struct" <n:Id><p:Angle<ParameterKind>>
4546
<w:QuantifiedWhereClauses> "{" <f:Fields> "}" => StructDefn
4647
{
4748
name: n,
@@ -50,6 +51,7 @@ StructDefn: StructDefn = {
5051
fields: f,
5152
flags: StructFlags {
5253
external: external.is_some(),
54+
fundamental: fundamental.is_some(),
5355
},
5456
}
5557
};

0 commit comments

Comments
 (0)