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 8 pull requests #136454

Merged
merged 75 commits into from
Feb 3, 2025
Merged
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
928f306
Avoid a bool and use an Option of ZST instead
oli-obk Oct 1, 2024
18f8310
Bump ui_test
oli-obk Oct 7, 2024
396691a
Merge pull request #4155 from oli-obk/push-sloyuvlsvqxn
RalfJung Jan 27, 2025
74234de
Preparing for merge from rustc
RalfJung Jan 28, 2025
7bd29f8
Merge from rustc
RalfJung Jan 28, 2025
051829e
linker messages are no longer warnings by default
RalfJung Jan 28, 2025
6963ecd
Merge pull request #4157 from RalfJung/rustup
RalfJung Jan 28, 2025
73997ec
Added a helper to dedup target OS checks
YohDeadfall Jan 28, 2025
510e6f2
Bump ui test
oli-obk Jan 27, 2025
54d0054
Merge pull request #4161 from oli-obk/push-vnpvrkxznklo
RalfJung Jan 28, 2025
79fcb1d
Merge pull request #4160 from YohDeadfall/check-os-helper
RalfJung Jan 28, 2025
548929f
Preparing for merge from rustc
Jan 29, 2025
667da1e
Merge from rustc
Jan 29, 2025
1e6081f
Check fixed arg number for variadic function.
tiif Jan 4, 2025
bf1e4a1
make struct-variant matches less future-proof, and other clippy fixes
RalfJung Jan 29, 2025
b1d927e
Merge pull request #4122 from tiif/fnabi
RalfJung Jan 29, 2025
4f8492c
Merge pull request #4162 from rust-lang/rustup-2025-01-29
RalfJung Jan 29, 2025
4a329e9
Set the st_fstype filed on Solaris
YohDeadfall Jan 28, 2025
9894a06
Merge pull request #4159 from YohDeadfall/write-st-fstype-on-solaris
RalfJung Jan 29, 2025
851ce41
Preparing for merge from rustc
Jan 30, 2025
b8ee38d
Merge from rustc
Jan 30, 2025
92f7763
fmt
Jan 30, 2025
12058e8
Merge pull request #4163 from rust-lang/rustup-2025-01-30
oli-obk Jan 30, 2025
a041f3b
fix clippy lint manual_repeat_n
RalfJung Jan 30, 2025
8a893ab
Merge pull request #4164 from RalfJung/manual_repeat_n
RalfJung Jan 30, 2025
562b282
use deref_pointer_as instead of deref_pointer
geetanshjuneja Jan 30, 2025
e1d0507
Merge pull request #4140 from geetanshjuneja/deref
RalfJung Jan 30, 2025
dc36775
Preparing for merge from rustc
Jan 31, 2025
7f414f9
Merge from rustc
Jan 31, 2025
74ca1cf
fmt
Jan 31, 2025
4d42046
CompileTest: Add Directives to Ignore `arm-unknown-*` Tests
veera-sivarajan Jan 31, 2025
bcda892
Merge pull request #4166 from rust-lang/rustup-2025-01-31
oli-obk Jan 31, 2025
25cdd06
increase thread limit for many-seeds mode
RalfJung Jan 31, 2025
7ad8dba
Merge pull request #4168 from RalfJung/many-threads
RalfJung Jan 31, 2025
883ba24
clarify apply_random_float_error logic
RalfJung Jan 31, 2025
829bfc3
Merge pull request #4167 from RalfJung/apply_random_float_error
RalfJung Jan 31, 2025
027ce39
Preparing for merge from rustc
Feb 1, 2025
aa74d61
Merge from rustc
Feb 1, 2025
c925c82
fmt
Feb 1, 2025
b82463f
Merge pull request #4169 from rust-lang/rustup-2025-02-01
saethlin Feb 1, 2025
13f3132
Bump rand to 0.9 and getrandom to 0.3
eduardosm Feb 1, 2025
eab3528
Test getrandom 0.3
eduardosm Feb 1, 2025
da5e2d7
Merge pull request #4170 from eduardosm/update-rand
RalfJung Feb 1, 2025
43b729d
Fix two malformed error annotations in a UI test
fmease Feb 1, 2025
b892636
Explain why we retroactively change a static initializer to have a di…
oli-obk Jan 31, 2025
9ebbba4
Shorten error message for callable with wrong return type
estebank Feb 2, 2025
44482a5
Remove unused `ToType` trait.
nnethercote Feb 2, 2025
000f8c4
Move `unify_key` module.
nnethercote Feb 2, 2025
726c9d8
miri_get_backtrace: stop supporting the v0 protocol
RalfJung Feb 2, 2025
bf69458
Preparing for merge from rustc
RalfJung Feb 2, 2025
f034a15
Merge from rustc
RalfJung Feb 2, 2025
2a519a4
fix use of deprecated rand API
RalfJung Feb 2, 2025
cd13b44
Merge pull request #4173 from RalfJung/rustup
RalfJung Feb 2, 2025
d237378
Some cleanups around EarlyDiagCtxt
bjorn3 Feb 2, 2025
aa2b870
Slightly simplify DiagCtxt::make_silent
bjorn3 Feb 2, 2025
6556147
Use fallback fluent bundle from inner emitter in SilentEmitter
bjorn3 Feb 2, 2025
6a566ee
Replace ParseSess::set_dcx with DiagCtxt::set_emitter
bjorn3 Feb 2, 2025
35842d5
files: make read take callback to store result, rather than writing t…
RalfJung Feb 2, 2025
bc5e839
files: make write take callback to store result, rather than writing …
RalfJung Feb 2, 2025
6b656cc
Merge pull request #4174 from RalfJung/read-write-callback
RalfJung Feb 2, 2025
60e1c0c
Merge pull request #4172 from RalfJung/miri_get_backtrace
RalfJung Feb 2, 2025
2f2b32b
Test validity of pattern types
oli-obk Jan 27, 2025
2d6c9b4
shim Apple's futex primitives
joboet Jan 19, 2025
ded0836
Check the base type of pattern types for validity first
oli-obk Feb 2, 2025
7e4ccc2
Maintain a list of types permitted per pattern
oli-obk Jan 28, 2025
3262fab
Merge pull request #4142 from joboet/apple-futex
RalfJung Feb 2, 2025
df9a3f2
update lockfile
RalfJung Feb 2, 2025
f56e4b3
Rollup merge of #136145 - oli-obk:push-wxvpklmkppqz, r=RalfJung
matthiaskrgr Feb 2, 2025
4d3a4ee
Rollup merge of #136339 - veera-sivarajan:ignore-arm-unknown-headers,…
matthiaskrgr Feb 2, 2025
5ab356f
Rollup merge of #136403 - fmease:fix-a-ui-test, r=oli-obk
matthiaskrgr Feb 2, 2025
dc4d387
Rollup merge of #136414 - estebank:expected-return-type, r=oli-obk
matthiaskrgr Feb 2, 2025
0429945
Rollup merge of #136425 - nnethercote:mv-rustc_middle-infer, r=lcnr
matthiaskrgr Feb 2, 2025
f5ae630
Rollup merge of #136426 - oli-obk:push-nkpuulwurykn, r=compiler-errors
matthiaskrgr Feb 2, 2025
f1bdf3b
Rollup merge of #136445 - bjorn3:diag_ctxt_cleanup, r=oli-obk
matthiaskrgr Feb 2, 2025
a8055f9
Rollup merge of #136452 - RalfJung:miri-sync, r=RalfJung
matthiaskrgr Feb 2, 2025
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
153 changes: 130 additions & 23 deletions Cargo.lock
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ dependencies = [
"cfg-if",
"once_cell",
"version_check",
"zerocopy",
"zerocopy 0.7.35",
]

