Skip to content

Commit f10e040

Browse files
authored
Merge pull request #819 from floriangru/update_toolchain_2023-06-25
2 parents e529c60 + 8e01538 commit f10e040

File tree

158 files changed

+2564
-2902
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

158 files changed

+2564
-2902
lines changed

Cargo.lock

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

cargo-creusot/src/bin/creusot-rustc.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ extern crate lazy_static;
44
extern crate rustc_driver;
55
extern crate rustc_errors;
66
extern crate rustc_interface;
7+
extern crate rustc_session;
78

89
#[macro_use]
910
extern crate log;
@@ -14,6 +15,7 @@ use creusot::callbacks::*;
1415
use rustc_driver::{RunCompiler, DEFAULT_LOCALE_RESOURCES};
1516
use rustc_errors::{emitter::EmitterWriter, TerminalUrl};
1617
use rustc_interface::interface::try_print_query_stack;
18+
use rustc_session::{config::ErrorOutputType, EarlyErrorHandler};
1719
use std::{env, panic, panic::PanicInfo, process::Command};
1820

1921
const BUG_REPORT_URL: &'static str = &"https://github.com/xldenis/creusot/issues/new";
@@ -67,7 +69,8 @@ struct DefaultCallbacks;
6769
impl rustc_driver::Callbacks for DefaultCallbacks {}
6870

