rust198: add rust version 1.98.0.
Pkgsrc changes:
* Update patches to match new vendored versions.
* Associated checksum changes.
* Add cargo option to permit linker warnings (NetBSD compat code)
(taken from rust-beta wip package)
Upstream changes:
Version 1.98.0 (2026-08-20)
==========================
Language
--------
- [Allow shortening lifetime of `&mut` when unsize-coercing, even
in an invariant position.]
(https://github.com/rust-lang/rust/pull/149219) For example, you
can now coerce a `Cell<&'long mut i32>` to a `Cell<&'short mut
[151 lines not shown]
[OpenMP][flang] Use auto-generated data for modifier verification (#215648)
Introduce descriptors of OpenMP clauses and modifiers, auto-generated
from OpenMP specification data[*].
This replaces the preexisting modifier descriptors used in flang, the
code using it is adjusted to use the new definitions.
[*] This does not contain any actual auto-generation infrastructure. The
descriptors were generated by a custom script from the exported OpenMP
definitions.
[DAGCombiner] Fix divide-by-zero in visitSUBSAT when LHS is known-zero (#218284)
Fixes a crash introduced by #206592.
When the LHS of `usub.sat` is a known-zero value, `ActiveBits` is 0 and
`NarrowBits` starts at 0, causing a divide-by-zero via `ActiveBits %
NarrowBits` in `visitSUBSAT`.
Guard the loop with `NarrowBits != 0` to skip the narrowing optimization
in this case. Other folds handle the known-zero
case correctly.
A regression test has been added to `usubsat-narrow.ll` using a
known-zero LHS (`xor v, v`) to prevent future regressions.
Fixes #217964
[mlir][bufferization] Fix alloc_tensor copy operand assert with size_hint (#217734)
`AllocTensorOpInterface::bufferizesToMemoryRead` and
`bufferizesToMemoryWrite` assert that the `copy` operand is the last
operand. The ODS argument order is `dynamic_sizes`, `copy`, `size_hint`,
`memory_space`.
`copy` and `size_hint` can be used together, so the input is legal and
thus OSB asserts on legal code. Compare the operand against `getCopy()`
instead.
---
Code authored by Claude Code.
Signed-off-by: Víctor Pérez Carrasco <victor.pc.upm at gmail.com>
ppp: Fix a buffer overflow in the endpoint discriminator set command
Reported by: Reo Shiseki
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D59054
[mlir][tensor] Fix assertion on bufferizing expand_shape with a non-strided layout (#217714)
`ExpandShapeOpInterface::bufferize` creates a `memref.expand_shape`
directly without consulting `getBufferType`. The `memref::ExpandShapeOp`
builder computes the result layout with `computeExpandedType` and
asserts when that fails. `computeExpandedType` fails when the source
layout is not identity and `getStridesAndOffset` cannot decompose it, so
a non-strided affine layout aborts the compiler instead of reporting a
failed bufferization.
Query `getBufferType` first and return failure when it fails. The
model's own `getBufferType` already propagates the `computeExpandedType`
failure.
Rest of the behaviour is unchanged: we just fail gracefully now instead
of crashing.
---
Code authored by Claude Code.
[NFC][analyzer] Remove class 'NodeBuilder' (#217319)
This change concludes the removal of the class `NodeBuilder` which
previously added lots of unnecessary complications to the logic of the
analyzer engine.
The main feature of a `NodeBuilder` was that it tracked a "frontier"
set of exploded nodes, which were freshly created and not yet superseded
by the creation of another node. This was counterproductive in almost all
code that used `NodeBuilder`s -- with the exception of `CheckerContext`
where this was useful to support arbitrary chains of `addTransition`
calls in checkers.
As earlier commits removed the counterproductive use of `NodeBuilder`s,
there was only one surviving `NodeBuilder`, a data member of
`CheckerContext`, and its `generateNode` method was called only once, so
this commit inlines still relevant fragments of `NodeBuilder` into
`CheckerContext` and removes `NodeBuilder` as a separate class.
[4 lines not shown]
[clang][bytecode] Avoid copying function call arguments (#218399)
In most cases, we dony' need the SmallVector (we only use it to reverse
the arguments in the assignment operator case).
arm64: Fix CNTHCTL_EL1PCTEN field definitions
Fix the non-VHE register field definition of CNTHCTL_EL1PCTEN to use the
correct non-VHE shift.
Signed-off-by: Kajetan Puchalski <kajetan.puchalski at arm.com>
Sponsored by: Arm Ltd
Pull Request: https://github.com/freebsd/freebsd-src/pull/2378
arm64: Stop trashing the padding after boot_el
When building struct arm64_bootparams to pass to initarm we store the
boot_el field as a 64-bit value, however it is defined as an int which
is 32-bits.
Switch to store using the 'w' register as this will store a correctly
sized value.
Previously this would trash the trailing padding, so is only a
correctness issue.
Reviewed by: emaste
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D58988
[clang-tidy] Fix modernize-use-noexcept crash on unparsed exception specs (#218256)
A failed template instantiation can leave a function type with an
`EST_Unparsed` exception specification.
`modernize-use-noexcept` currently calls
`FunctionProtoType::isNothrow()` for that type, which reaches an
unreachable path in `FunctionProtoType::canThrow()`.
This fixes the crash by skipping unparsed exception specifications
before querying whether the function is non-throwing.
Fixes #214291
[clang][bytecode] Optimize `PtrView::isOnePastEnd()` (#218375)
We call this a lot. Optimize this by inlining and then simplifying the
callers, i.e. don't call getFieldDesc() as much.
Also remove some code duplication from the similar
`Pointer::isOnePastEnd()`.