Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 14 pull requests #130133

Merged
merged 49 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
3a693f2
Preparing for merge from rustc
Sep 1, 2024
a9477c7
Merge from rustc
Sep 1, 2024
b71297f
fmt
Sep 1, 2024
53451c2
move addr_from_alloc_id logic into its own function
RalfJung Sep 1, 2024
3c0996b
Auto merge of #3854 - rust-lang:rustup-2024-09-01, r=RalfJung
bors Sep 1, 2024
4ee58db
Upgrade CI's mingw-w64 toolchain
mati865 Aug 25, 2024
f2696ab
rustdoc: normalise type/field names in rustdoc-json-types/jsondoclint
its-the-shrimp Aug 4, 2024
6c09243
Preparing for merge from rustc
Sep 2, 2024
9fe4539
Merge from rustc
Sep 2, 2024
747f680
Use sysroot crates maximally in `rustc_codegen_gcc`.
nnethercote Sep 2, 2024
d0f23b4
Auto merge of #3857 - rust-lang:rustup-2024-09-02, r=RalfJung
bors Sep 2, 2024
de96082
Enable native libraries on macOS
jder Sep 1, 2024
989f63b
Auto merge of #3856 - jder:mac-native-libs, r=RalfJung
bors Sep 3, 2024
5f22103
Detect pthread_mutex_t is moved
Mandragorian Jul 27, 2024
18d358c
Auto merge of #3784 - Mandragorian:detect_moved_mutexes, r=RalfJung
bors Sep 5, 2024
81a08bc
Preparing for merge from rustc
Sep 6, 2024
2fccb4b
Merge from rustc
Sep 6, 2024
0903724
Auto merge of #3862 - rust-lang:rustup-2024-09-06, r=RalfJung
bors Sep 6, 2024
2d6489e
miri.bat: use nightly toolchain
RalfJung Sep 6, 2024
72aa65b
Auto merge of #3864 - RalfJung:miri-bat-nightly, r=RalfJung
bors Sep 6, 2024
4dfafb1
Fix comment in mutex_id_offset
Mandragorian Sep 6, 2024
59cb24d
Auto merge of #3865 - Mandragorian:doc_fixes_pthreads, r=RalfJung
bors Sep 6, 2024
c1ff6fd
Fix a typo in the wasm-component-ld README
alexcrichton Sep 6, 2024
c15469a
Fix enabling wasm-component-ld to match other tools
alexcrichton Sep 6, 2024
c788dcc
Test codegen when setting deployment target
madsmtm Sep 7, 2024
c0b0627
Rename variant `AddrOfRegion` of `RegionVariableOrigin` to `BorrowReg…
gurry Sep 7, 2024
f7d4da6
remove 'const' from 'Option::iter'
RalfJung Sep 7, 2024
03e0c8e
make Result::copied unstably const
RalfJung Sep 7, 2024
cfe85a3
Fixes typo in wasm32-wasip2 doc comment
zslayton Sep 7, 2024
3de6838
add some FIXME(const-hack)
RalfJung Sep 8, 2024
ec11001
run-make-support: Add llvm-pdbutil
nebulark Sep 6, 2024
f7b4f4a
Option, Result: put the &mut variants of 'copied' under the same feat…
RalfJung Sep 8, 2024
11d51aa
const: make ptr.is_null() stop execution on ambiguity
RalfJung Sep 8, 2024
5f3fdd1
Remove needless returns detected by clippy in libraries
eduardosm Sep 8, 2024
7626015
added support for GNU/Hurd on x86_64
sthibaul Jul 26, 2024
1ea466b
Rollup merge of #119229 - mati865:update-mingw-toolchain, r=jieyouxu,…
workingjubilee Sep 9, 2024
2cce01e
Rollup merge of #128345 - sthibaul:hurd-amd64, r=Urgau
workingjubilee Sep 9, 2024
4cfb1c3
Rollup merge of #128667 - its-the-shrimp:rustdoc_json_types_rename, r…
workingjubilee Sep 9, 2024
15c7d27
Rollup merge of #129876 - nnethercote:more-sysroot-rustc_codegen_gcc,…
workingjubilee Sep 9, 2024
c21d31a
Rollup merge of #130034 - alexcrichton:fix-some-wasm-component-ld-com…
workingjubilee Sep 9, 2024
97d62ac
Rollup merge of #130048 - nebulark:runmake_llvm_pdbutil, r=jieyouxu
workingjubilee Sep 9, 2024
fd938c7
Rollup merge of #130068 - madsmtm:deployment-target-test, r=jieyouxu
workingjubilee Sep 9, 2024
09373b9
Rollup merge of #130070 - gurry:rename-regionkind-addof-to-ref, r=com…
workingjubilee Sep 9, 2024
38520ae
Rollup merge of #130087 - RalfJung:option-const-iter, r=workingjubilee
workingjubilee Sep 9, 2024
4a26f3b
Rollup merge of #130090 - RalfJung:result-copied, r=Noratrieb
workingjubilee Sep 9, 2024
a7c5797
Rollup merge of #130092 - zslayton:master, r=jieyouxu
workingjubilee Sep 9, 2024
fad44c4
Rollup merge of #130107 - RalfJung:const-ptr-is-null, r=oli-obk
workingjubilee Sep 9, 2024
2f1cf6f
Rollup merge of #130115 - eduardosm:needless-returns-libs, r=workingj…
workingjubilee Sep 9, 2024
3e01a5d
Rollup merge of #130130 - RalfJung:miri-sync, r=RalfJung
workingjubilee Sep 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
176 changes: 0 additions & 176 deletions compiler/rustc_codegen_gcc/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,63 +11,12 @@ dependencies = [
"memchr",
]

[[package]]
name = "bitflags"
version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"

[[package]]
name = "bitflags"
version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635"

[[package]]
name = "boml"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85fdb93f04c73bff54305fa437ffea5449c41edcaadfe882f35836206b166ac5"

[[package]]
name = "cc"
version = "1.0.79"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"

[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"

[[package]]
name = "errno"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a"
dependencies = [
"errno-dragonfly",
"libc",
"windows-sys",
]

[[package]]
name = "errno-dragonfly"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"
dependencies = [
"cc",
"libc",
]

[[package]]
name = "fastrand"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764"

[[package]]
name = "fm"
version = "0.2.2"
Expand Down Expand Up @@ -132,12 +81,6 @@ version = "0.2.150"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c"

[[package]]
name = "linux-raw-sys"
version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503"

[[package]]
name = "memchr"
version = "2.5.0"
Expand All @@ -154,24 +97,6 @@ dependencies = [
"libc",
]

[[package]]
name = "object"
version = "0.30.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385"
dependencies = [
"memchr",
]

[[package]]
name = "redox_syscall"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29"
dependencies = [
"bitflags 1.3.2",
]

[[package]]
name = "regex"
version = "1.8.4"
Expand All @@ -196,22 +121,6 @@ dependencies = [
"boml",
"gccjit",
"lang_tester",
"object",
"smallvec",
"tempfile",
]

[[package]]
name = "rustix"
version = "0.38.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19ed4fa021d81c8392ce04db050a3da9a60299050b7ae1cf482d862b54a7218f"
dependencies = [
"bitflags 2.4.0",
"errno",
"libc",
"linux-raw-sys",
"windows-sys",
]

[[package]]
Expand All @@ -223,25 +132,6 @@ dependencies = [
"winapi-util",
]

[[package]]
name = "smallvec"
version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0"

[[package]]
name = "tempfile"
version = "3.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc02fddf48964c42031a0b3fe0428320ecf3a73c401040fc0096f97794310651"
dependencies = [
"cfg-if",
"fastrand",
"redox_syscall",
"rustix",
"windows-sys",
]

[[package]]
name = "termcolor"
version = "1.2.0"
Expand Down Expand Up @@ -315,69 +205,3 @@ name = "winapi-x86_64-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"

[[package]]
name = "windows-sys"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
dependencies = [
"windows-targets",
]

[[package]]
name = "windows-targets"
version = "0.48.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
"windows_i686_gnu",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_gnullvm",
"windows_x86_64_msvc",
]

[[package]]
name = "windows_aarch64_gnullvm"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc"

[[package]]
name = "windows_aarch64_msvc"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3"

[[package]]
name = "windows_i686_gnu"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241"

[[package]]
name = "windows_i686_msvc"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00"

[[package]]
name = "windows_x86_64_gnu"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1"

[[package]]
name = "windows_x86_64_gnullvm"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953"

[[package]]
name = "windows_x86_64_msvc"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
10 changes: 0 additions & 10 deletions compiler/rustc_codegen_gcc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,11 @@ default = ["master"]

[dependencies]
gccjit = "2.1"

# Local copy.
#gccjit = { path = "../gccjit.rs" }

object = { version = "0.30.1", default-features = false, features = [
"std",
"read",
] }
smallvec = { version = "1.6.1", features = ["union", "may_dangle"] }
# TODO(antoyo): make tempfile optional.
tempfile = "3.7.1"

[dev-dependencies]
lang_tester = "0.8.0"
tempfile = "3.1.0"
boml = "0.3.1"

[profile.dev]
Expand Down
10 changes: 8 additions & 2 deletions compiler/rustc_codegen_gcc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@
#![deny(clippy::pattern_type_mismatch)]
#![allow(clippy::needless_lifetimes)]

// Some "regular" crates we want to share with rustc
extern crate object;
extern crate smallvec;
extern crate tempfile;
#[macro_use]
extern crate tracing;

// The rustc crates we need
extern crate rustc_apfloat;
extern crate rustc_ast;
extern crate rustc_attr;
Expand All @@ -42,8 +50,6 @@ extern crate rustc_middle;
extern crate rustc_session;
extern crate rustc_span;
extern crate rustc_target;
#[macro_use]
extern crate tracing;

// This prevents duplicating functions and statics that are already part of the host rustc process.
#[allow(unused_extern_crates)]
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir_typeck/src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
// this time with enough precision to check that the value
// whose address was taken can actually be made to live as long
// as it needs to live.
let region = self.next_region_var(infer::AddrOfRegion(expr.span));
let region = self.next_region_var(infer::BorrowRegion(expr.span));
Ty::new_ref(self.tcx, region, ty, mutbl)
}
}
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_infer/src/infer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,8 @@ pub enum RegionVariableOrigin {
PatternRegion(Span),

/// Regions created by `&` operator.
///
AddrOfRegion(Span),
BorrowRegion(Span),

/// Regions created as part of an autoref of a method receiver.
Autoref(Span),

Expand Down Expand Up @@ -1741,7 +1741,7 @@ impl RegionVariableOrigin {
match *self {
MiscVariable(a)
| PatternRegion(a)
| AddrOfRegion(a)
| BorrowRegion(a)
| Autoref(a)
| Coercion(a)
| RegionParameterDefinition(a, ..)
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_target/src/spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1645,6 +1645,7 @@ supported_targets! {
("x86_64-unknown-haiku", x86_64_unknown_haiku),

("i686-unknown-hurd-gnu", i686_unknown_hurd_gnu),
("x86_64-unknown-hurd-gnu", x86_64_unknown_hurd_gnu),

("aarch64-apple-darwin", aarch64_apple_darwin),
("arm64e-apple-darwin", arm64e_apple_darwin),
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_target/src/spec/targets/wasm32_wasip2.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! The `wasm32-wasip2` target is the next evolution of the
//! wasm32-wasi target. While the wasi specification is still under
//! active development, the {review 2 iteration is considered an "island
//! active development, the preview 2 iteration is considered an "island
//! of stability" that should allow users to rely on it indefinitely.
//!
//! The `wasi` target is a proposal to define a standardized set of WebAssembly
Expand Down
26 changes: 26 additions & 0 deletions compiler/rustc_target/src/spec/targets/x86_64_unknown_hurd_gnu.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target};

pub(crate) fn target() -> Target {
let mut base = base::hurd_gnu::opts();
base.cpu = "x86-64".into();
base.plt_by_default = false;
base.max_atomic_width = Some(64);
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]);
base.stack_probes = StackProbeType::Inline;
base.supports_xray = true;

Target {
llvm_target: "x86_64-unknown-hurd-gnu".into(),
metadata: crate::spec::TargetMetadata {
description: Some("64-bit GNU/Hurd".into()),
tier: Some(3),
host_tools: Some(true),
std: Some(true),
},
pointer_width: 64,
data_layout:
"e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(),
arch: "x86_64".into(),
options: base,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
let var_description = match var_origin {
infer::MiscVariable(_) => String::new(),
infer::PatternRegion(_) => " for pattern".to_string(),
infer::AddrOfRegion(_) => " for borrow expression".to_string(),
infer::BorrowRegion(_) => " for borrow expression".to_string(),
infer::Autoref(_) => " for autoref".to_string(),
infer::Coercion(_) => " for automatic coercion".to_string(),
infer::BoundRegion(_, br, infer::FnCall) => {
Expand Down
4 changes: 2 additions & 2 deletions library/alloc/src/collections/vec_deque/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ impl<'a, T> Iterator for Iter<'a, T> {
fn advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>> {
let remaining = self.i1.advance_by(n);
match remaining {
Ok(()) => return Ok(()),
Ok(()) => Ok(()),
Err(n) => {
mem::swap(&mut self.i1, &mut self.i2);
self.i1.advance_by(n.get())
Expand Down Expand Up @@ -144,7 +144,7 @@ impl<'a, T> DoubleEndedIterator for Iter<'a, T> {

fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero<usize>> {
match self.i2.advance_back_by(n) {
Ok(()) => return Ok(()),
Ok(()) => Ok(()),
Err(n) => {
mem::swap(&mut self.i1, &mut self.i2);
self.i2.advance_back_by(n.get())
Expand Down
4 changes: 2 additions & 2 deletions library/alloc/src/collections/vec_deque/iter_mut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl<'a, T> Iterator for IterMut<'a, T> {

fn advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>> {
match self.i1.advance_by(n) {
Ok(()) => return Ok(()),
Ok(()) => Ok(()),
Err(remaining) => {
mem::swap(&mut self.i1, &mut self.i2);
self.i1.advance_by(remaining.get())
Expand Down Expand Up @@ -135,7 +135,7 @@ impl<'a, T> DoubleEndedIterator for IterMut<'a, T> {

fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero<usize>> {
match self.i2.advance_back_by(n) {
Ok(()) => return Ok(()),
Ok(()) => Ok(()),
Err(remaining) => {
mem::swap(&mut self.i1, &mut self.i2);
self.i2.advance_back_by(remaining.get())
Expand Down
2 changes: 1 addition & 1 deletion library/alloc/src/vec/in_place_collect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ const fn needs_realloc<SRC, DEST>(src_cap: usize, dst_cap: usize) -> bool {

// type layouts don't guarantee a fit, so do a runtime check to see if
// the allocations happen to match
return src_cap > 0 && src_cap * mem::size_of::<SRC>() != dst_cap * mem::size_of::<DEST>();
src_cap > 0 && src_cap * mem::size_of::<SRC>() != dst_cap * mem::size_of::<DEST>()
}

/// This provides a shorthand for the source type since local type aliases aren't a thing.
Expand Down
Loading
Loading