Skip to content

Commit 884c594

Browse files
committed
Update hax and rustc
1 parent f5131f4 commit 884c594

26 files changed

+69
-107
lines changed

charon/Cargo.lock

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

charon/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ tracing-tree = "0.3"
6969
tracing = { version = "0.1", features = [ "max_level_trace", "release_max_level_warn" ] }
7070
which = "6.0.1"
7171

72-
hax-frontend-exporter = { git = "https://github.com/hacspec/hax", branch = "main", optional = true }
72+
hax-frontend-exporter = { git = "https://github.com/Nadrieril/hax", branch = "update-rustc", optional = true }
7373
# hax-frontend-exporter = { path = "../../hax/frontend/exporter", optional = true }
7474
macros = { path = "./macros" }
7575

charon/src/bin/charon-driver/main.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#![feature(iter_array_chunks)]
88
#![feature(iterator_try_collect)]
99
#![feature(let_chains)]
10-
#![feature(lint_reasons)]
1110

1211
extern crate rustc_ast;
1312
extern crate rustc_ast_pretty;

charon/src/bin/charon-driver/translate/translate_functions_to_ullbc.rs

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,17 +1162,6 @@ impl<'tcx, 'ctx, 'ctx1> BodyTransCtx<'tcx, 'ctx, 'ctx1> {
11621162
target,
11631163
}
11641164
}
1165-
TerminatorKind::Yield {
1166-
value: _,
1167-
resume: _,
1168-
resume_arg: _,
1169-
drop: _,
1170-
} => {
1171-
error_or_panic!(self, rustc_span, "Unsupported terminator: yield");
1172-
}
1173-
TerminatorKind::CoroutineDrop => {
1174-
error_or_panic!(self, rustc_span, "Unsupported terminator: coroutine drop");
1175-
}
11761165
TerminatorKind::FalseEdge {
11771166
real_target,
11781167
imaginary_target,
@@ -1203,6 +1192,15 @@ impl<'tcx, 'ctx, 'ctx1> BodyTransCtx<'tcx, 'ctx, 'ctx1> {
12031192
TerminatorKind::InlineAsm { .. } => {
12041193
error_or_panic!(self, rustc_span, "Inline assembly is not supported");
12051194
}
1195+
TerminatorKind::CoroutineDrop
1196+
| TerminatorKind::TailCall { .. }
1197+
| TerminatorKind::Yield { .. } => {
1198+
error_or_panic!(
1199+
self,
1200+
rustc_span,
1201+
format!("Unsupported terminator: {:?}", terminator.kind)
1202+
);
1203+
}
12061204
};
12071205

12081206
// Add the span information

charon/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#![feature(impl_trait_in_assoc_type)]
2020
#![feature(iterator_try_collect)]
2121
#![feature(let_chains)]
22-
#![feature(lint_reasons)]
2322
#![feature(trait_alias)]
2423
#![feature(register_tool)]
2524
// For when we use charon on itself :3

charon/tests/crate_data.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![feature(rustc_private)]
2-
#![feature(lint_reasons)]
32

43
use assert_cmd::prelude::{CommandCargoExt, OutputAssertExt};
54
use itertools::Itertools;

charon/tests/ui/external.out

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl core::clone::impls::{impl core::clone::Clone for u32}#8 : core::clone::Clon
5252
fn clone = core::clone::impls::{impl core::clone::Clone for u32}#8::clone
5353
}
5454

55-
impl core::marker::{impl core::marker::Copy for u32}#41 : core::marker::Copy<u32>
55+
impl core::marker::{impl core::marker::Copy for u32}#40 : core::marker::Copy<u32>
5656
{
5757
parent_clause0 = core::clone::impls::{impl core::clone::Clone for u32}#8
5858
}
@@ -75,7 +75,7 @@ impl core::num::nonzero::private::{impl core::marker::Copy for core::num::nonzer
7575

7676
impl core::num::nonzero::{impl core::num::nonzero::ZeroablePrimitive for u32}#20 : core::num::nonzero::ZeroablePrimitive<u32>
7777
{
78-
parent_clause0 = core::marker::{impl core::marker::Copy for u32}#41
78+
parent_clause0 = core::marker::{impl core::marker::Copy for u32}#40
7979
parent_clause1 = core::num::nonzero::{impl core::num::nonzero::private::Sealed for u32}#19
8080
parent_clause2 = core::num::nonzero::private::{impl core::marker::Copy for core::num::nonzero::private::NonZeroU32Inner}#12
8181
parent_clause3 = core::num::nonzero::private::{impl core::clone::Clone for core::num::nonzero::private::NonZeroU32Inner}#11
@@ -153,7 +153,7 @@ fn test_crate::use_get<'_0>(@1: &'_0 (core::cell::Cell<u32>)) -> u32
153153
let @2: &'_ (core::cell::Cell<u32>); // anonymous local
154154

155155
@2 := &*(rc@1)
156-
@0 := core::cell::{core::cell::Cell<T>}#10::get<u32>[core::marker::{impl core::marker::Copy for u32}#41](move (@2))
156+
@0 := core::cell::{core::cell::Cell<T>}#10::get<u32>[core::marker::{impl core::marker::Copy for u32}#40](move (@2))
157157
drop @2
158158
return
159159
}

