]> git.lizzy.rs Git - rust.git/commitdiff
Add missing Debug impls to std_unicode
authorOliver Middleton <olliemail27@gmail.com>
Wed, 22 Nov 2017 00:49:28 +0000 (00:49 +0000)
committerOliver Middleton <olliemail27@gmail.com>
Wed, 22 Nov 2017 00:49:28 +0000 (00:49 +0000)
Also adds #![deny(missing_debug_implementations)] so they don't get
missed again.

src/libstd_unicode/char.rs
src/libstd_unicode/lib.rs
src/libstd_unicode/lossy.rs
src/libstd_unicode/u_str.rs

index e20937c6c7bdb0a983a78347c0be3540b982acdd..0faf5bd912101f16a0a8c9e2578735db09c48dac 100644 (file)
@@ -57,6 +57,7 @@
 /// [`to_lowercase`]: ../../std/primitive.char.html#method.to_lowercase
 /// [`char`]: ../../std/primitive.char.html
 #[stable(feature = "rust1", since = "1.0.0")]
+#[derive(Debug)]
 pub struct ToLowercase(CaseMappingIter);
 
 #[stable(feature = "rust1", since = "1.0.0")]
@@ -78,6 +79,7 @@ impl FusedIterator for ToLowercase {}
 /// [`to_uppercase`]: ../../std/primitive.char.html#method.to_uppercase
 /// [`char`]: ../../std/primitive.char.html
 #[stable(feature = "rust1", since = "1.0.0")]
+#[derive(Debug)]
 pub struct ToUppercase(CaseMappingIter);
 
 #[stable(feature = "rust1", since = "1.0.0")]
@@ -91,6 +93,7 @@ fn next(&mut self) -> Option<char> {
 #[unstable(feature = "fused", issue = "35602")]
 impl FusedIterator for ToUppercase {}
 
+#[derive(Debug)]
 enum CaseMappingIter {
     Three(char, char, char),
     Two(char, char),
@@ -1450,7 +1453,7 @@ pub fn is_ascii_control(&self) -> bool {
 
 /// An iterator that decodes UTF-16 encoded code points from an iterator of `u16`s.
 #[stable(feature = "decode_utf16", since = "1.9.0")]
-#[derive(Clone)]
+#[derive(Clone, Debug)]
 pub struct DecodeUtf16<I>
     where I: Iterator<Item = u16>
 {
index 65058b6554aa6d6a809c22f93764c2cd781dedbf..22f8bdab2f7b52f9b6d13b76f373f5f6d8b331e7 100644 (file)
@@ -28,6 +28,7 @@
        issue_tracker_base_url = "https://github.com/rust-lang/rust/issues/",
        test(no_crate_inject, attr(allow(unused_variables), deny(warnings))))]
 #![deny(warnings)]
+#![deny(missing_debug_implementations)]
 #![no_std]
 
 #![feature(ascii_ctype)]
index 253dcb6a159510735506e2d7ecd988166d4832ed..cc8e93308a5271866e85401eb6e98a774948c634 100644 (file)
@@ -38,6 +38,7 @@ pub fn chunks(&self) -> Utf8LossyChunksIter {
 
 /// Iterator over lossy UTF-8 string
 #[unstable(feature = "str_internals", issue = "0")]
+#[allow(missing_debug_implementations)]
 pub struct Utf8LossyChunksIter<'a> {
     source: &'a [u8],
 }
index 0046e3f7bd0938ca379cbe00b31b4fd022e0d3de..5d1611acb7ee632103f75553b5babdc3f6960640 100644 (file)
@@ -76,6 +76,7 @@ fn trim_right(&self) -> &str {
 
 /// Iterator adaptor for encoding `char`s to UTF-16.
 #[derive(Clone)]
+#[allow(missing_debug_implementations)]
 pub struct Utf16Encoder<I> {
     chars: I,
     extra: u16,