Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
562b485
Provide a setting to disable showing rename conflicts
ChayimFriedman2 Jul 7, 2025
ef4a741
Add bidirectional messaging proc-macro-srv
Shourya742 Nov 27, 2025
8bcb4db
remove salsa dependency check on proc_macro_srv_cli
Shourya742 Dec 15, 2025
a1f3d72
make json-new as default protocol choice for proc-macro-srv-cli
Shourya742 Dec 15, 2025
4f57d5b
Fix LSP configuration request handling
michaelgruenewald Dec 17, 2025
9289099
add request id to requests
Shourya742 Dec 18, 2025
abaf959
refactor the main loop in proc_macro-srv-cli
Shourya742 Dec 18, 2025
5cdad62
make imports proper
Shourya742 Dec 18, 2025
b65078e
change request id to u32 to make powerpc happy
Shourya742 Dec 18, 2025
e337275
RISC-V: Add virtual target feature: `zkne_or_zknd`
a4lg Sep 14, 2025
288c372
RISC-V: Use inline assembly and `zkne_or_zknd` on (Zkne or Zknd) intr…
a4lg Sep 19, 2025
ba9cc48
Prepare for merging from rust-lang/rust
invalid-email-address Dec 22, 2025
de0a0ef
Merge ref 'f41f40408d71' from rust-lang/rust
invalid-email-address Dec 22, 2025
b91ed30
Merge pull request #21318 from rust-lang/rustc-pull
lnicola Dec 22, 2025
2327823
remove request_id, rename postcardNew to BidirectionalPostcardPrototy…
Shourya742 Dec 22, 2025
3db62cf
comment out disabled workflow
Shourya742 Dec 22, 2025
8e21457
remove envelop and keep it simple
Shourya742 Dec 22, 2025
7c50ee6
rename PostcardNew to bidirectional-postcard-prototype
Shourya742 Dec 22, 2025
6c525fa
remove internal callbacks, and move callback to rust-analyzer level
Shourya742 Dec 23, 2025
cf02cff
remove channels with callbacks in proc-macro-srv
Shourya742 Dec 23, 2025
d0e14f1
fix: Fix flycheck generations not being synced for multiple workspaces
Veykril Dec 23, 2025
184e062
chore: remove unwanted comments, extra lines and putting cli srv on d…
Shourya742 Dec 23, 2025
d0f86f6
Merge pull request #21326 from Veykril/push-vzswtlulupxv
ShoyuVanilla Dec 23, 2025
d6a2a52
return error on combination of bidirectional message and json framing
Shourya742 Dec 23, 2025
df2833d
Fix typo in a URL
ada4a Dec 23, 2025
022164f
Merge pull request #21327 from ada4a/patch-1
lnicola Dec 23, 2025
5c99ebf
Fix indent for convert_to_guarded_return
A4-Tacks Dec 24, 2025
faac1b5
Prepare for merging from rust-lang/rust
invalid-email-address Dec 25, 2025
a1ae5af
Merge ref 'e7d44143a12a' from rust-lang/rust
invalid-email-address Dec 25, 2025
a8ad2e2
Merge pull request #21331 from rust-lang/rustc-pull
lnicola Dec 25, 2025
38ff5a7
Introduce cargo-machete ci step
Veykril Dec 25, 2025
4b68b7a
Merge pull request #21334 from Veykril/veykril/push-ozmlxzxpvrun
Veykril Dec 25, 2025
2c7bd6d
Store closures with "tupled" inputs
ChayimFriedman2 Dec 25, 2025
ebb0d0b
Make builtin derives cheaper, by not really expanding them, instead s…
ChayimFriedman2 Dec 2, 2025
2f3a23c
Stabilize type mismatch diagnostic 🎉
ChayimFriedman2 Dec 26, 2025
9d0a93f
Merge pull request #21337 from ChayimFriedman2/stabilize-type-mismatc…
ChayimFriedman2 Dec 26, 2025
2986b27
Merge pull request #21249 from Shourya742/2025-11-27-bidirectional-pr…
Veykril Dec 26, 2025
856cc54
Merge pull request #21335 from ChayimFriedman2/tupled-closure
Veykril Dec 26, 2025
4665de5
Merge pull request #21330 from A4-Tacks/to-guarded-indent
Veykril Dec 26, 2025
9fcf441
Merge pull request #21297 from osdyne/fix-lsp-configuration-request
Veykril Dec 26, 2025
abefb52
Merge pull request #20193 from ChayimFriedman2/setting-rename-conflict
Veykril Dec 26, 2025
04529b2
Allow IDE layer to "see" fake builtin derive impls
ChayimFriedman2 Dec 3, 2025
02763ff
Test builtin derives expansions
ChayimFriedman2 Dec 26, 2025
50ed4e9
Merge pull request #21200 from ChayimFriedman2/fake-impls
Veykril Dec 26, 2025
abf2259
add bidirectionalHandler trait
Shourya742 Dec 26, 2025
8f141ea
remove old subreq/resp constructs
Shourya742 Dec 26, 2025
8aa8594
adapt source_text to new handler
Shourya742 Dec 26, 2025
22fbbd4
Add macro segment completion
A4-Tacks Sep 25, 2025
2316906
add bidirectional handle in proc-macro-srv-cli to interact with clien…
Shourya742 Dec 27, 2025
8ae38dc
rename handler's to be context specific
Shourya742 Dec 27, 2025
38f1ccc
make source_text take non mutable reference of self
Shourya742 Dec 27, 2025
720d9ee
remove crossbeam-channel from proc-macro-srv-cli
Shourya742 Dec 27, 2025
9ab53d6
Merge pull request #21340 from Shourya742/2025-12-26-better-bm-ergono…
Veykril Dec 27, 2025
06a6a00
Minor fixup
A4-Tacks Dec 27, 2025
e80997d
Fix grammar in "Use of AI tools" section
yotamofek Dec 27, 2025
e90e264
Merge pull request #20741 from A4-Tacks/comp-macro-segment
Veykril Dec 27, 2025
61203a0
internal: Move library and local root inputs to base-db
Veykril Dec 27, 2025
31b0cb9
Merge pull request #21341 from Veykril/veykril/push-wsrtvrkzqyvr
Veykril Dec 27, 2025
d494dbc
make framing buffer send
Shourya742 Dec 27, 2025
462b4a0
attach lifetime to ProcMacroClientHandle and make necessary changes t…
Shourya742 Dec 27, 2025
359fe9a
remove read and write generics, also remove lock from the beginning a…
Shourya742 Dec 27, 2025
7e873db
rename BidirectionalStruct to ProcMacroClientHandle
Shourya742 Dec 27, 2025
43cda6d
remove unwraps from source_text impl
Shourya742 Dec 27, 2025
671aab6
make expand ProcMacroServerSpan type live longer
Shourya742 Dec 27, 2025
6ff77ac
Merge pull request #21345 from Shourya742/2025-12-27-remove-channel-mess
ChayimFriedman2 Dec 27, 2025
a9da655
Bring back fixpoint iteration for variance
ChayimFriedman2 Dec 27, 2025
fc1cb48
Fix tests that relied on the default variance to be invariant
ChayimFriedman2 Dec 27, 2025
28b8503
Merge pull request #21348 from ChayimFriedman2/reenable-variance
ChayimFriedman2 Dec 27, 2025
bb5c82c
Don't use MIR ProjectionElem in closure analysis
flodiebold Dec 4, 2025
0146f8d
Merge pull request #21344 from flodiebold/push-prxvkyqorowx
ChayimFriedman2 Dec 27, 2025
a5bdd10
Merge pull request #21342 from yotamofek/patch-1
Veykril Dec 27, 2025
c27f6d5
Fix parsing of `format_args!("...", keyword=...)`
ChayimFriedman2 Dec 28, 2025
6851e39
Make token trees no longer generic over the span
ChayimFriedman2 Dec 28, 2025
33ad9ca
Merge pull request #21349 from ChayimFriedman2/no-generic-span
Veykril Dec 28, 2025
fa8649f
minor: Remove unneded allocation in proc-macro-srv-cli
Veykril Dec 28, 2025
49c5102
Merge pull request #21351 from ChayimFriedman2/format-args-kw
Veykril Dec 28, 2025
5a119a5
Merge pull request #21352 from Veykril/push-knwlqypxtukr
Veykril Dec 28, 2025
1ce1fae
Fix duplicate record functional update
A4-Tacks Dec 28, 2025
b717c74
perf: Pre-allocate some buffers in parsing
Veykril Dec 28, 2025
f574941
Merge pull request #21353 from Veykril/push-wquzszzrzwpu
Veykril Dec 28, 2025
5adad1a
perf: Reduce channel lock contention for drop-threads
Veykril Dec 28, 2025
72b409d
Merge pull request #21355 from Veykril/push-zkmupnykkvln
Veykril Dec 28, 2025
11df3a0
Drop AstIdMap asynchronously
Veykril Dec 28, 2025
ecb0c4c
internal: Collect garbage after events when quiescient
Veykril Dec 28, 2025
1ea45e0
Merge pull request #21357 from Veykril/push-rsulypnywlsv
Veykril Dec 28, 2025
6f551be
Reduce allocations in `GarbageCollector`
Veykril Dec 28, 2025
8235c35
Do not unnecessarily re-trigger garbage collection if no inputs have …
Veykril Dec 28, 2025
4fba51d
Merge pull request #21356 from Veykril/push-oumpxzuwmuwp
Veykril Dec 28, 2025
31fb833
fix: Fix hover for infer type not working
Veykril Dec 28, 2025
138034f
Merge pull request #21358 from Veykril/push-sxkppmzqvurw
Veykril Dec 28, 2025
9a93243
Merge pull request #21354 from A4-Tacks/dedup-record-update
Veykril Dec 28, 2025
4ae2848
Prompt the user in VSCode to add the rust-anaylzer componenet to the …
Veykril Dec 28, 2025
75fa8a0
Merge pull request #21359 from Veykril/push-syvnrvtmlsqk
Veykril Dec 28, 2025
49b6f67
Separate the public `tt` API from how they're stored
ChayimFriedman2 Dec 29, 2025
175e297
Make `tt::Literal` use one `Symbol` for the text and the suffix
ChayimFriedman2 Dec 29, 2025
29f9397
docs: fix typo in std::io::buffered
AsakuraMizu Dec 24, 2025
00f80b4
Merge pull request #21362 from ChayimFriedman2/compress-spans-v2
Veykril Dec 29, 2025
b0ff573
feat: implement configuration to change subcommand for test and bench
dfireBird Dec 20, 2025
bb4d75f
fix clippy errors
dfireBird Dec 29, 2025
cd2c209
Fix Clippy
ChayimFriedman2 Dec 29, 2025
7069629
chore: add `test_name` placeholder in config
dfireBird Dec 29, 2025
9cb0713
Merge pull request #21366 from ChayimFriedman2/fix-clippy
ChayimFriedman2 Dec 29, 2025
192bbd1
Have an `upvars_mentioned()` query that only computes what upvars a c…
ChayimFriedman2 Dec 29, 2025
edae151
Merge pull request #21308 from dfireBird/runnable-subcommand-config
ChayimFriedman2 Dec 29, 2025
3d9856d
Merge pull request #21367 from ChayimFriedman2/upvars
Veykril Dec 30, 2025
9508cd1
Compress token trees for best memory usage
ChayimFriedman2 Dec 29, 2025
c24dff6
Merge pull request #21363 from ChayimFriedman2/compress-spans-real
ChayimFriedman2 Dec 30, 2025
975aa0d
Add `#[rust_analyzer::macro_style()]` attribute to control macro comp…
ChayimFriedman2 Dec 30, 2025
df99881
Adapt macros in rust-analyzer to new attribute
ChayimFriedman2 Dec 30, 2025
ef8d943
Remove `feature(string_deref_patterns)`
Zalathar Dec 31, 2025
935e3cb
fix: don't fire `non_camel_case_types` lint for structs/enums marked …
Jefffrey Dec 31, 2025
a5e6198
Merge pull request #21374 from Jefffrey/excuse-non-camel-case-repr-c
ChayimFriedman2 Dec 31, 2025
5bb8d5d
Merge pull request #21370 from ChayimFriedman2/macro-brace-style
Veykril Dec 31, 2025
c19e9ec
Fix incorrect dyn hint in `impl Trait for`
A4-Tacks Dec 31, 2025
6d0f23c
Merge pull request #21375 from A4-Tacks/impl-trait-target-and-dyn-hint
ChayimFriedman2 Dec 31, 2025
1a4e7f9
Use --print target-libdir in run-make tests
bjorn3 Dec 31, 2025
dc103c4
Rollup merge of #146798 - a4lg:riscv-intrinsics-zkne_or_zknd, r=Amanieu
JonathanBrouwer Dec 31, 2025
f366fa5
Rollup merge of #150337 - AsakuraMizu:main, r=jhpratt
JonathanBrouwer Dec 31, 2025
15c467b
Rollup merge of #150530 - Zalathar:string-deref-patterns, r=jackh726
JonathanBrouwer Dec 31, 2025
8dc15d2
Rollup merge of #150543 - lnicola:sync-from-ra, r=lnicola
JonathanBrouwer Dec 31, 2025
552918b
Rollup merge of #150544 - bjorn3:run_make_print_target_libdir, r=Urga…
JonathanBrouwer Dec 31, 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
5 changes: 5 additions & 0 deletions compiler/rustc_codegen_llvm/src/llvm_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,11 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFea
"power8-crypto" => Some(LLVMFeature::new("crypto")),
s => Some(LLVMFeature::new(s)),
},
Arch::RiscV32 | Arch::RiscV64 => match s {
// Filter out Rust-specific *virtual* target feature
"zkne_or_zknd" => None,
s => Some(LLVMFeature::new(s)),
},
Arch::Sparc | Arch::Sparc64 => match s {
"leoncasa" => Some(LLVMFeature::new("hasleoncasa")),
s => Some(LLVMFeature::new(s)),
Expand Down
2 changes: 2 additions & 0 deletions compiler/rustc_feature/src/removed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,8 @@ declare_features! (
/// Allows `#[link(kind = "static-nobundle", ...)]`.
(removed, static_nobundle, "1.63.0", Some(37403),
Some(r#"subsumed by `#[link(kind = "static", modifiers = "-bundle", ...)]`"#), 95818),
/// Allows string patterns to dereference values to match them.
(removed, string_deref_patterns, "CURRENT_RUSTC_VERSION", Some(87121), Some("superseded by `deref_patterns`"), 150530),
(removed, struct_inherit, "1.0.0", None, None),
(removed, test_removed_feature, "1.0.0", None, None),
/// Allows using items which are missing stability attributes
Expand Down
2 changes: 0 additions & 2 deletions compiler/rustc_feature/src/unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -647,8 +647,6 @@ declare_features! (
(unstable, stmt_expr_attributes, "1.6.0", Some(15701)),
/// Allows lints part of the strict provenance effort.
(unstable, strict_provenance_lints, "1.61.0", Some(130351)),
/// Allows string patterns to dereference values to match them.
(unstable, string_deref_patterns, "1.67.0", Some(87121)),
/// Allows `super let` statements.
(unstable, super_let, "1.88.0", Some(139076)),
/// Allows subtrait items to shadow supertrait items.
Expand Down
14 changes: 0 additions & 14 deletions compiler/rustc_hir_typeck/src/pat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -996,20 +996,6 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
pat_ty = self.tcx.types.str_;
}

if self.tcx.features().string_deref_patterns()
&& let hir::PatExprKind::Lit {
lit: Spanned { node: ast::LitKind::Str(..), .. }, ..
} = lt.kind
{
let tcx = self.tcx;
let expected = self.resolve_vars_if_possible(expected);
pat_ty = match expected.kind() {
ty::Adt(def, _) if tcx.is_lang_item(def.did(), LangItem::String) => expected,
ty::Str => Ty::new_static_str(tcx),
_ => pat_ty,
};
}

// Somewhat surprising: in this case, the subtyping relation goes the
// opposite way as the other cases. Actually what we really want is not
// a subtyping relation at all but rather that there exists a LUB
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_middle/src/thir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,6 @@ pub enum PatKind<'tcx> {
/// much simpler.
/// * raw pointers derived from integers, other raw pointers will have already resulted in an
/// error.
/// * `String`, if `string_deref_patterns` is enabled.
Constant {
value: ty::Value<'tcx>,
},
Expand Down
30 changes: 1 addition & 29 deletions compiler/rustc_mir_build/src/builder/matches/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
let mut expect = self.literal_operand(test.span, Const::from_ty_value(tcx, value));

let mut place = place;
let mut block = block;

match cast_ty.kind() {
ty::Str => {
// String literal patterns may have type `str` if `deref_patterns` is
Expand All @@ -175,34 +175,6 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
place = ref_place;
cast_ty = ref_str_ty;
}
ty::Adt(def, _) if tcx.is_lang_item(def.did(), LangItem::String) => {
if !tcx.features().string_deref_patterns() {
span_bug!(
test.span,
"matching on `String` went through without enabling string_deref_patterns"
);
}
let re_erased = tcx.lifetimes.re_erased;
let ref_str_ty = Ty::new_imm_ref(tcx, re_erased, tcx.types.str_);
let ref_str = self.temp(ref_str_ty, test.span);
let eq_block = self.cfg.start_new_block();
// `let ref_str: &str = <String as Deref>::deref(&place);`
self.call_deref(
block,
eq_block,
place,
Mutability::Not,
cast_ty,
ref_str,
test.span,
);
// Since we generated a `ref_str = <String as Deref>::deref(&place) -> eq_block` terminator,
// we need to add all further statements to `eq_block`.
// Similarly, the normal test code should be generated for the `&str`, instead of the `String`.
block = eq_block;
place = ref_str;
cast_ty = ref_str_ty;
}
&ty::Pat(base, _) => {
assert_eq!(cast_ty, value.ty);
assert!(base.is_trivially_pure_clone_copy());
Expand Down
18 changes: 1 addition & 17 deletions compiler/rustc_mir_build/src/thir/pattern/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use rustc_abi::{FieldIdx, Integer};
use rustc_errors::codes::*;
use rustc_hir::def::{CtorOf, DefKind, Res};
use rustc_hir::pat_util::EnumerateAndAdjustIterator;
use rustc_hir::{self as hir, LangItem, RangeEnd};
use rustc_hir::{self as hir, RangeEnd};
use rustc_index::Idx;
use rustc_middle::mir::interpret::LitToConstInput;
use rustc_middle::thir::{
Expand Down Expand Up @@ -626,23 +626,7 @@ impl<'tcx> PatCtxt<'tcx> {
// the pattern's type will be `&[u8]` whereas the literal's type is `&[u8; 3]`; using the
// pattern's type means we'll properly translate it to a slice reference pattern. This works
// because slices and arrays have the same valtree representation.
// HACK: As an exception, use the literal's type if `pat_ty` is `String`; this can happen if
// `string_deref_patterns` is enabled. There's a special case for that when lowering to MIR.
// FIXME(deref_patterns): This hack won't be necessary once `string_deref_patterns` is
// superseded by a more general implementation of deref patterns.
let ct_ty = match pat_ty {
Some(pat_ty)
if let ty::Adt(def, _) = *pat_ty.kind()
&& self.tcx.is_lang_item(def.did(), LangItem::String) =>
{
if !self.tcx.features().string_deref_patterns() {
span_bug!(
expr.span,
"matching on `String` went through without enabling string_deref_patterns"
);
}
self.typeck_results.node_type(expr.hir_id)
}
Some(pat_ty) => pat_ty,
None => self.typeck_results.node_type(expr.hir_id),
};
Expand Down
5 changes: 3 additions & 2 deletions compiler/rustc_target/src/target_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -690,8 +690,9 @@ static RISCV_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[
("zimop", Unstable(sym::riscv_target_feature), &[]),
("zk", Stable, &["zkn", "zkr", "zkt"]),
("zkn", Stable, &["zbkb", "zbkc", "zbkx", "zkne", "zknd", "zknh"]),
("zknd", Stable, &[]),
("zkne", Stable, &[]),
("zknd", Stable, &["zkne_or_zknd"]),
("zkne", Stable, &["zkne_or_zknd"]),
("zkne_or_zknd", Unstable(sym::riscv_target_feature), &[]), // Not an extension
("zknh", Stable, &[]),
("zkr", Stable, &[]),
("zks", Stable, &["zbkb", "zbkc", "zbkx", "zksed", "zksh"]),
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/io/buffered/bufreader/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl Buffer {

#[inline]
pub fn buffer(&self) -> &[u8] {
// SAFETY: self.pos and self.cap are valid, and self.cap => self.pos, and
// SAFETY: self.pos and self.filled are valid, and self.filled >= self.pos, and
// that region is initialized because those are all invariants of this type.
unsafe { self.buf.get_unchecked(self.pos..self.filled).assume_init_ref() }
}
Expand Down
6 changes: 3 additions & 3 deletions library/std/src/io/buffered/linewritershim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl<'a, W: ?Sized + Write> LineWriterShim<'a, W> {
}

impl<'a, W: ?Sized + Write> Write for LineWriterShim<'a, W> {
/// Writes some data into this BufReader with line buffering.
/// Writes some data into this BufWriter with line buffering.
///
/// This means that, if any newlines are present in the data, the data up to
/// the last newline is sent directly to the underlying writer, and data
Expand Down Expand Up @@ -146,7 +146,7 @@ impl<'a, W: ?Sized + Write> Write for LineWriterShim<'a, W> {
self.buffer.flush()
}

/// Writes some vectored data into this BufReader with line buffering.
/// Writes some vectored data into this BufWriter with line buffering.
///
/// This means that, if any newlines are present in the data, the data up to
/// and including the buffer containing the last newline is sent directly to
Expand Down Expand Up @@ -256,7 +256,7 @@ impl<'a, W: ?Sized + Write> Write for LineWriterShim<'a, W> {
self.inner().is_write_vectored()
}

/// Writes some data into this BufReader with line buffering.
/// Writes some data into this BufWriter with line buffering.
///
/// This means that, if any newlines are present in the data, the data up to
/// the last newline is sent directly to the underlying writer, and data
Expand Down
45 changes: 32 additions & 13 deletions library/stdarch/crates/core_arch/src/riscv64/zk.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#[cfg(test)]
use stdarch_test::assert_instr;

use crate::arch::asm;

unsafe extern "unadjusted" {
#[link_name = "llvm.riscv.aes64es"]
fn _aes64es(rs1: i64, rs2: i64) -> i64;
Expand All @@ -14,12 +16,6 @@ unsafe extern "unadjusted" {
#[link_name = "llvm.riscv.aes64dsm"]
fn _aes64dsm(rs1: i64, rs2: i64) -> i64;

#[link_name = "llvm.riscv.aes64ks1i"]
fn _aes64ks1i(rs1: i64, rnum: i32) -> i64;

#[link_name = "llvm.riscv.aes64ks2"]
fn _aes64ks2(rs1: i64, rs2: i64) -> i64;

#[link_name = "llvm.riscv.aes64im"]
fn _aes64im(rs1: i64) -> i64;

Expand Down Expand Up @@ -133,15 +129,26 @@ pub fn aes64dsm(rs1: u64, rs2: u64) -> u64 {
/// # Note
///
/// The `RNUM` parameter is expected to be a constant value inside the range of `0..=10`.
#[target_feature(enable = "zkne", enable = "zknd")]
#[target_feature(enable = "zkne_or_zknd")]
#[rustc_legacy_const_generics(1)]
#[cfg_attr(test, assert_instr(aes64ks1i, RNUM = 0))]
#[inline]
#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")]
pub fn aes64ks1i<const RNUM: u8>(rs1: u64) -> u64 {
static_assert!(RNUM <= 10);

unsafe { _aes64ks1i(rs1 as i64, RNUM as i32) as u64 }
unsafe {
let rd: u64;
asm!(
".option push",
".option arch, +zkne",
"aes64ks1i {}, {}, {}",
".option pop",
lateout(reg) rd,
in(reg) rs1,
const RNUM,
options(pure, nomem, nostack, preserves_flags)
);
rd
}
}

/// This instruction implements part of the KeySchedule operation for the AES Block cipher.
Expand All @@ -155,12 +162,24 @@ pub fn aes64ks1i<const RNUM: u8>(rs1: u64) -> u64 {
/// Version: v1.0.1
///
/// Section: 3.11
#[target_feature(enable = "zkne", enable = "zknd")]
#[cfg_attr(test, assert_instr(aes64ks2))]
#[target_feature(enable = "zkne_or_zknd")]
#[inline]
#[unstable(feature = "riscv_ext_intrinsics", issue = "114544")]
pub fn aes64ks2(rs1: u64, rs2: u64) -> u64 {
unsafe { _aes64ks2(rs1 as i64, rs2 as i64) as u64 }
unsafe {
let rd: u64;
asm!(
".option push",
".option arch, +zkne",
"aes64ks2 {}, {}, {}",
".option pop",
lateout(reg) rd,
in(reg) rs1,
in(reg) rs2,
options(pure, nomem, nostack, preserves_flags)
);
rd
}
}

/// This instruction accelerates the inverse MixColumns step of the AES Block Cipher, and is used to aid creation of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The tracking issue for this feature is: [#87121]
------------------------

> **Note**: This feature is incomplete. In the future, it is meant to supersede
> [`box_patterns`] and [`string_deref_patterns`].
> [`box_patterns`].

This feature permits pattern matching on [smart pointers in the standard library] through their
`Deref` target types, either implicitly or with explicit `deref!(_)` patterns (the syntax of which
Expand Down Expand Up @@ -103,5 +103,4 @@ match *(b"test" as &[u8]) {
```

[`box_patterns`]: ./box-patterns.md
[`string_deref_patterns`]: ./string-deref-patterns.md
[smart pointers in the standard library]: https://doc.rust-lang.org/std/ops/trait.DerefPure.html#implementors

This file was deleted.

6 changes: 6 additions & 0 deletions src/tools/rust-analyzer/.github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ jobs:
- name: Run tests
run: cargo nextest run --no-fail-fast --hide-progress-bar --status-level fail

- name: Install cargo-machete
uses: taiki-e/install-action@cargo-machete

- name: Run cargo-machete
run: cargo machete

- name: Run Clippy
if: matrix.os == 'macos-latest'
run: cargo clippy --all-targets -- -D clippy::disallowed_macros -D clippy::dbg_macro -D clippy::todo -D clippy::print_stdout -D clippy::print_stderr
Expand Down
2 changes: 1 addition & 1 deletion src/tools/rust-analyzer/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ considered accepted feel free to just drop a comment and ask!

AI tool use is not discouraged on the rust-analyzer codebase, as long as it meets our quality standards.
We kindly ask you to disclose usage of AI tools in your contributions.
If you used them without disclosing it, we may reject your contribution on that basis alone due to the assumption that you likely not reviewed your own submission (so why should we?).
If you used them without disclosing it, we may reject your contribution on that basis alone due to the assumption that you have, most likely, not reviewed your own submission (so why should we?).

We may still reject AI-assisted contributions if we deem the quality of the contribution to be unsatisfactory as to reduce impact on the team's review budget.
Loading
Loading