Skip to content

Commit fb09464

Browse files
committed
Add missing Debug impls to std_unicode
Also adds #![deny(missing_debug_implementations)] so they don't get missed again.
1 parent 63739ab commit fb09464

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

src/libstd_unicode/char.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ pub use tables::{UnicodeVersion, UNICODE_VERSION};
5757
/// [`to_lowercase`]: ../../std/primitive.char.html#method.to_lowercase
5858
/// [`char`]: ../../std/primitive.char.html
5959
#[stable(feature = "rust1", since = "1.0.0")]
60+
#[derive(Debug)]
6061
pub struct ToLowercase(CaseMappingIter);
6162

6263
#[stable(feature = "rust1", since = "1.0.0")]
@@ -78,6 +79,7 @@ impl FusedIterator for ToLowercase {}
7879
/// [`to_uppercase`]: ../../std/primitive.char.html#method.to_uppercase
7980
/// [`char`]: ../../std/primitive.char.html
8081
#[stable(feature = "rust1", since = "1.0.0")]
82+
#[derive(Debug)]
8183
pub struct ToUppercase(CaseMappingIter);
8284

8385
#[stable(feature = "rust1", since = "1.0.0")]
@@ -91,6 +93,7 @@ impl Iterator for ToUppercase {
9193
#[unstable(feature = "fused", issue = "35602")]
9294
impl FusedIterator for ToUppercase {}
9395

96+
#[derive(Debug)]
9497
enum CaseMappingIter {
9598
Three(char, char, char),
9699
Two(char, char),
@@ -1450,7 +1453,7 @@ impl char {
14501453

14511454
/// An iterator that decodes UTF-16 encoded code points from an iterator of `u16`s.
14521455
#[stable(feature = "decode_utf16", since = "1.9.0")]
1453-
#[derive(Clone)]
1456+
#[derive(Clone, Debug)]
14541457
pub struct DecodeUtf16<I>
14551458
where I: Iterator<Item = u16>
14561459
{

src/libstd_unicode/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
issue_tracker_base_url = "https://github.com/rust-lang/rust/issues/",
2929
test(no_crate_inject, attr(allow(unused_variables), deny(warnings))))]
3030
#![deny(warnings)]
31+
#![deny(missing_debug_implementations)]
3132
#![no_std]
3233

3334
#![feature(ascii_ctype)]

src/libstd_unicode/lossy.rs

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ impl Utf8Lossy {
3838

3939
/// Iterator over lossy UTF-8 string
4040
#[unstable(feature = "str_internals", issue = "0")]
41+
#[allow(missing_debug_implementations)]
4142
pub struct Utf8LossyChunksIter<'a> {
4243
source: &'a [u8],
4344
}

src/libstd_unicode/u_str.rs

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ impl UnicodeStr for str {
7676

7777
/// Iterator adaptor for encoding `char`s to UTF-16.
7878
#[derive(Clone)]
79+
#[allow(missing_debug_implementations)]
7980
pub struct Utf16Encoder<I> {
8081
chars: I,
8182
extra: u16,

0 commit comments

Comments
 (0)