[[package]]
@@ -567,7 +567,7 @@ dependencies = [
"termize",
"tokio",
"toml 0.7.8",
"ui_test",
"ui_test 0.26.5",
"walkdir",
]

@@ -1442,7 +1442,19 @@ checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
dependencies = [
"cfg-if",
"libc",
"wasi",
"wasi 0.11.0+wasi-snapshot-preview1",
]

[[package]]
name = "getrandom"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8"
dependencies = [
"cfg-if",
"libc",
"wasi 0.13.3+wasi-0.2.2",
"windows-targets 0.52.6",
]

[[package]]
@@ -2342,18 +2354,18 @@ dependencies = [
"chrono-tz",
"colored",
"directories",
"getrandom",
"getrandom 0.3.1",
"libc",
"libffi",
"libloading",
"measureme",
"rand",
"rand 0.9.0",
"regex",
"rustc_version",
"smallvec",
"tempfile",
"tikv-jemalloc-sys",
"ui_test",
"ui_test 0.28.0",
"windows-sys 0.52.0",
]

@@ -2782,7 +2794,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6"
dependencies = [
"phf_shared 0.10.0",
"rand",
"rand 0.8.5",
]

[[package]]
@@ -2792,7 +2804,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d"
dependencies = [
"phf_shared 0.11.3",
"rand",
"rand 0.8.5",
]

