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 19 pull requests #130127

Closed
wants to merge 53 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
2dbc976
Distribute rustc_codegen_cranelift for Windows
bjorn3 Aug 10, 2024
893413d
Add a run-make test for checking that certain `rustc_` crates build o…
Kobzol Aug 24, 2024
7957140
inhibit proc-macro2 nightly detection
lqd Aug 24, 2024
d9794a9
run test in tmp dir and emit artifacts there
lqd Aug 24, 2024
2190c28
remove use of RUSTC_BOOTSTRAP and cargo nightly features
lqd Aug 25, 2024
0577035
separate the crates to test from the test setup
lqd Aug 25, 2024
f1df0c5
remove unneeded type ascription
lqd Aug 25, 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
747f680
Use sysroot crates maximally in `rustc_codegen_gcc`.
nnethercote Sep 2, 2024
a178559
address review comments
lqd Sep 2, 2024
8f0ea94
Pin memchr to 2.5.0 in the library rather than rustc_ast
tgross35 Aug 26, 2024
9c671a1
Run `cargo update` in the root, library, and rustbook
tgross35 Aug 26, 2024
07c0585
Adjust allowed dependencies from the latest `cargo update`
tgross35 Aug 26, 2024
7dd1be1
Also emit `missing_docs` lint with `--test` to fulfill expectations
Urgau Sep 6, 2024
f6d2cfc
Add missing `#[allow(missing_docs)]` on hack functions in alloc
Urgau Sep 6, 2024
ae661dd
Don't emit `missing_docs` lint with dummy spans
Urgau Sep 6, 2024
5f367bb
Make `download-ci-llvm = true` check if CI llvm is available
Urgau Aug 23, 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
3782251
librustdoc::config: removed Input from Options
EtomicBomb Aug 27, 2024
2e1cba6
rfc#3662 changes under unstable flags
EtomicBomb Aug 20, 2024
548b6e1
add tests for behavior in rfc#3662
EtomicBomb 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
4e0c58f
Rollup merge of #119229 - mati865:update-mingw-toolchain, r=jieyouxu,…
workingjubilee Sep 9, 2024
aa18e98
Rollup merge of #128345 - sthibaul:hurd-amd64, r=Urgau
workingjubilee Sep 9, 2024
6c50e48
Rollup merge of #128667 - its-the-shrimp:rustdoc_json_types_rename, r…
workingjubilee Sep 9, 2024
1a645f1
Rollup merge of #128939 - bjorn3:windows_cg_clif_component, r=albertl…
workingjubilee Sep 9, 2024
2a97310
Rollup merge of #129337 - EtomicBomb:rfc, r=notriddle
workingjubilee Sep 9, 2024
feda28d
Rollup merge of #129473 - Urgau:fix-llvm-if-unchanged, r=onur-ozkan
workingjubilee Sep 9, 2024
c5de40e
Rollup merge of #129529 - lqd:stable-new-solver, r=Kobzol
workingjubilee Sep 9, 2024
0d8ad47
Rollup merge of #129624 - tgross35:cargo-update, r=Mark-Simulacrum
workingjubilee Sep 9, 2024
0785e3d
Rollup merge of #129876 - nnethercote:more-sysroot-rustc_codegen_gcc,…
workingjubilee Sep 9, 2024
844cc98
Rollup merge of #130025 - Urgau:missing_docs-expect, r=petrochenkov
workingjubilee Sep 9, 2024
4faf77d
Rollup merge of #130034 - alexcrichton:fix-some-wasm-component-ld-com…
workingjubilee Sep 9, 2024
8678d8d
Rollup merge of #130048 - nebulark:runmake_llvm_pdbutil, r=jieyouxu
workingjubilee Sep 9, 2024
6def68a
Rollup merge of #130068 - madsmtm:deployment-target-test, r=jieyouxu
workingjubilee Sep 9, 2024
1a7b68a
Rollup merge of #130070 - gurry:rename-regionkind-addof-to-ref, r=com…
workingjubilee Sep 9, 2024
10f66fb
Rollup merge of #130087 - RalfJung:option-const-iter, r=workingjubilee
workingjubilee Sep 9, 2024
d2353ef
Rollup merge of #130090 - RalfJung:result-copied, r=Noratrieb
workingjubilee Sep 9, 2024
d6288ce
Rollup merge of #130092 - zslayton:master, r=jieyouxu
workingjubilee Sep 9, 2024
1d371d0
Rollup merge of #130107 - RalfJung:const-ptr-is-null, r=oli-obk
workingjubilee Sep 9, 2024
61b447d
Rollup merge of #130115 - eduardosm:needless-returns-libs, r=workingj…
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
284 changes: 153 additions & 131 deletions Cargo.lock

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions compiler/rustc_ast/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ version = "0.0.0"
edition = "2021"

[dependencies]
# FIXME: bumping memchr to 2.7.1 causes linker errors in MSVC thin-lto
# tidy-alphabetical-start
bitflags = "2.4.1"
memchr = "=2.5.0"
memchr = "2.7.4"
rustc_ast_ir = { path = "../rustc_ast_ir" }
rustc_data_structures = { path = "../rustc_data_structures" }
rustc_index = { path = "../rustc_index" }
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_cranelift/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ For more docs on how to build and test see [build_system/usage.txt](build_system
|AIX|❌[^xcoff]|N/A|N/A|❌[^xcoff]|
|Other unixes|❓|❓|❓|❓|
|macOS|✅|✅|N/A|N/A|
|Windows|✅[^no-rustup]|❌|N/A|N/A|
|Windows|✅|❌|N/A|N/A|

✅: Fully supported and tested
❓: Maybe supported, not tested
Expand Down
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
15 changes: 4 additions & 11 deletions compiler/rustc_lint/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,12 +426,6 @@ impl MissingDoc {
article: &'static str,
desc: &'static str,
) {
// If we're building a test harness, then warning about
// documentation is probably not really relevant right now.
if cx.sess().opts.test {
return;
}

// Only check publicly-visible items, using the result from the privacy pass.
// It's an option so the crate root can also use this function (it doesn't
// have a `NodeId`).
Expand All @@ -444,11 +438,10 @@ impl MissingDoc {
let attrs = cx.tcx.hir().attrs(cx.tcx.local_def_id_to_hir_id(def_id));
let has_doc = attrs.iter().any(has_doc);
if !has_doc {
cx.emit_span_lint(
MISSING_DOCS,
cx.tcx.def_span(def_id),
BuiltinMissingDoc { article, desc },
);
let sp = cx.tcx.def_span(def_id);
if !sp.is_dummy() {
cx.emit_span_lint(MISSING_DOCS, sp, BuiltinMissingDoc { article, desc });
}
}
}
}
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
Loading
Loading