Skip to content

Commit 26a4c95

Browse files
author
The rustc-dev-guide Cronjob Bot
committed
Merge from rustc
2 parents b72d906 + 5e6bb7a commit 26a4c95

File tree

5 files changed

+6
-9
lines changed

5 files changed

+6
-9
lines changed

examples/rustc-driver-example.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ extern crate rustc_span;
1515

1616
use std::io;
1717
use std::path::Path;
18+
use std::sync::Arc;
1819

1920
use rustc_ast_pretty::pprust::item_to_string;
20-
use rustc_data_structures::sync::Lrc;
2121
use rustc_driver::{Compilation, run_compiler};
2222
use rustc_interface::interface::{Compiler, Config};
2323
use rustc_middle::ty::TyCtxt;
@@ -43,7 +43,7 @@ fn main() {
4343
}
4444
}
4545

46-
fn read_binary_file(&self, _path: &Path) -> io::Result<Lrc<[u8]>> {
46+
fn read_binary_file(&self, _path: &Path) -> io::Result<Arc<[u8]>> {
4747
Err(io::Error::other("oops"))
4848
}
4949
}

examples/rustc-driver-interacting-with-the-ast.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ extern crate rustc_span;
1515

1616
use std::io;
1717
use std::path::Path;
18+
use std::sync::Arc;
1819

1920
use rustc_ast_pretty::pprust::item_to_string;
20-
use rustc_data_structures::sync::Lrc;
2121
use rustc_driver::{Compilation, run_compiler};
2222
use rustc_interface::interface::{Compiler, Config};
2323
use rustc_middle::ty::TyCtxt;
@@ -43,7 +43,7 @@ fn main() {
4343
}
4444
}
4545

46-
fn read_binary_file(&self, _path: &Path) -> io::Result<Lrc<[u8]>> {
46+
fn read_binary_file(&self, _path: &Path) -> io::Result<Arc<[u8]>> {
4747
Err(io::Error::other("oops"))
4848
}
4949
}

src/diagnostics/lintstore.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Lints are registered via the [`LintStore::register_lint`] function. This should
5454
happen just once for any lint, or an ICE will occur.
5555

5656
Once the registration is complete, we "freeze" the lint store by placing it in
57-
an `Lrc`.
57+
an `Arc`.
5858

5959
Lint passes are registered separately into one of the categories
6060
(pre-expansion, early, late, late module). Passes are registered as a closure

src/parallel-rustc.md

-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ are implemented differently depending on whether `parallel-compiler` is true.
4646

4747
| data structure | parallel | non-parallel |
4848
| -------------------------------- | --------------------------------------------------- | ------------ |
49-
| Lrc | std::sync::Arc | std::rc::Rc |
5049
| Weak | std::sync::Weak | std::rc::Weak |
5150
| Atomic{Bool}/{Usize}/{U32}/{U64} | std::sync::atomic::Atomic{Bool}/{Usize}/{U32}/{U64} | (std::cell::Cell<bool/usize/u32/u64>) |
5251
| OnceCell | std::sync::OnceLock | std::cell::OnceCell |

src/profiling/with_rustc_perf.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ However, using the suite manually can be a bit cumbersome. To make this easier f
77
the compiler build system (`bootstrap`) also provides built-in integration with the benchmarking suite,
88
which will download and build the suite for you, build a local compiler toolchain and let you profile it using a simplified command-line interface.
99

10-
You can use the `./x perf -- <command> [options]` command to use this integration.
11-
12-
> Note that you need to specify arguments after `--` in the `x perf` command! You will not be able to pass arguments without the double dashes.
10+
You can use the `./x perf <command> [options]` command to use this integration.
1311

1412
You can use normal bootstrap flags for this command, such as `--stage 1` or `--stage 2`, for example to modify the stage of the created sysroot. It might also be useful to configure `config.toml` to better support profiling, e.g. set `rust.debuginfo-level = 1` to add source line information to the built compiler.
1513

0 commit comments

Comments
 (0)