[[package]]
@@ -2860,7 +2872,7 @@ version = "0.2.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04"
dependencies = [
"zerocopy",
"zerocopy 0.7.35",
]

[[package]]
@@ -2978,8 +2990,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
dependencies = [
"libc",
"rand_chacha",
"rand_core",
"rand_chacha 0.3.1",
"rand_core 0.6.4",
]

[[package]]
name = "rand"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94"
dependencies = [
"rand_chacha 0.9.0",
"rand_core 0.9.0",
"zerocopy 0.8.14",
]

[[package]]
@@ -2989,7 +3012,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
dependencies = [
"ppv-lite86",
"rand_core",
"rand_core 0.6.4",
]

[[package]]
name = "rand_chacha"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"
dependencies = [
"ppv-lite86",
"rand_core 0.9.0",
]

[[package]]
@@ -2998,7 +3031,17 @@ version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
dependencies = [
"getrandom",
"getrandom 0.2.15",
]

[[package]]
name = "rand_core"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b08f3c9802962f7e1b25113931d94f43ed9725bebc59db9d0c3e9a23b67e15ff"
dependencies = [
"getrandom 0.3.1",
"zerocopy 0.8.14",
]

[[package]]
@@ -3007,7 +3050,7 @@ version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa"
dependencies = [
"rand_core",
"rand_core 0.6.4",
]

