Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit fae15df

Browse files
committed
Auto merge of rust-lang#3280 - rust-lang:rustup-2024-01-26, r=RalfJung
Automatic Rustup
2 parents 9f4d1a4 + 2318b08 commit fae15df

File tree

255 files changed

+4545
-2917
lines changed

Some content is hidden

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

255 files changed

+4545
-2917
lines changed

Cargo.lock

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,24 +212,24 @@ checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
212212

213213
[[package]]
214214
name = "askama"
215-
version = "0.12.0"
215+
version = "0.12.1"
216216
source = "registry+https://github.com/rust-lang/crates.io-index"
217-
checksum = "47cbc3cf73fa8d9833727bbee4835ba5c421a0d65b72daf9a7b5d0e0f9cfb57e"
217+
checksum = "b79091df18a97caea757e28cd2d5fda49c6cd4bd01ddffd7ff01ace0c0ad2c28"
218218
dependencies = [
219219
"askama_derive",
220220
"askama_escape",
221221
]
222222

223223
[[package]]
224224
name = "askama_derive"
225-
version = "0.12.1"
225+
version = "0.12.5"
226226
source = "registry+https://github.com/rust-lang/crates.io-index"
227-
checksum = "c22fbe0413545c098358e56966ff22cdd039e10215ae213cfbd65032b119fc94"
227+
checksum = "19fe8d6cb13c4714962c072ea496f3392015f0989b1a2847bb4b2d9effd71d83"
228228
dependencies = [
229+
"askama_parser",
229230
"basic-toml",
230231
"mime",
231232
"mime_guess",
232-
"nom",
233233
"proc-macro2",
234234
"quote",
235235
"serde",
@@ -242,6 +242,15 @@ version = "0.10.3"
242242
source = "registry+https://github.com/rust-lang/crates.io-index"
243243
checksum = "619743e34b5ba4e9703bba34deac3427c72507c7159f5fd030aea8cac0cfe341"
244244

245+
[[package]]
246+
name = "askama_parser"
247+
version = "0.2.1"
248+
source = "registry+https://github.com/rust-lang/crates.io-index"
249+
checksum = "acb1161c6b64d1c3d83108213c2a2533a342ac225aabd0bda218278c2ddb00c0"
250+
dependencies = [
251+
"nom",
252+
]
253+
245254
[[package]]
246255
name = "autocfg"
247256
version = "1.1.0"
@@ -3654,10 +3663,10 @@ version = "0.0.0"
36543663
dependencies = [
36553664
"arrayvec",
36563665
"bitflags 2.4.1",
3666+
"either",
36573667
"elsa",
36583668
"ena",
36593669
"indexmap",
3660-
"itertools",
36613670
"jobserver",
36623671
"libc",
36633672
"measureme",

compiler/rustc_ast/src/visit.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -375,11 +375,11 @@ pub fn walk_item<'a, V: Visitor<'a>>(visitor: &mut V, item: &'a Item) {
375375
}
376376
ItemKind::MacCall(mac) => visitor.visit_mac_call(mac),
377377
ItemKind::MacroDef(ts) => visitor.visit_mac_def(ts, item.id),
378-
ItemKind::Delegation(box Delegation { id: _, qself, path, body }) => {
378+
ItemKind::Delegation(box Delegation { id, qself, path, body }) => {
379379
if let Some(qself) = qself {
380380
visitor.visit_ty(&qself.ty);
381381
}
382-
walk_path(visitor, path);
382+
visitor.visit_path(path, *id);
383383
if let Some(body) = body {
384384
visitor.visit_block(body);
385385
}
@@ -502,7 +502,7 @@ where
502502
}
503503
GenericArgs::Parenthesized(data) => {
504504
walk_list!(visitor, visit_ty, &data.inputs);
505-
walk_fn_ret_ty(visitor, &data.output);
505+
visitor.visit_fn_ret_ty(&data.output);
506506
}
507507
}
508508
}
@@ -713,11 +713,11 @@ pub fn walk_assoc_item<'a, V: Visitor<'a>>(visitor: &mut V, item: &'a AssocItem,
713713
AssocItemKind::MacCall(mac) => {
714714
visitor.visit_mac_call(mac);
715715
}
716-
AssocItemKind::Delegation(box Delegation { id: _, qself, path, body }) => {
716+
AssocItemKind::Delegation(box Delegation { id, qself, path, body }) => {
717717
if let Some(qself) = qself {
718718
visitor.visit_ty(&qself.ty);
719719
}
720-
walk_path(visitor, path);
720+
visitor.visit_path(path, *id);
721721
if let Some(body) = body {
722722
visitor.visit_block(body);
723723
}

compiler/rustc_builtin_macros/src/deriving/cmp/eq.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,6 @@ pub fn expand_deriving_eq(
1919
) {
2020
let span = cx.with_def_site_ctxt(span);
2121

22-
let structural_trait_def = TraitDef {
23-
span,
24-
path: path_std!(marker::StructuralEq),
25-
skip_path_as_bound: true, // crucial!
26-
needs_copy_as_bound_if_packed: false,
27-
additional_bounds: Vec::new(),
28-
supports_unions: true,
29-
methods: Vec::new(),
30-
associated_types: Vec::new(),
31-
is_const: false,
32-
};
33-
structural_trait_def.expand(cx, mitem, item, push);
34-
3522
let trait_def = TraitDef {
3623
span,
3724
path: path_std!(cmp::Eq),

compiler/rustc_codegen_cranelift/example/mini_core.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,6 @@ unsafe impl<T: ?Sized> Freeze for &mut T {}
104104
#[lang = "structural_peq"]
105105
pub trait StructuralPartialEq {}
106106

107-
#[lang = "structural_teq"]
108-
pub trait StructuralEq {}
109-
110107
#[lang = "not"]
111108
pub trait Not {
112109
type Output;

compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,12 @@ fn codegen_regular_intrinsic_call<'tcx>(
443443

444444
ret.write_cvalue(fx, a);
445445
}
446+
sym::is_val_statically_known => {
447+
intrinsic_args!(fx, args => (_a); intrinsic);
448+
449+
let res = fx.bcx.ins().iconst(types::I8, 0);
450+
ret.write_cvalue(fx, CValue::by_val(res, ret.layout()));
451+
}
446452
sym::breakpoint => {
447453
intrinsic_args!(fx, args => (); intrinsic);
448454

compiler/rustc_codegen_gcc/example/mini_core.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,6 @@ unsafe impl<T: ?Sized> Freeze for &mut T {}
100100
#[lang = "structural_peq"]
101101
pub trait StructuralPartialEq {}
102102

103-
#[lang = "structural_teq"]
104-
pub trait StructuralEq {}
105-
106103
#[lang = "not"]
107104
pub trait Not {
108105
type Output;

compiler/rustc_codegen_gcc/src/context.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,15 +196,16 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
196196

197197
let mut functions = FxHashMap::default();
198198
let builtins = [
199-
"__builtin_unreachable", "abort", "__builtin_expect", "__builtin_add_overflow", "__builtin_mul_overflow",
200-
"__builtin_saddll_overflow", /*"__builtin_sadd_overflow",*/ "__builtin_smulll_overflow", /*"__builtin_smul_overflow",*/
199+
"__builtin_unreachable", "abort", "__builtin_expect", /*"__builtin_expect_with_probability",*/
200+
"__builtin_constant_p", "__builtin_add_overflow", "__builtin_mul_overflow", "__builtin_saddll_overflow",
201+
/*"__builtin_sadd_overflow",*/ "__builtin_smulll_overflow", /*"__builtin_smul_overflow",*/
201202
"__builtin_ssubll_overflow", /*"__builtin_ssub_overflow",*/ "__builtin_sub_overflow", "__builtin_uaddll_overflow",
202203
"__builtin_uadd_overflow", "__builtin_umulll_overflow", "__builtin_umul_overflow", "__builtin_usubll_overflow",
203204
"__builtin_usub_overflow", "sqrtf", "sqrt", "__builtin_powif", "__builtin_powi", "sinf", "sin", "cosf", "cos",
204205
"powf", "pow", "expf", "exp", "exp2f", "exp2", "logf", "log", "log10f", "log10", "log2f", "log2", "fmaf",
205206
"fma", "fabsf", "fabs", "fminf", "fmin", "fmaxf", "fmax", "copysignf", "copysign", "floorf", "floor", "ceilf",
206207
"ceil", "truncf", "trunc", "rintf", "rint", "nearbyintf", "nearbyint", "roundf", "round",
207-
"__builtin_expect_with_probability",
208+
208209
];
209210

210211
for builtin in builtins.iter() {

compiler/rustc_codegen_gcc/src/intrinsic/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
123123
sym::unlikely => {
124124
self.expect(args[0].immediate(), false)
125125
}
126+
sym::is_val_statically_known => {
127+
let a = args[0].immediate();
128+
let builtin = self.context.get_builtin_function("__builtin_constant_p");
129+
let res = self.context.new_call(None, builtin, &[a]);
130+
self.icmp(IntPredicate::IntEQ, res, self.const_i32(0))
131+
}
126132
kw::Try => {
127133
try_intrinsic(
128134
self,

compiler/rustc_codegen_gcc/tests/run/static.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,6 @@ mod libc {
6161
#[lang = "structural_peq"]
6262
pub trait StructuralPartialEq {}
6363

64-
#[lang = "structural_teq"]
65-
pub trait StructuralEq {}
66-
6764
#[lang = "drop_in_place"]
6865
#[allow(unconditional_recursion)]
6966
pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {

compiler/rustc_codegen_llvm/src/context.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,20 @@ impl<'ll> CodegenCx<'ll, '_> {
916916
ifn!("llvm.lifetime.start.p0i8", fn(t_i64, ptr) -> void);
917917
ifn!("llvm.lifetime.end.p0i8", fn(t_i64, ptr) -> void);
918918

919+
// FIXME: This is an infinitesimally small portion of the types you can
920+
// pass to this intrinsic, if we can ever lazily register intrinsics we
921+
// should register these when they're used, that way any type can be
922+
// passed.
923+
ifn!("llvm.is.constant.i1", fn(i1) -> i1);
924+
ifn!("llvm.is.constant.i8", fn(t_i8) -> i1);
925+
ifn!("llvm.is.constant.i16", fn(t_i16) -> i1);
926+
ifn!("llvm.is.constant.i32", fn(t_i32) -> i1);
927+
ifn!("llvm.is.constant.i64", fn(t_i64) -> i1);
928+
ifn!("llvm.is.constant.i128", fn(t_i128) -> i1);
929+
ifn!("llvm.is.constant.isize", fn(t_isize) -> i1);
930+
ifn!("llvm.is.constant.f32", fn(t_f32) -> i1);
931+
ifn!("llvm.is.constant.f64", fn(t_f64) -> i1);
932+
919933
ifn!("llvm.expect.i1", fn(i1, i1) -> i1);
920934
ifn!("llvm.eh.typeid.for", fn(ptr) -> t_i32);
921935
ifn!("llvm.localescape", fn(...) -> void);

0 commit comments

Comments
 (0)