Skip to content

Commit 3ed6e3c

Browse files
committed
Auto merge of rust-lang#131848 - matthiaskrgr:rollup-l29a75j, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - rust-lang#129620 (Provide a more convinient way of developing rustc on NixOS) - rust-lang#131805 (rustc_llvm: Fix flattened CLI args) - rust-lang#131818 (Enable XRay instrumentation for LoongArch Linux targets) - rust-lang#131825 (SolverDelegate add assoc type for Infcx) - rust-lang#131833 (Add `must_use` to `CommandExt::exec`) - rust-lang#131835 (Do not run test where it cannot run) - rust-lang#131844 (Add mailmap entry for kobzol) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 86bd459 + c9f3a7d commit 3ed6e3c

File tree

17 files changed

+157
-10
lines changed

17 files changed

+157
-10
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ build/
5757
/src/tools/x/target
5858
# Created by default with `src/ci/docker/run.sh`
5959
/obj/
60+
# Created by nix dev shell / .envrc
61+
src/tools/nix-dev-shell/flake.lock
6062

6163
## ICE reports
6264
rustc-ice-*.txt

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ Jakub Adam Wieczorek <jakub.adam.wieczorek@gmail.com>
256256
Jakub Adam Wieczorek <jakub.adam.wieczorek@gmail.com> <jakub.bukaj@yahoo.com>
257257
Jakub Adam Wieczorek <jakub.adam.wieczorek@gmail.com> <jakub@jakub.cc>
258258
Jakub Adam Wieczorek <jakub.adam.wieczorek@gmail.com> <jakubw@jakubw.net>
259+
Jakub Beránek <berykubik@gmail.com> <jakub.beranek@vsb.cz>
259260
James [Undefined] <tpzker@thepuzzlemaker.info>
260261
James Deng <cnjamesdeng@gmail.com> <cnJamesDeng@gmail.com>
261262
James Hinshelwood <jameshinshelwood1@gmail.com> <james.hinshelwood@bigpayme.com>

compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,13 +490,13 @@ extern "C" LLVMTargetMachineRef LLVMRustCreateTargetMachine(
490490
assert(ArgsCstrBuff[ArgsCstrBuffLen - 1] == '\0');
491491
auto Arg0 = std::string(ArgsCstrBuff);
492492
buffer_offset = Arg0.size() + 1;
493-
auto ArgsCppStr =
494-
std::string(ArgsCstrBuff + buffer_offset, ArgsCstrBuffLen - 1);
493+
auto ArgsCppStr = std::string(ArgsCstrBuff + buffer_offset,
494+
ArgsCstrBuffLen - buffer_offset);
495495
auto i = 0;
496496
while (i != std::string::npos) {
497497
i = ArgsCppStr.find('\0', i + 1);
498498
if (i != std::string::npos)
499-
ArgsCppStr.replace(i, i + 1, " ");
499+
ArgsCppStr.replace(i, 1, " ");
500500
}
501501
Options.MCOptions.Argv0 = Arg0;
502502
Options.MCOptions.CommandlineArgs = ArgsCppStr;

compiler/rustc_next_trait_solver/src/delegate.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ use rustc_type_ir::fold::TypeFoldable;
44
use rustc_type_ir::solve::{Certainty, Goal, NoSolution, SolverMode};
55
use rustc_type_ir::{self as ty, InferCtxtLike, Interner};
66

7-
pub trait SolverDelegate:
8-
Deref<Target: InferCtxtLike<Interner = <Self as SolverDelegate>::Interner>> + Sized
9-
{
7+
pub trait SolverDelegate: Deref<Target = <Self as SolverDelegate>::Infcx> + Sized {
8+
type Infcx: InferCtxtLike<Interner = <Self as SolverDelegate>::Interner>;
109
type Interner: Interner;
1110
fn cx(&self) -> Self::Interner {
1211
(**self).cx()

compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ pub(crate) fn target() -> Target {
2323
| SanitizerSet::LEAK
2424
| SanitizerSet::MEMORY
2525
| SanitizerSet::THREAD,
26+
supports_xray: true,
2627
direct_access_external_data: Some(false),
2728
..base::linux_gnu::opts()
2829
},

compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_musl.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ pub(crate) fn target() -> Target {
2424
| SanitizerSet::LEAK
2525
| SanitizerSet::MEMORY
2626
| SanitizerSet::THREAD,
27+
supports_xray: true,
2728
direct_access_external_data: Some(false),
2829
..base::linux_musl::opts()
2930
},

compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_ohos.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ pub(crate) fn target() -> Target {
2222
| SanitizerSet::LEAK
2323
| SanitizerSet::MEMORY
2424
| SanitizerSet::THREAD,
25+
supports_xray: true,
2526
direct_access_external_data: Some(false),
2627
..base::linux_ohos::opts()
2728
},

compiler/rustc_trait_selection/src/solve/delegate.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ impl<'tcx> Deref for SolverDelegate<'tcx> {
3636
}
3737

3838
impl<'tcx> rustc_next_trait_solver::delegate::SolverDelegate for SolverDelegate<'tcx> {
39+
type Infcx = InferCtxt<'tcx>;
3940
type Interner = TyCtxt<'tcx>;
4041

4142
fn cx(&self) -> TyCtxt<'tcx> {

library/core/tests/lazy.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ fn lazy_type_inference() {
114114
}
115115

116116
#[test]
117+
#[cfg(panic = "unwind")]
117118
#[should_panic = "LazyCell instance has previously been poisoned"]
118119
fn lazy_force_mut_panic() {
119120
let mut lazy = LazyCell::<String>::new(|| panic!());

library/std/src/os/unix/process.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ pub trait CommandExt: Sealed {
154154
/// required to gracefully handle errors it is recommended to use the
155155
/// cross-platform `spawn` instead.
156156
#[stable(feature = "process_exec2", since = "1.9.0")]
157+
#[must_use]
157158
fn exec(&mut self) -> io::Error;
158159

159160
/// Set executable argument

0 commit comments

Comments
 (0)