depot/third_party/nixpkgs/pkgs/development/tools/rust/rust-analyzer/no-match-unsizing-in-const-fn.patch
Default email 9c6d255489 Project import generated by Copybara.
GitOrigin-RevId: 8133b9cb5f7c00d4fe31c8c2c4b525bc2650bfc0
2020-10-16 20:44:37 +00:00

30 lines
938 B
Diff

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,