Skip to content

Commit 612c008

Browse files
authored
Merge pull request #101 from willcrichton/dev
Update to nightly-2024-12-15, prepare 0.5.43
2 parents 9f88a13 + 52ff3d8 commit 612c008

File tree

15 files changed

+57
-48
lines changed

15 files changed

+57
-48
lines changed

Cargo.lock

+8-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ exclude = ["ide/src/tests/mock_project"]
44
resolver = "2"
55

66
[workspace.dependencies]
7-
rustc_plugin = "=0.11.0-nightly-2024-12-01"
8-
rustc_utils = {version = "=0.11.0-nightly-2024-12-01", features = ["indexical"]}
7+
rustc_plugin = "=0.12.0-nightly-2024-12-15"
8+
rustc_utils = {version = "=0.12.0-nightly-2024-12-15", features = ["indexical"]}
99
indexical = {version = "0.3.1", default-features = false, features = ["rustc"]}
1010

1111
[profile.bench]

crates/flowistry/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "flowistry"
3-
version = "0.5.42"
3+
version = "0.5.43"
44
edition = "2021"
55
authors = ["Will Crichton <[email protected]>"]
66
description = "Modular information flow analysis"

crates/flowistry/benches/main.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,7 @@ fn criterion_benchmark(c: &mut Criterion) {
174174

175175
let mut callbacks = Callbacks { group };
176176
rustc_driver::catch_fatal_errors(|| {
177-
rustc_driver::RunCompiler::new(&args, &mut callbacks)
178-
.run()
179-
.unwrap()
177+
rustc_driver::RunCompiler::new(&args, &mut callbacks).run();
180178
})
181179
.unwrap();
182180
}

crates/flowistry/examples/example.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,7 @@ fn main() {
139139
// Run rustc with the given arguments
140140
let mut callbacks = Callbacks;
141141
rustc_driver::catch_fatal_errors(|| {
142-
rustc_driver::RunCompiler::new(&args, &mut callbacks)
143-
.run()
144-
.unwrap()
142+
rustc_driver::RunCompiler::new(&args, &mut callbacks).run();
145143
})
146144
.unwrap();
147145
}

crates/flowistry/src/infoflow/analysis.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ impl<'a, 'tcx> Analysis<'tcx> for FlowAnalysis<'a, 'tcx> {
255255
}
256256
}
257257

