diff options
| author | Laurențiu Nicola <lnicola@users.noreply.github.com> | 2025-03-10 09:52:17 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-10 09:52:17 +0000 |
| commit | 52f39ffe8320955868ce03eb22d9020c568472da (patch) | |
| tree | 6e32a4f4ff812cdbfb923b455777d48dbb1c45aa /compiler/rustc_serialize/src | |
| parent | af32b22982ef0244cf4cf6a7f7b63274429289f8 (diff) | |
| parent | 1d983bf7941bb89985d53e741cabcf113912a40d (diff) | |
| download | rust-52f39ffe8320955868ce03eb22d9020c568472da.tar.gz rust-52f39ffe8320955868ce03eb22d9020c568472da.zip | |
Merge pull request #19331 from lnicola/sync-from-rust
minor: Sync from downstream
Diffstat (limited to 'compiler/rustc_serialize/src')
| -rw-r--r-- | compiler/rustc_serialize/src/leb128.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_serialize/src/lib.rs | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_serialize/src/leb128.rs b/compiler/rustc_serialize/src/leb128.rs index aa7c2858466..4a475805697 100644 --- a/compiler/rustc_serialize/src/leb128.rs +++ b/compiler/rustc_serialize/src/leb128.rs @@ -7,7 +7,7 @@ use crate::serialize::Decoder; /// Returns the length of the longest LEB128 encoding for `T`, assuming `T` is an integer type pub const fn max_leb128_len<T>() -> usize { // The longest LEB128 encoding for an integer uses 7 bits per byte. - (std::mem::size_of::<T>() * 8 + 6) / 7 + (size_of::<T>() * 8 + 6) / 7 } /// Returns the length of the longest LEB128 encoding of all supported integer types. diff --git a/compiler/rustc_serialize/src/lib.rs b/compiler/rustc_serialize/src/lib.rs index 9e9b78cfdd5..13c1a273eb8 100644 --- a/compiler/rustc_serialize/src/lib.rs +++ b/compiler/rustc_serialize/src/lib.rs @@ -14,7 +14,6 @@ #![feature(min_specialization)] #![feature(never_type)] #![feature(rustdoc_internals)] -#![warn(unreachable_pub)] // tidy-alphabetical-end pub use self::serialize::{Decodable, Decoder, Encodable, Encoder}; |
