Skip to content

Commit ad49852

Browse files
committed
Auto merge of #159113 - jhpratt:rollup-xqDDX7W, r=jhpratt
Rollup of 15 pull requests Successful merges: - #159106 (Update LLVM) - #157690 (codegen_ssa: pack small const aggregates into immediate stores) - #159005 (Use `as_lang_item` instead of repeatedly matching) - #156735 (Move NativeLib::filename to the rmeta-link archive member) - #157153 (allow `Allocator`s to be used as `#[global_allocator]`s) - #158269 (jq directives for jsondocck) - #158767 (merge DefKind::InlineConst into AnonConst) - #159099 (Stabilize String::from_utf8_lossy_owned) - #158930 (Reorganize `tests/ui/issues` [20/N]) - #158965 (Add codegen test for Result is_ok unwrap) - #158979 (Reorganize `tests/ui/issues` [21/N]) - #159050 (assert only opaques with sub unified hidden infer are non-rigid) - #159062 (Remove unused WEAK_ONLY_LANG_ITEMS static) - #159070 (Add `io::ErrorKind::InputOutputError`) - #159092 (make volatile operations const)
2 parents 48e8ec6 + 3657ecd commit ad49852

143 files changed

Lines changed: 1894 additions & 934 deletions

File tree

Some content is hidden

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

Cargo.lock

Lines changed: 93 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,12 @@ version = "0.21.7"
291291
source = "registry+https://github.com/rust-lang/crates.io-index"
292292
checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
293293

294+
[[package]]
295+
name = "base64"
296+
version = "0.22.1"
297+
source = "registry+https://github.com/rust-lang/crates.io-index"
298+
checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
299+
294300
[[package]]
295301
name = "basic-toml"
296302
version = "0.1.10"
@@ -1753,6 +1759,12 @@ version = "0.4.3"
17531759
source = "registry+https://github.com/rust-lang/crates.io-index"
17541760
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
17551761

1762+
[[package]]
1763+
name = "hifijson"
1764+
version = "0.5.0"
1765+
source = "registry+https://github.com/rust-lang/crates.io-index"
1766+
checksum = "242402749acf71e6f32f5857598b7002c4058a4e3c3b22b4c7d51cab9aea754e"
1767+
17561768
[[package]]
17571769
name = "home"
17581770
version = "0.5.12"
@@ -2132,17 +2144,67 @@ version = "1.0.15"
21322144
source = "registry+https://github.com/rust-lang/crates.io-index"
21332145
checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
21342146

2147+
[[package]]
2148+
name = "jaq-core"
2149+
version = "3.1.0"
2150+
source = "registry+https://github.com/rust-lang/crates.io-index"
2151+
checksum = "7561783b20275a6c9cb576e39208b0c635f34ef14357f1f05a2927a774f3adec"
2152+
dependencies = [
2153+
"dyn-clone",
2154+
"once_cell",
2155+
"typed-arena",
2156+
]
2157+
2158+
[[package]]
2159+
name = "jaq-json"
2160+
version = "2.0.1"
2161+
source = "registry+https://github.com/rust-lang/crates.io-index"
2162+
checksum = "d4ec9aaad7340e6990c6c1878ef3b46dbec624e535d7f786cc9ddcf94f773d33"
2163+
dependencies = [
2164+
"bstr",
2165+
"bytes",
2166+
"foldhash 0.1.5",
2167+
"hifijson",
2168+
"indexmap",
2169+
"jaq-core",
2170+
"jaq-std",
2171+
"num-bigint",
2172+
"num-traits",
2173+
"ryu",
2174+
"self_cell",
2175+
"serde_core",
2176+
]
2177+
2178+
[[package]]
2179+
name = "jaq-std"
2180+
version = "3.0.1"
2181+
source = "registry+https://github.com/rust-lang/crates.io-index"
2182+
checksum = "8bdc5a74b0feeb5e6a1dc2dd08c34280a61e37668d10a6a3b27ad69d0fb9ce2e"
2183+
dependencies = [
2184+
"aho-corasick",
2185+
"base64 0.22.1",
2186+
"bstr",
2187+
"jaq-core",
2188+
"jiff",
2189+
"libm",
2190+
"log",
2191+
"regex-bites",
2192+
"urlencoding",
2193+
]
2194+
21352195
[[package]]
21362196
name = "jiff"
21372197
version = "0.2.16"
21382198
source = "registry+https://github.com/rust-lang/crates.io-index"
21392199
checksum = "49cce2b81f2098e7e3efc35bc2e0a6b7abec9d34128283d7a26fa8f32a6dbb35"
21402200
dependencies = [
21412201
"jiff-static",
2202+
"jiff-tzdb-platform",
21422203
"log",
21432204
"portable-atomic",
21442205
"portable-atomic-util",
21452206
"serde_core",
2207+
"windows-sys 0.61.2",
21462208
]
21472209

21482210
[[package]]
@@ -2156,6 +2218,21 @@ dependencies = [
21562218
"syn",
21572219
]
21582220

