1
Fork 0

Auto merge of #124241 - matthiaskrgr:rollup-xhu90xr, r=matthiaskrgr

Rollup of 5 pull requests

Successful merges:

 - #123840 (Add an intrinsic for `ptr::from_raw_parts(_mut)`)
 - #124224 (cleanup: unnecessary clone during lower generics args)
 - #124229 (Add gnullvm targets to manifest)
 - #124231 (remove from reviewers)
 - #124235 (Move some tests)

r? `@ghost`
`@rustbot` modify labels: rollup
This commit is contained in:
bors 2024-04-21 21:08:03 +00:00
commit fb898629a2
100 changed files with 989 additions and 54 deletions

View file

@ -128,6 +128,7 @@ pub fn intrinsic_operation_unsafety(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId) -
| sym::variant_count
| sym::is_val_statically_known
| sym::ptr_mask
| sym::aggregate_raw_ptr
| sym::ub_checks
| sym::fadd_algebraic
| sym::fsub_algebraic
@ -574,6 +575,10 @@ pub fn check_intrinsic_type(
(0, 0, vec![Ty::new_imm_ptr(tcx, Ty::new_unit(tcx))], tcx.types.usize)
}
// This type check is not particularly useful, but the `where` bounds
// on the definition in `core` do the heavy lifting for checking it.
sym::aggregate_raw_ptr => (3, 1, vec![param(1), param(2)], param(0)),
sym::ub_checks => (0, 1, Vec::new(), tcx.types.bool),
sym::simd_eq

View file

@ -228,8 +228,8 @@ pub fn lower_generic_args<'tcx: 'a, 'a>(
// Check whether this segment takes generic arguments and the user has provided any.
let (generic_args, infer_args) = ctx.args_for_def_id(def_id);
let args_iter = generic_args.iter().flat_map(|generic_args| generic_args.args.iter());
let mut args_iter = args_iter.clone().peekable();
let mut args_iter =
generic_args.iter().flat_map(|generic_args| generic_args.args.iter()).peekable();
// If we encounter a type or const when we expect a lifetime, we infer the lifetimes.
// If we later encounter a lifetime, we know that the arguments were provided in the