258-
fn apply_statement_effect(
258+
fn apply_primary_statement_effect(
259259
&mut self,
260260
state: &mut Self::Domain,
261261
statement: &Statement<'tcx>,
@@ -267,7 +267,7 @@ impl<'a, 'tcx> Analysis<'tcx> for FlowAnalysis<'a, 'tcx> {
267267
.visit_statement(statement, location);
268268
}
269269

270-
fn apply_terminator_effect<'mir>(
270+
fn apply_primary_terminator_effect<'mir>(
271271
&mut self,
272272
state: &mut Self::Domain,
273273
terminator: &'mir Terminator<'tcx>,

crates/flowistry/src/mir/engine.rs

+10-2
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,19 @@ pub fn iterate_to_fixpoint<'tcx, A: Analysis<'tcx>>(
8585
};
8686
let next_locs = match body.stmt_at(location) {
8787
Either::Left(statement) => {
88-
analysis.apply_statement_effect(&mut state[loc_index], statement, location);
88+
analysis.apply_primary_statement_effect(
89+
&mut state[loc_index],
90+
statement,
91+
location,
92+
);
8993
vec![location.successor_within_block()]
9094
}
9195
Either::Right(terminator) => {
92-
analysis.apply_terminator_effect(&mut state[loc_index], terminator, location);
96+
analysis.apply_primary_terminator_effect(
97+
&mut state[loc_index],
98+
terminator,
99+
location,
100+
);
93101
body
94102
.basic_blocks
95103
.successors(location.block)

crates/flowistry_ide/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "flowistry_ide"
3-
version = "0.5.42"
3+
version = "0.5.43"
44
edition = "2021"
55
authors = ["Will Crichton <[email protected]>"]
66
description = "Information Flow in the IDE for Rust"
@@ -14,7 +14,7 @@ rustc_private = true
1414
decompose = ["petgraph", "rayon"]
1515

1616
[dependencies]
17-
flowistry = {version = "0.5.42", path = "../flowistry"}
17+
flowistry = {version = "0.5.43", path = "../flowistry"}
1818
anyhow = "1"
1919
log = "0.4"
2020
fluid-let = "1.0"

crates/flowistry_ide/src/plugin.rs

+21-17
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,11 @@ fn postprocess<T: Serialize>(result: FlowistryResult<T>) -> RustcResult<()> {
219219
let result = match result {
220220
Ok(output) => Ok(output),
221221
Err(e) => match e {
222-
FlowistryError::BuildError(e) => return Err(e),
222+
FlowistryError::BuildError =>
223+
{
224+
#[allow(deprecated)]
225+
return Err(ErrorGuaranteed::unchecked_error_guaranteed())
226+
}
223227
e => Err(e),
224228
},
225229
};
@@ -248,7 +252,11 @@ pub fn run_with_callbacks(
248252
);
249253

250254
let compiler = rustc_driver::RunCompiler::new(&args, callbacks);
251-
compiler.run().map_err(FlowistryError::BuildError)
255+
256+
rustc_driver::catch_fatal_errors(move || {
257+
compiler.run();
258+
})
259+
.map_err(|_| FlowistryError::BuildError)
252260
}
253261

254262
fn run<A: FlowistryAnalysis, T: ToSpan>(
@@ -280,7 +288,7 @@ fn run<A: FlowistryAnalysis, T: ToSpan>(
280288
#[derive(Debug, Serialize)]
281289
#[serde(tag = "type")]
282290
pub enum FlowistryError {
283-
BuildError(#[serde(skip_serializing)] ErrorGuaranteed),
291+
BuildError,
284292
AnalysisError { error: String },
285293
FileNotFound,
286294
}
@@ -321,26 +329,22 @@ impl<A: FlowistryAnalysis, T: ToSpan, F: FnOnce() -> T> rustc_driver::Callbacks
321329
config.override_queries = Some(borrowck_facts::override_queries);
322330
}
323331

324-
fn after_expansion<'tcx>(
332+
fn after_analysis<'tcx>(
325333
&mut self,
326334
_compiler: &rustc_interface::interface::Compiler,
327-
queries: &'tcx rustc_interface::Queries<'tcx>,
335+
tcx: TyCtxt<'tcx>,
328336
) -> rustc_driver::Compilation {
329337
elapsed("rustc", self.rustc_start);
330338
fluid_set!(EVAL_MODE, self.eval_mode.unwrap_or_default());
331339

332-
let start = Instant::now();
333-
queries.global_ctxt().unwrap().enter(|tcx| {
334-
elapsed("global_ctxt", start);
335-
let mut analysis = self.analysis.take().unwrap();
336-
self.output = Some((|| {
337-
let target = (self.compute_target.take().unwrap())().to_span(tcx)?;
338-
debug!("target span: {target:?}");
339-
let mut bodies = find_enclosing_bodies(tcx, target);
340-
let body = bodies.next().context("Selection did not map to a body")?;
341-
analysis.analyze(tcx, body)
342-
})());
343-
});
340+
let mut analysis = self.analysis.take().unwrap();
341+
self.output = Some((|| {
342+
let target = (self.compute_target.take().unwrap())().to_span(tcx)?;
343+
debug!("target span: {target:?}");
344+
let mut bodies = find_enclosing_bodies(tcx, target);
345+
let body = bodies.next().context("Selection did not map to a body")?;
346+
analysis.analyze(tcx, body)
347+
})());
344348

345349
rustc_driver::Compilation::Stop
346350
}

crates/flowistry_ifc/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[package]
22
name = "flowistry_ifc"
3-
version = "0.5.42"
3+
version = "0.5.43"
44
edition = "2021"
55
publish = false
66

77
[package.metadata.rust-analyzer]
88
rustc_private = true
99

1010
[dependencies]
11-
flowistry = {version = "0.5.42", path = "../flowistry"}
11+
flowistry = {version = "0.5.43", path = "../flowistry"}
1212
env_logger = "0.9"
1313
termcolor = "1.1"
1414
anyhow = "1"

crates/flowistry_ifc/src/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ impl RustcPlugin for IfcPlugin {
5050
compiler_args: Vec<String>,
5151
_plugin_args: Self::Args,
5252
) -> rustc_interface::interface::Result<()> {
53-
rustc_driver::RunCompiler::new(&compiler_args, &mut Callbacks).run()
53+
rustc_driver::RunCompiler::new(&compiler_args, &mut Callbacks).run();
54+
Ok(())
5455
}
5556
}
5657

crates/flowistry_ifc_traits/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "flowistry_ifc_traits"
3-
version = "0.5.42"
3+
version = "0.5.43"
44
edition = "2021"
55
publish = false
66

ide/package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ide/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"type": "git"
1313
},
1414
"description": "Information Flow in the IDE for Rust",
15-
"version": "0.5.42",
15+
"version": "0.5.43",
1616
"engines": {
1717
"vscode": "^1.54.0"
1818
},

rust-toolchain.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "nightly-2024-12-01"
2+
channel = "nightly-2024-12-15"
33
components = ["rust-src", "rustc-dev", "llvm-tools-preview"]

0 commit comments

Comments
 (0)