2221+
[[package]]
2222+
name = "jiff-tzdb"
2223+
version = "0.1.6"
2224+
source = "registry+https://github.com/rust-lang/crates.io-index"
2225+
checksum = "c900ef84826f1338a557697dc8fc601df9ca9af4ac137c7fb61d4c6f2dfd3076"
2226+
2227+
[[package]]
2228+
name = "jiff-tzdb-platform"
2229+
version = "0.1.3"
2230+
source = "registry+https://github.com/rust-lang/crates.io-index"
2231+
checksum = "875a5a69ac2bab1a891711cf5eccbec1ce0341ea805560dcd90b7a2e925132e8"
2232+
dependencies = [
2233+
"jiff-tzdb",
2234+
]
2235+
21592236
[[package]]
21602237
name = "jobserver"
21612238
version = "0.1.34"
@@ -2182,6 +2259,9 @@ version = "0.1.0"
21822259
dependencies = [
21832260
"fs-err",
21842261
"getopts",
2262+
"jaq-core",
2263+
"jaq-json",
2264+
"jaq-std",
21852265
"jsonpath-rust",
21862266
"regex",
21872267
"serde_json",
@@ -3382,6 +3462,12 @@ dependencies = [
33823462
"regex-syntax",
33833463
]
33843464

3465+
[[package]]
3466+
name = "regex-bites"
3467+
version = "0.1.6"
3468+
source = "registry+https://github.com/rust-lang/crates.io-index"
3469+
checksum = "b6a15a2fa0bfda9361941c45550896ae87b15cc6c8c939ea350079670332e211"
3470+
33853471
[[package]]
33863472
name = "regex-lite"
33873473
version = "0.1.8"
@@ -4916,7 +5002,7 @@ version = "0.0.0"
49165002
dependencies = [
49175003
"arrayvec",
49185004
"askama",
4919-
"base64",
5005+
"base64 0.21.7",
49205006
"expect-test",
49215007
"indexmap",
49225008
"itertools 0.15.0",
@@ -5912,6 +5998,12 @@ dependencies = [
59125998
"rustc-hash 2.1.1",
59135999
]
59146000

6001+
[[package]]
6002+
name = "typed-arena"
6003+
version = "2.0.2"
6004+
source = "registry+https://github.com/rust-lang/crates.io-index"
6005+
checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a"
6006+
59156007
[[package]]
59166008
name = "typeid"
59176009
version = "1.0.3"

compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2911,7 +2911,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
29112911
// Do not use lower_anon_const_to_const_arg, as that attempts to represent the body
29122912
// directly. Instead, force an anon const.
29132913
let def_id = self.local_def_id(anon_const.id);
2914-
assert_eq!(DefKind::InlineConst, self.tcx.def_kind(def_id));
2914+
assert_eq!(DefKind::AnonConst, self.tcx.def_kind(def_id));
29152915
let lowered_anon = self.lower_anon_const_to_anon_const(anon_const, span);
29162916
ConstArg {
29172917
hir_id: self.lower_node_id(node_id),

compiler/rustc_borrowck/src/type_check/mod.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1709,7 +1709,9 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {
17091709
if uv.promoted.is_none() {
17101710
let tcx = self.tcx();
17111711
let def_id = uv.def;
1712-
if tcx.def_kind(def_id) == DefKind::InlineConst {
1712+
if tcx.def_kind(def_id) == DefKind::AnonConst
1713+
&& tcx.anon_const_kind(def_id) == ty::AnonConstKind::NonTypeSystemInline
1714+
{
17131715
let def_id = def_id.expect_local();
17141716
let predicates = self.prove_closure_bounds(tcx, def_id, uv.args, location);
17151717
self.normalize_and_prove_instantiated_predicates(
@@ -2653,7 +2655,11 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
26532655
// length as the `typeck_root_args`.
26542656
&args[..typeck_root_args.len()]
26552657
}
2656-
DefKind::InlineConst => args.as_inline_const().parent_args(),
2658+
DefKind::AnonConst
2659+
if tcx.anon_const_kind(def_id) == ty::AnonConstKind::NonTypeSystemInline =>
2660+
{
2661+
args.as_inline_const().parent_args()
2662+
}
26572663
other => bug!("unexpected item {:?}", other),
26582664
};
26592665
let parent_args = tcx.mk_args(parent_args);

compiler/rustc_borrowck/src/universal_regions.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,10 @@ impl<'cx, 'tcx> UniversalRegionsBuilder<'cx, 'tcx> {
615615

616616
BodyOwnerKind::Const { .. } | BodyOwnerKind::Static(..) => {
617617
match tcx.def_kind(self.mir_def) {
618-
DefKind::InlineConst if !tcx.is_type_system_inline_const(self.mir_def) => {
618+
DefKind::AnonConst
619+
if tcx.anon_const_kind(self.mir_def)
620+
== ty::AnonConstKind::NonTypeSystemInline =>
621+
{
619622
// This is required for `AscribeUserType` canonical query, which will call
620623
// `type_of(inline_const_def_id)`. That `type_of` would inject erased lifetimes
621624
// into borrowck, which is ICE #78174.

0 commit comments

Comments
 (0)