6971
fn main() {
70-
rustc_driver::init_rustc_env_logger();
72+
let handler = EarlyErrorHandler::new(ErrorOutputType::default());
73+
rustc_driver::init_rustc_env_logger(&handler);
7174
env_logger::init();
7275
lazy_static::initialize(&ICE_HOOK);
7376

ci/rust-toolchain

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "nightly-2023-05-26"
3-
components = [ "rustfmt", "rustc-dev", "llvm-tools-preview" ]
2+
channel = "nightly-2023-06-29"
3+
components = [ "rustfmt", "rustc-dev", "llvm-tools" ]

creusot-contracts-proc/src/invariant.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub struct Loop {
5656

5757
fn filter_invariants(attrs: &mut Vec<Attribute>) -> Vec<Attribute> {
5858
attrs
59-
.drain_filter(|attr| attr.path().get_ident().map(|i| i == "invariant").unwrap_or(false))
59+
.extract_if(|attr| attr.path().get_ident().map(|i| i == "invariant").unwrap_or(false))
6060
.collect()
6161
}
6262

creusot-contracts-proc/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(box_patterns, drain_filter, extend_one, proc_macro_def_site)]
1+
#![feature(box_patterns, extract_if, extend_one, proc_macro_def_site)]
22
extern crate proc_macro;
33
use extern_spec::ExternSpecs;
44
use pearlite_syn::*;

creusot/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ similar = "2.2"
2424
termcolor = "1.1"
2525
arraydeque = "0.4"
2626
creusot-contracts = { path = "../creusot-contracts", features = ["typechecker"] }
27-
cargo-creusot = { path = "../cargo-creusot" }
2827
escargot = { version = "0.5" }
2928
[[test]]
3029
name = "ui"

creusot/src/analysis.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ pub(crate) fn categorize(context: PlaceContext) -> Option<DefUse> {
111111
PlaceContext::MutatingUse(MutatingUseContext::Borrow) |
112112
PlaceContext::NonMutatingUse(NonMutatingUseContext::SharedBorrow) |
113113
PlaceContext::NonMutatingUse(NonMutatingUseContext::ShallowBorrow) |
114-
PlaceContext::NonMutatingUse(NonMutatingUseContext::UniqueBorrow) |
115114
PlaceContext::NonMutatingUse(NonMutatingUseContext::PlaceMention) |
116115
PlaceContext::MutatingUse(MutatingUseContext::AddressOf) |
117116
PlaceContext::NonMutatingUse(NonMutatingUseContext::AddressOf) |

creusot/src/analysis/frozen_locals.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,15 @@ impl<'tcx> dataflow::GenKillAnalysis<'tcx> for Borrows<'_, 'tcx> {
121121
type Idx = BorrowIndex;
122122

123123
fn before_statement_effect(
124-
&self,
124+
&mut self,
125125
_trans: &mut impl GenKill<Self::Idx>,
126126
_statement: &mir::Statement<'tcx>,
127127
_location: Location,
128128
) {
129129
}
130130

131131
fn statement_effect(
132-
&self,
132+
&mut self,
133133
trans: &mut impl GenKill<Self::Idx>,
134134
stmt: &mir::Statement<'tcx>,
135135
location: Location,
@@ -184,15 +184,15 @@ impl<'tcx> dataflow::GenKillAnalysis<'tcx> for Borrows<'_, 'tcx> {
184184
}
185185

186186
fn before_terminator_effect(
187-
&self,
187+
&mut self,
188188
_trans: &mut impl GenKill<Self::Idx>,
189189
_terminator: &mir::Terminator<'tcx>,
190190
_location: Location,
191191
) {
192192
}
193193

194194
fn terminator_effect(
195-
&self,
195+
&mut self,
196196
trans: &mut impl GenKill<Self::Idx>,
197197
terminator: &mir::Terminator<'tcx>,
198198
location: Location,
@@ -211,7 +211,7 @@ impl<'tcx> dataflow::GenKillAnalysis<'tcx> for Borrows<'_, 'tcx> {
211211
}
212212

213213
fn call_return_effect(
214-
&self,
214+
&mut self,
215215
_trans: &mut impl GenKill<Self::Idx>,
216216
_block: mir::BasicBlock,
217217
_return_places: dataflow::CallReturnPlaces<'_, 'tcx>,

creusot/src/analysis/init_locals.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ impl<'tcx> GenKillAnalysis<'tcx> for MaybeInitializedLocals {
3434
type Idx = Local;
3535

3636
fn statement_effect(
37-
&self,
37+
&mut self,
3838
trans: &mut impl GenKill<Self::Idx>,
3939
statement: &mir::Statement<'tcx>,
4040
loc: Location,
@@ -43,7 +43,7 @@ impl<'tcx> GenKillAnalysis<'tcx> for MaybeInitializedLocals {
4343
}
4444

4545
fn terminator_effect(
46-
&self,
46+
&mut self,
4747
trans: &mut impl GenKill<Self::Idx>,
4848
terminator: &Terminator<'tcx>,
4949
loc: Location,
@@ -52,7 +52,7 @@ impl<'tcx> GenKillAnalysis<'tcx> for MaybeInitializedLocals {
5252
}
5353

5454
fn call_return_effect(
55-
&self,
55+
&mut self,
5656
trans: &mut impl GenKill<Self::Idx>,
5757
_block: BasicBlock,
5858
return_places: dataflow::CallReturnPlaces<'_, 'tcx>,
@@ -62,7 +62,7 @@ impl<'tcx> GenKillAnalysis<'tcx> for MaybeInitializedLocals {
6262

6363
/// See `Analysis::apply_yield_resume_effect`.
6464
fn yield_resume_effect(
65-
&self,
65+
&mut self,
6666
trans: &mut impl GenKill<Self::Idx>,
6767
_resume_block: BasicBlock,
6868
resume_place: mir::Place<'tcx>,
@@ -114,7 +114,6 @@ where
114114
| NonMutatingUseContext::Copy
115115
| NonMutatingUseContext::SharedBorrow
116116
| NonMutatingUseContext::ShallowBorrow
117-
| NonMutatingUseContext::UniqueBorrow
118117
| NonMutatingUseContext::AddressOf
119118
| NonMutatingUseContext::PlaceMention
120119
| NonMutatingUseContext::Projection,

creusot/src/analysis/liveness_no_drop.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ impl<'tcx> GenKillAnalysis<'tcx> for MaybeLiveExceptDrop {
3535
type Idx = Local;
3636

3737
fn statement_effect(
38-
&self,
38+
&mut self,
3939
trans: &mut impl GenKill<Self::Idx>,
4040
statement: &mir::Statement<'tcx>,
4141
location: Location,
@@ -44,7 +44,7 @@ impl<'tcx> GenKillAnalysis<'tcx> for MaybeLiveExceptDrop {
4444
}
4545

4646
fn terminator_effect(
47-
&self,
47+
&mut self,
4848
trans: &mut impl GenKill<Self::Idx>,
4949
terminator: &mir::Terminator<'tcx>,
5050
location: Location,
@@ -53,7 +53,7 @@ impl<'tcx> GenKillAnalysis<'tcx> for MaybeLiveExceptDrop {
5353
}
5454

5555
fn call_return_effect(
56-
&self,
56+
&mut self,
5757
trans: &mut impl GenKill<Self::Idx>,
5858
_block: mir::BasicBlock,
5959
return_places: CallReturnPlaces<'_, 'tcx>,
@@ -66,7 +66,7 @@ impl<'tcx> GenKillAnalysis<'tcx> for MaybeLiveExceptDrop {
6666
}
6767

6868
fn yield_resume_effect(
69-
&self,
69+
&mut self,
7070
trans: &mut impl GenKill<Self::Idx>,
7171
_resume_block: mir::BasicBlock,
7272
resume_place: mir::Place<'tcx>,
@@ -196,8 +196,7 @@ impl DefUse {
196196
| NonMutatingUseContext::Move
197197
| NonMutatingUseContext::ShallowBorrow
198198
| NonMutatingUseContext::SharedBorrow
199-
| NonMutatingUseContext::PlaceMention
200-
| NonMutatingUseContext::UniqueBorrow,
199+
| NonMutatingUseContext::PlaceMention,
201200
) => Some(DefUse::Use),
202201
PlaceContext::MutatingUse(MutatingUseContext::Drop) => None,
203202

0 commit comments

Comments
 (0)