depot/third_party/nixpkgs/pkgs/development/tools/rust/rust-analyzer/no-match-unsizing-in-const-fn.patch

31 lines
938 B
Diff
Raw Normal View History

diff --git a/crates/assists/src/handlers/convert_integer_literal.rs b/crates/assists/src/handlers/convert_integer_literal.rs
index ea35e833a..4df80a3c0 100644
--- a/crates/assists/src/handlers/convert_integer_literal.rs
+++ b/crates/assists/src/handlers/convert_integer_literal.rs
@@ -105,7 +105,7 @@ impl IntegerLiteralBase {
}
}
- const fn base(&self) -> u32 {
+ fn base(&self) -> u32 {
match self {
Self::Binary => 2,
Self::Octal => 8,
@@ -114,14 +114,14 @@ impl IntegerLiteralBase {
}
}
- const fn prefix_len(&self) -> usize {
+ fn prefix_len(&self) -> usize {
match self {
Self::Decimal => 0,
_ => 2,
}
}
- const fn bases() -> &'static [IntegerLiteralBase] {
+ fn bases() -> &'static [IntegerLiteralBase] {
&[
IntegerLiteralBase::Binary,
IntegerLiteralBase::Octal,