charon/tests/ui/generic-associated-types.out

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ error: Ignoring the following item due to an error: test_crate::{impl#0}
1616
10 | impl<'a, T> LendingIterator for Option<&'a T> {
1717
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1818

19-
thread 'rustc' panicked at /rustc/6b0f4b5ec3aa707ecaa78230722117324a4ce23c/compiler/rustc_type_ir/src/binder.rs:785:9:
19+
thread 'rustc' panicked at /rustc/730d5d4095a264ef5f7c0a0781eea68c15431d45/compiler/rustc_type_ir/src/binder.rs:783:9:
2020
const parameter `'a/#1` ('a/#1/1) out of range when instantiating args=[Self/#0]
2121
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2222
error: Thread panicked when extracting item `test_crate::LendingIterator::next`.
@@ -38,9 +38,10 @@ warning[E9999]: Hax frontend found a projected type with escaping bound vars. Pl
3838
- alias_ty: AliasTy {
3939
args: [
4040
impl for<'a> FnMut(I::Item<'a>)/#1,
41-
(Alias(Projection, AliasTy { args: [I/#0, '^0.Named(test_crate::for_each::'a, "'a")], def_id: test_crate::LendingIterator::Item }),),
41+
(Alias(Projection, AliasTy { args: [I/#0, '^0.Named(test_crate::for_each::'a, "'a")], def_id: test_crate::LendingIterator::Item, .. }),),
4242
],
4343
def_id: core::ops::function::FnOnce::Output,
44+
..
4445
}
4546
- alias_kind: Projection
4647
- trait_ref: <impl for<'a> FnMut(I::Item<'a>) as std::ops::FnOnce<(<I as LendingIterator>::Item<'a>,)>>
@@ -50,17 +51,17 @@ warning[E9999]: Hax frontend found a projected type with escaping bound vars. Pl
5051
)
5152
- rebased_generics: [
5253
impl for<'a> FnMut(I::Item<'a>)/#1,
53-
(Alias(Projection, AliasTy { args: [I/#0, '^0.Named(test_crate::for_each::'a, "'a")], def_id: test_crate::LendingIterator::Item }),),
54-
(Alias(Projection, AliasTy { args: [I/#0, '^0.Named(test_crate::for_each::'a, "'a")], def_id: test_crate::LendingIterator::Item }),),
54+
(Alias(Projection, AliasTy { args: [I/#0, '^0.Named(test_crate::for_each::'a, "'a")], def_id: test_crate::LendingIterator::Item, .. }),),
55+
(Alias(Projection, AliasTy { args: [I/#0, '^0.Named(test_crate::for_each::'a, "'a")], def_id: test_crate::LendingIterator::Item, .. }),),
5556
]
5657
- norm_rebased_generics: Err(
5758
Type(
58-
(Alias(Projection, AliasTy { args: [impl for<'a> FnMut(I::Item<'a>)/#1, '^0.Named(test_crate::for_each::'a, "'a")], def_id: test_crate::LendingIterator::Item }),),
59+
(Alias(Projection, AliasTy { args: [impl for<'a> FnMut(I::Item<'a>)/#1, '^0.Named(test_crate::for_each::'a, "'a")], def_id: test_crate::LendingIterator::Item, .. }),),
5960
),
6061
)
6162
- norm_generics: Err(
6263
Type(
63-
(Alias(Projection, AliasTy { args: [impl for<'a> FnMut(I::Item<'a>)/#1, '^0.Named(test_crate::for_each::'a, "'a")], def_id: test_crate::LendingIterator::Item }),),
64+
(Alias(Projection, AliasTy { args: [impl for<'a> FnMut(I::Item<'a>)/#1, '^0.Named(test_crate::for_each::'a, "'a")], def_id: test_crate::LendingIterator::Item, .. }),),
6465
),
6566
)
6667
- early_binder_generics: Ok(
@@ -73,7 +74,7 @@ warning[E9999]: Hax frontend found a projected type with escaping bound vars. Pl
7374
= note: ⚠️ This is a bug in Hax's frontend.
7475
Please report this error to https://github.com/hacspec/hax/issues with some context (e.g. the current crate)!
7576

76-
thread 'rustc' panicked at /rustc/6b0f4b5ec3aa707ecaa78230722117324a4ce23c/compiler/rustc_type_ir/src/binder.rs:785:9:
77+
thread 'rustc' panicked at /rustc/730d5d4095a264ef5f7c0a0781eea68c15431d45/compiler/rustc_type_ir/src/binder.rs:783:9:
7778
const parameter `'a/#1` ('a/#1/1) out of range when instantiating args=[I/#0]
7879
error: Thread panicked when extracting item `test_crate::for_each`.
7980
--> tests/ui/generic-associated-types.rs:24:1
@@ -97,5 +98,4 @@ warning: unused variable: `x`
9798

9899
error: aborting due to 6 previous errors; 2 warnings emitted
99100

100-
[ERROR charon_driver:249] Compilation encountered 6 errors
101-
Error: Charon driver exited with code 1
101+
Error: Charon driver exited with code 101

charon/tests/ui/issue-4-slice-try-into-array.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ impl core::clone::impls::{impl core::clone::Clone for u8}#6 : core::clone::Clone
6363
fn clone = core::clone::impls::{impl core::clone::Clone for u8}#6::clone
6464
}
6565

66-
impl core::marker::{impl core::marker::Copy for u8}#39 : core::marker::Copy<u8>
66+
impl core::marker::{impl core::marker::Copy for u8}#38 : core::marker::Copy<u8>
6767
{
6868
parent_clause0 = core::clone::impls::{impl core::clone::Clone for u8}#6
6969
}
@@ -102,7 +102,7 @@ fn test_crate::trait_error<'_0>(@1: &'_0 (Slice<u8>))
102102
let @5: (); // anonymous local
103103

104104
@4 := &*(s@1)
105-
@3 := core::convert::{impl core::convert::TryInto<U> for T}#6<&'_ (Slice<u8>), Array<u8, 4 : usize>>[core::array::{impl core::convert::TryFrom<&'_0 (Slice<T>)> for Array<T, const N : usize>}#7<'_, u8, 4 : usize>[core::marker::{impl core::marker::Copy for u8}#39]]::try_into(move (@4))
105+
@3 := core::convert::{impl core::convert::TryInto<U> for T}#6<&'_ (Slice<u8>), Array<u8, 4 : usize>>[core::array::{impl core::convert::TryFrom<&'_0 (Slice<T>)> for Array<T, const N : usize>}#7<'_, u8, 4 : usize>[core::marker::{impl core::marker::Copy for u8}#38]]::try_into(move (@4))
106106
drop @4
107107
_array@2 := core::result::{core::result::Result<T, E>}::unwrap<Array<u8, 4 : usize>, core::array::TryFromSliceError>[core::array::{impl core::fmt::Debug for core::array::TryFromSliceError}#26](move (@3))
108108
drop @3

charon/tests/ui/issue-4-traits.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ impl core::clone::impls::{impl core::clone::Clone for u8}#6 : core::clone::Clone
6363
fn clone = core::clone::impls::{impl core::clone::Clone for u8}#6::clone
6464
}
6565

66-
impl core::marker::{impl core::marker::Copy for u8}#39 : core::marker::Copy<u8>
66+
impl core::marker::{impl core::marker::Copy for u8}#38 : core::marker::Copy<u8>
6767
{
6868
parent_clause0 = core::clone::impls::{impl core::clone::Clone for u8}#6
6969
}
@@ -102,7 +102,7 @@ fn test_crate::trait_error<'_0>(@1: &'_0 (Slice<u8>))
102102
let @5: (); // anonymous local
103103

104104
@4 := &*(s@1)
105-
@3 := core::convert::{impl core::convert::TryInto<U> for T}#6<&'_ (Slice<u8>), Array<u8, 4 : usize>>[core::array::{impl core::convert::TryFrom<&'_0 (Slice<T>)> for Array<T, const N : usize>}#7<'_, u8, 4 : usize>[core::marker::{impl core::marker::Copy for u8}#39]]::try_into(move (@4))
105+
@3 := core::convert::{impl core::convert::TryInto<U> for T}#6<&'_ (Slice<u8>), Array<u8, 4 : usize>>[core::array::{impl core::convert::TryFrom<&'_0 (Slice<T>)> for Array<T, const N : usize>}#7<'_, u8, 4 : usize>[core::marker::{impl core::marker::Copy for u8}#38]]::try_into(move (@4))
106106
drop @4
107107
_array@2 := core::result::{core::result::Result<T, E>}::unwrap<Array<u8, 4 : usize>, core::array::TryFromSliceError>[core::array::{impl core::fmt::Debug for core::array::TryFromSliceError}#26](move (@3))
108108
drop @3

0 commit comments

Comments
 (0)