[[package]]
@@ -3045,7 +3088,7 @@ version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43"
dependencies = [
"getrandom",
"getrandom 0.2.15",
"libredox",
"thiserror 1.0.69",
]
@@ -3283,7 +3326,7 @@ name = "rustc_abi"
version = "0.0.0"
dependencies = [
"bitflags",
"rand",
"rand 0.8.5",
"rand_xoshiro",
"rustc_data_structures",
"rustc_feature",
@@ -3897,7 +3940,7 @@ dependencies = [
name = "rustc_incremental"
version = "0.0.0"
dependencies = [
"rand",
"rand 0.8.5",
"rustc_ast",
"rustc_data_structures",
"rustc_errors",
@@ -5218,7 +5261,7 @@ checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704"
dependencies = [
"cfg-if",
"fastrand",
"getrandom",
"getrandom 0.2.15",
"once_cell",
"rustix",
"windows-sys 0.59.0",
@@ -5281,8 +5324,8 @@ version = "0.1.0"
dependencies = [
"indicatif",
"num",
"rand",
"rand_chacha",
"rand 0.8.5",
"rand_chacha 0.3.1",
"rayon",
]

@@ -5602,7 +5645,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675"
dependencies = [
"cfg-if",
"rand",
"rand 0.8.5",
"static_assertions",
]

@@ -5662,6 +5705,32 @@ dependencies = [
"spanned",
]

[[package]]
name = "ui_test"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7484683d60d50ca1d1b6433c3dbf6c5ad71d20387acdcfb16fe79573f3fba576"
dependencies = [
"annotate-snippets 0.11.5",
"anyhow",
"bstr",
"cargo-platform",
"cargo_metadata 0.18.1",
"color-eyre",
"colored",
"comma",
"crossbeam-channel",
"indicatif",
"levenshtein",
"prettydiff",
"regex",
"rustc_version",
"rustfix",
"serde",
"serde_json",
"spanned",
]

[[package]]
name = "unic-langid"
version = "0.9.5"
@@ -5843,7 +5912,7 @@ version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "744018581f9a3454a9e15beb8a33b017183f1e7c0cd170232a2d1453b23a51c4"
dependencies = [
"getrandom",
"getrandom 0.2.15",
]

[[package]]
@@ -5880,6 +5949,15 @@ version = "0.11.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"

[[package]]
name = "wasi"
version = "0.13.3+wasi-0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2"
dependencies = [
"wit-bindgen-rt",
]

[[package]]
name = "wasi-preview1-component-adapter-provider"
version = "29.0.1"
@@ -6475,6 +6553,15 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ab703352da6a72f35c39a533526393725640575bb211f61987a2748323ad956"

[[package]]
name = "wit-bindgen-rt"
version = "0.33.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c"
dependencies = [
"bitflags",
]

[[package]]
name = "wit-component"
version = "0.223.0"
@@ -6584,7 +6671,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
dependencies = [
"byteorder",
"zerocopy-derive",
"zerocopy-derive 0.7.35",
]

[[package]]
name = "zerocopy"
version = "0.8.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a367f292d93d4eab890745e75a778da40909cab4d6ff8173693812f79c4a2468"
dependencies = [
"zerocopy-derive 0.8.14",
]

[[package]]
@@ -6598,6 +6694,17 @@ dependencies = [
"syn 2.0.96",
]

[[package]]
name = "zerocopy-derive"
version = "0.8.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3931cb58c62c13adec22e38686b559c86a30565e16ad6e8510a337cedc611e1"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.96",
]

[[package]]
name = "zerofrom"
version = "0.1.5"
10 changes: 8 additions & 2 deletions compiler/rustc_codegen_llvm/src/consts.rs
Original file line number Diff line number Diff line change
@@ -420,8 +420,14 @@ impl<'ll> CodegenCx<'ll, '_> {
let g = if val_llty == llty {
g
} else {
// If we created the global with the wrong type,
// correct the type.
// codegen_static_initializer creates the global value just from the
// `Allocation` data by generating one big struct value that is just
// all the bytes and pointers after each other. This will almost never
// match the type that the static was declared with. Unfortunately
// we can't just LLVMConstBitCast our way out of it because that has very
// specific rules on what can be cast. So instead of adding a new way to
// generate static initializers that match the static's type, we picked
// the easier option and retroactively change the type of the static item itself.
let name = llvm::get_value_name(g).to_vec();
llvm::set_value_name(g, b"");

11 changes: 11 additions & 0 deletions compiler/rustc_const_eval/src/interpret/validity.rs
Original file line number Diff line number Diff line change
@@ -1240,6 +1240,17 @@ impl<'rt, 'tcx, M: Machine<'tcx>> ValueVisitor<'tcx, M> for ValidityVisitor<'rt,
self.visit_field(val, 0, &self.ecx.project_index(val, 0)?)?;
}
}
ty::Pat(base, pat) => {
// First check that the base type is valid
self.visit_value(&val.transmute(self.ecx.layout_of(*base)?, self.ecx)?)?;
// When you extend this match, make sure to also add tests to
// tests/ui/type/pattern_types/validity.rs((
match **pat {
// Range patterns are precisely reflected into `valid_range` and thus
// handled fully by `visit_scalar` (called below).
ty::PatternKind::Range { .. } => {},
}
}
_ => {
// default handler
try_validation!(
19 changes: 9 additions & 10 deletions compiler/rustc_driver_impl/src/args.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::{env, error, fmt, fs, io};

use rustc_session::EarlyDiagCtxt;
use rustc_span::ErrorGuaranteed;

/// Expands argfiles in command line arguments.
#[derive(Default)]
@@ -118,22 +117,22 @@ pub fn arg_expand_all(early_dcx: &EarlyDiagCtxt, at_args: &[String]) -> Vec<Stri
///
/// This function is identical to [`env::args()`] except that it emits an error when it encounters
/// non-Unicode arguments instead of panicking.
pub fn raw_args(early_dcx: &EarlyDiagCtxt) -> Result<Vec<String>, ErrorGuaranteed> {
let mut res = Ok(Vec::new());
pub fn raw_args(early_dcx: &EarlyDiagCtxt) -> Vec<String> {
let mut args = Vec::new();
let mut guar = Ok(());
for (i, arg) in env::args_os().enumerate() {
match arg.into_string() {
Ok(arg) => {
if let Ok(args) = &mut res {
args.push(arg);
}
}
Ok(arg) => args.push(arg),
Err(arg) => {
res =
guar =
Err(early_dcx.early_err(format!("argument {i} is not valid Unicode: {arg:?}")))
}
}
}
res
if let Err(guar) = guar {
guar.raise_fatal();
}
args
}

#[derive(Debug)]
Loading
Loading