Skip to content

Commit 7b5b87d

Browse files
author
The Miri Conjob Bot
committed
Merge from rustc
2 parents dfb552e + d97ec97 commit 7b5b87d

File tree

229 files changed

+1699
-541
lines changed

Some content is hidden

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

229 files changed

+1699
-541
lines changed

Cargo.lock

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3488,6 +3488,7 @@ dependencies = [
34883488
"rustc_trait_selection",
34893489
"rustc_ty_utils",
34903490
"serde_json",
3491+
"time",
34913492
"tracing",
34923493
"windows",
34933494
]
@@ -5142,6 +5143,33 @@ dependencies = [
51425143
name = "tier-check"
51435144
version = "0.1.0"
51445145

5146+
[[package]]
5147+
name = "time"
5148+
version = "0.3.22"
5149+
source = "registry+https://github.com/rust-lang/crates.io-index"
5150+
checksum = "ea9e1b3cf1243ae005d9e74085d4d542f3125458f3a81af210d901dcd7411efd"
5151+
dependencies = [
5152+
"itoa",
5153+
"serde",
5154+
"time-core",
5155+
"time-macros",
5156+
]
5157+
5158+
[[package]]
5159+
name = "time-core"
5160+
version = "0.1.1"
5161+
source = "registry+https://github.com/rust-lang/crates.io-index"
5162+
checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb"
5163+
5164+
[[package]]
5165+
name = "time-macros"
5166+
version = "0.2.9"
5167+
source = "registry+https://github.com/rust-lang/crates.io-index"
5168+
checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b"
5169+
dependencies = [
5170+
"time-core",
5171+
]
5172+
51455173
[[package]]
51465174
name = "tinystr"
51475175
version = "0.7.1"

RELEASES.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ Cargo
9292
-----
9393
- [Allow named debuginfo options in `Cargo.toml`.](https://github.com/rust-lang/cargo/pull/11958/)
9494
- [Add `workspace_default_members` to the output of `cargo metadata`.](https://github.com/rust-lang/cargo/pull/11978/)
95-
- [`cargo add` now considers `rust-version` when selecting packages.](https://github.com/rust-lang/cargo/pull/12078/)
9695
- [Automatically inherit workspace fields when running `cargo new`/`cargo init`.](https://github.com/rust-lang/cargo/pull/12069/)
9796

9897
<a id="1.71.0-Rustdoc"></a>

compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1619,13 +1619,15 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
16191619
debug!(?hir_bounds);
16201620

16211621
let lifetime_mapping = if in_trait {
1622-
self.arena.alloc_from_iter(
1623-
collected_lifetime_mapping
1624-
.iter()
1625-
.map(|(lifetime, def_id)| (**lifetime, *def_id)),
1622+
Some(
1623+
&*self.arena.alloc_from_iter(
1624+
collected_lifetime_mapping
1625+
.iter()
1626+
.map(|(lifetime, def_id)| (**lifetime, *def_id)),
1627+
),
16261628
)
16271629
} else {
1628-
&mut []
1630+
None
16291631
};
16301632

16311633
let opaque_ty_item = hir::OpaqueTy {
@@ -2090,13 +2092,15 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
20902092
debug!("lower_async_fn_ret_ty: generic_params={:#?}", generic_params);
20912093

20922094
let lifetime_mapping = if in_trait {
2093-
self.arena.alloc_from_iter(
2094-
collected_lifetime_mapping
2095-
.iter()
2096-
.map(|(lifetime, def_id)| (**lifetime, *def_id)),
2095+
Some(
2096+
&*self.arena.alloc_from_iter(
2097+
collected_lifetime_mapping
2098+
.iter()
2099+
.map(|(lifetime, def_id)| (**lifetime, *def_id)),
2100+
),
20972101
)
20982102
} else {
2099-
&mut []
2103+
None
21002104
};
21012105

21022106
let opaque_ty_item = hir::OpaqueTy {

compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
695695
.find_map(find_fn_kind_from_did),
696696
ty::Alias(ty::Opaque, ty::AliasTy { def_id, args, .. }) => tcx
697697
.explicit_item_bounds(def_id)
698-
.arg_iter_copied(tcx, args)
698+
.iter_instantiated_copied(tcx, args)
699699
.find_map(|(clause, span)| find_fn_kind_from_did((clause, span))),
700700
ty::Closure(_, args) => match args.as_closure().kind() {
701701
ty::ClosureKind::Fn => Some(hir::Mutability::Not),

compiler/rustc_codegen_cranelift/example/float-minmax-pass.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ fn main() {
2222

2323
#[cfg(not(any(target_arch = "mips", target_arch = "mips64")))]
2424
let nan = f32::NAN;
25-
// MIPS hardware treats f32::NAN as SNAN. Clear the signaling bit.
25+
// MIPS hardware except MIPS R6 treats f32::NAN as SNAN. Clear the signaling bit.
2626
// See https://github.com/rust-lang/rust/issues/52746.
2727
#[cfg(any(target_arch = "mips", target_arch = "mips64"))]
2828
let nan = f32::from_bits(f32::NAN.to_bits() - 1);

compiler/rustc_codegen_gcc/example/alloc_system.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@
1010
#[cfg(any(target_arch = "x86",
1111
target_arch = "arm",
1212
target_arch = "mips",
13+
target_arch = "mips32r6",
1314
target_arch = "powerpc",
1415
target_arch = "powerpc64"))]
1516
const MIN_ALIGN: usize = 8;
1617
#[cfg(any(target_arch = "x86_64",
1718
target_arch = "aarch64",
1819
target_arch = "loongarch64",
1920
target_arch = "mips64",
21+
target_arch = "mips64r6",
2022
target_arch = "s390x",
2123
target_arch = "sparc64"))]
2224
const MIN_ALIGN: usize = 16;

compiler/rustc_codegen_llvm/messages.ftl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
codegen_llvm_copy_bitcode = failed to copy bitcode to object file: {$err}
22
33
codegen_llvm_dlltool_fail_import_library =
4-
Dlltool could not create import library: {$stdout}
4+
Dlltool could not create import library with {$dlltool_path} {$dlltool_args}:
5+
{$stdout}
56
{$stderr}
67
78
codegen_llvm_dynamic_linking_with_lto =

compiler/rustc_codegen_llvm/src/attributes.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,10 @@ pub fn from_fn_attrs<'ll, 'tcx>(
335335
to_add.extend(probestack_attr(cx));
336336
to_add.extend(stackprotector_attr(cx));
337337

338+
if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::NO_BUILTINS) {
339+
to_add.push(llvm::CreateAttrString(cx.llcx, "no-builtins"));
340+
}
341+
338342
if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::COLD) {
339343
to_add.push(AttributeKind::Cold.create_attr(cx.llcx));
340344
}

compiler/rustc_codegen_llvm/src/back/archive.rs

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -198,25 +198,24 @@ impl ArchiveBuilderBuilder for LlvmArchiveBuilderBuilder {
198198
"arm" => ("arm", "--32"),
199199
_ => panic!("unsupported arch {}", sess.target.arch),
200200
};
201-
let result = std::process::Command::new(&dlltool)
202-
.args([
203-
"-d",
204-
def_file_path.to_str().unwrap(),
205-
"-D",
206-
lib_name,
207-
"-l",
208-
output_path.to_str().unwrap(),
209-
"-m",
210-
dlltool_target_arch,
211-
"-f",
212-
dlltool_target_bitness,
213-
"--no-leading-underscore",
214-
"--temp-prefix",
215-
temp_prefix.to_str().unwrap(),
216-
])
217-
.output();
218-
219-
match result {
201+
let mut dlltool_cmd = std::process::Command::new(&dlltool);
202+
dlltool_cmd.args([
203+
"-d",
204+
def_file_path.to_str().unwrap(),
205+
"-D",
206+
lib_name,
207+
"-l",
208+
output_path.to_str().unwrap(),
209+
"-m",
210+
dlltool_target_arch,
211+
"-f",
212+
dlltool_target_bitness,
213+
"--no-leading-underscore",
214+
"--temp-prefix",
215+
temp_prefix.to_str().unwrap(),
216+
]);
217+
218+
match dlltool_cmd.output() {
220219
Err(e) => {
221220
sess.emit_fatal(ErrorCallingDllTool {
222221
dlltool_path: dlltool.to_string_lossy(),
@@ -226,6 +225,12 @@ impl ArchiveBuilderBuilder for LlvmArchiveBuilderBuilder {
226225
// dlltool returns '0' on failure, so check for error output instead.
227226
Ok(output) if !output.stderr.is_empty() => {
228227
sess.emit_fatal(DlltoolFailImportLibrary {
228+
dlltool_path: dlltool.to_string_lossy(),
229+
dlltool_args: dlltool_cmd
230+
.get_args()
231+
.map(|arg| arg.to_string_lossy())
232+
.collect::<Vec<_>>()
233+
.join(" "),
229234
stdout: String::from_utf8_lossy(&output.stdout),
230235
stderr: String::from_utf8_lossy(&output.stderr),
231236
})

compiler/rustc_codegen_llvm/src/errors.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ pub(crate) struct ErrorCallingDllTool<'a> {
8181
#[derive(Diagnostic)]
8282
#[diag(codegen_llvm_dlltool_fail_import_library)]
8383
pub(crate) struct DlltoolFailImportLibrary<'a> {
84+
pub dlltool_path: Cow<'a, str>,
85+
pub dlltool_args: String,
8486
pub stdout: Cow<'a, str>,
8587
pub stderr: Cow<'a, str>,
8688
}

0 commit comments

Comments
 (0)