Skip to content

Commit

Permalink
address some FIXMEs whose associated issues were marked as closed
Browse files Browse the repository at this point in the history
remove FIXME(rust-lang#13101) since `assert_receiver_is_total_eq` stays.
remove FIXME(rust-lang#19649) now that stability markers render.
remove FIXME(rust-lang#13642) now the benchmarks were moved.
remove FIXME(rust-lang#6220) now that floating points can be formatted.
remove FIXME(rust-lang#18248) and write tests for `Rc<str>` and `Rc<[u8]>`
remove reference to irelevent issues in FIXME(rust-lang#1697, rust-lang#2178...)
update FIXME(rust-lang#5516) to point to getopts issue 7
update FIXME(rust-lang#7771) to point to RFC 628
update FIXME(rust-lang#19839) to point to issue 26925
  • Loading branch information
nivkner committed Sep 30, 2017
1 parent b7041bf commit ff99111
Show file tree
Hide file tree
Showing 16 changed files with 32 additions and 28 deletions.
2 changes: 1 addition & 1 deletion src/liballoc/binary_heap.rs
Expand Up @@ -926,7 +926,7 @@ impl<'a, T: 'a + fmt::Debug> fmt::Debug for Iter<'a, T> {
}
}

// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
// FIXME(#26925) Remove in favor of `#[derive(Clone)]`
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T> Clone for Iter<'a, T> {
fn clone(&self) -> Iter<'a, T> {
Expand Down
2 changes: 1 addition & 1 deletion src/liballoc/linked_list.rs
Expand Up @@ -80,7 +80,7 @@ impl<'a, T: 'a + fmt::Debug> fmt::Debug for Iter<'a, T> {
}
}

// FIXME #19839: deriving is too aggressive on the bounds (T doesn't need to be Clone).
// FIXME(#26925) Remove in favor of `#[derive(Clone)]`
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T> Clone for Iter<'a, T> {
fn clone(&self) -> Self {
Expand Down
2 changes: 1 addition & 1 deletion src/liballoc/vec_deque.rs
Expand Up @@ -1922,7 +1922,7 @@ impl<'a, T: 'a + fmt::Debug> fmt::Debug for Iter<'a, T> {
}
}

// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
// FIXME(#26925) Remove in favor of `#[derive(Clone)]`
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T> Clone for Iter<'a, T> {
fn clone(&self) -> Iter<'a, T> {
Expand Down
1 change: 0 additions & 1 deletion src/libcore/benches/mem.rs
Expand Up @@ -10,7 +10,6 @@

use test::Bencher;

// FIXME #13642 (these benchmarks should be in another place)
// Completely miscellaneous language-construct benchmarks.
// Static/dynamic method dispatch

Expand Down
4 changes: 2 additions & 2 deletions src/libcore/cmp.rs
Expand Up @@ -162,8 +162,8 @@ pub trait PartialEq<Rhs: ?Sized = Self> {
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
pub trait Eq: PartialEq<Self> {
// FIXME #13101: this method is used solely by #[deriving] to
// assert that every component of a type implements #[deriving]
// this method is used solely by #[deriving] to assert
// that every component of a type implements #[deriving]
// itself, the current deriving infrastructure means doing this
// assertion without using a method on this trait is nearly
// impossible.
Expand Down
1 change: 0 additions & 1 deletion src/libcore/fmt/num.rs
Expand Up @@ -12,7 +12,6 @@

#![allow(deprecated)]

// FIXME: #6220 Implement floating point formatting

use fmt;
use ops::{Div, Rem, Sub};
Expand Down
2 changes: 0 additions & 2 deletions src/libcore/ptr.rs
Expand Up @@ -27,8 +27,6 @@ use nonzero::NonZero;

use cmp::Ordering::{self, Less, Equal, Greater};

// FIXME #19649: intrinsic docs don't render, so these have no docs :(

#[stable(feature = "rust1", since = "1.0.0")]
pub use intrinsics::copy_nonoverlapping;

Expand Down
6 changes: 3 additions & 3 deletions src/libcore/slice/mod.rs
Expand Up @@ -1654,7 +1654,7 @@ impl<'a, T: 'a + fmt::Debug, P> fmt::Debug for Split<'a, T, P> where P: FnMut(&T
}
}

// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
// FIXME(#26925) Remove in favor of `#[derive(Clone)]`
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T, P> Clone for Split<'a, T, P> where P: Clone + FnMut(&T) -> bool {
fn clone(&self) -> Split<'a, T, P> {
Expand Down Expand Up @@ -2093,7 +2093,7 @@ pub struct Windows<'a, T:'a> {
size: usize
}

// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
// FIXME(#26925) Remove in favor of `#[derive(Clone)]`
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T> Clone for Windows<'a, T> {
fn clone(&self) -> Windows<'a, T> {
Expand Down Expand Up @@ -2195,7 +2195,7 @@ pub struct Chunks<'a, T:'a> {
size: usize
}

// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
// FIXME(#26925) Remove in favor of `#[derive(Clone)]`
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T> Clone for Chunks<'a, T> {
fn clone(&self) -> Chunks<'a, T> {
Expand Down
7 changes: 5 additions & 2 deletions src/libcore/tests/hash/mod.rs
Expand Up @@ -12,6 +12,7 @@ mod sip;

use std::hash::{Hash, Hasher};
use std::default::Default;
use std::rc::Rc;

struct MyHasher {
hash: u64,
Expand Down Expand Up @@ -64,12 +65,14 @@ fn test_writer_hasher() {
assert_eq!(hash(& s), 97 + 0xFF);
let s: Box<str> = String::from("a").into_boxed_str();
assert_eq!(hash(& s), 97 + 0xFF);
let s: Rc<&str> = Rc::new("a");
assert_eq!(hash(&s), 97 + 0xFF);
let cs: &[u8] = &[1, 2, 3];
assert_eq!(hash(& cs), 9);
let cs: Box<[u8]> = Box::new([1, 2, 3]);
assert_eq!(hash(& cs), 9);

// FIXME (#18248) Add tests for hashing Rc<str> and Rc<[T]>
let cs: Rc<[u8]> = Rc::new([1, 2, 3]);
assert_eq!(hash(& cs), 9);

let ptr = 5_usize as *const i32;
assert_eq!(hash(&ptr), 5);
Expand Down
11 changes: 8 additions & 3 deletions src/libgetopts/lib.rs
Expand Up @@ -731,7 +731,9 @@ pub fn usage(brief: &str, opts: &[OptGroup]) -> String {
}
}

// FIXME: #5516 should be graphemes not codepoints
// FIXME(https://github.com/rust-lang-nursery/getopts/issues/7)
// should be graphemes not codepoints
//
// here we just need to indent the start of the description
let rowlen = row.chars().count();
if rowlen < 24 {
Expand All @@ -749,14 +751,17 @@ pub fn usage(brief: &str, opts: &[OptGroup]) -> String {
desc_normalized_whitespace.push(' ');
}

// FIXME: #5516 should be graphemes not codepoints
// FIXME(https://github.com/rust-lang-nursery/getopts/issues/7)
// should be graphemes not codepoints
let mut desc_rows = Vec::new();
each_split_within(&desc_normalized_whitespace[..], 54, |substr| {
desc_rows.push(substr.to_owned());
true
});

// FIXME: #5516 should be graphemes not codepoints
// FIXME(https://github.com/rust-lang-nursery/getopts/issues/7)
// should be graphemes not codepoints
//
// wrapped description
row.push_str(&desc_rows.join(&desc_sep[..]));

Expand Down
3 changes: 2 additions & 1 deletion src/librand/isaac.rs
Expand Up @@ -543,7 +543,8 @@ impl Clone for Isaac64Rng {
}

impl Rng for Isaac64Rng {
// FIXME #7771: having next_u32 like this should be unnecessary
// FIXME(https://github.com/rust-lang/rfcs/issues/628)
// having next_u32 like this should be unnecessary
#[inline]
fn next_u32(&mut self) -> u32 {
self.next_u64() as u32
Expand Down
3 changes: 2 additions & 1 deletion src/librand/lib.rs
Expand Up @@ -115,7 +115,8 @@ pub trait Rng: Sized {
///
/// This rarely needs to be called directly, prefer `r.gen()` to
/// `r.next_u32()`.
// FIXME #7771: Should be implemented in terms of next_u64
// FIXME(https://github.com/rust-lang/rfcs/issues/628)
// Should be implemented in terms of next_u64
fn next_u32(&mut self) -> u32;

/// Return the next random u64.
Expand Down
3 changes: 1 addition & 2 deletions src/librustc/hir/mod.rs
Expand Up @@ -916,8 +916,7 @@ impl Stmt_ {
}
}

// FIXME (pending discussion of #1697, #2178...): local should really be
// a refinement on pat.
// FIXME: local should really be a refinement on pat.
/// Local represents a `let` statement, e.g., `let <pat>:<ty> = <expr>;`
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct Local {
Expand Down
6 changes: 3 additions & 3 deletions src/libstd/collections/hash/map.rs
Expand Up @@ -1350,7 +1350,7 @@ pub struct Iter<'a, K: 'a, V: 'a> {
inner: table::Iter<'a, K, V>,
}

// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
// FIXME(#26925) Remove in favor of `#[derive(Clone)]`
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, K, V> Clone for Iter<'a, K, V> {
fn clone(&self) -> Iter<'a, K, V> {
Expand Down Expand Up @@ -1403,7 +1403,7 @@ pub struct Keys<'a, K: 'a, V: 'a> {
inner: Iter<'a, K, V>,
}

// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
// FIXME(#26925) Remove in favor of `#[derive(Clone)]`
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, K, V> Clone for Keys<'a, K, V> {
fn clone(&self) -> Keys<'a, K, V> {
Expand Down Expand Up @@ -1432,7 +1432,7 @@ pub struct Values<'a, K: 'a, V: 'a> {
inner: Iter<'a, K, V>,
}

// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
// FIXME(#26925) Remove in favor of `#[derive(Clone)]`
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, K, V> Clone for Values<'a, K, V> {
fn clone(&self) -> Values<'a, K, V> {
Expand Down
4 changes: 2 additions & 2 deletions src/libstd/collections/hash/table.rs
Expand Up @@ -925,7 +925,7 @@ struct RawBuckets<'a, K, V> {
marker: marker::PhantomData<&'a ()>,
}

// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
// FIXME(#26925) Remove in favor of `#[derive(Clone)]`
impl<'a, K, V> Clone for RawBuckets<'a, K, V> {
fn clone(&self) -> RawBuckets<'a, K, V> {
RawBuckets {
Expand Down Expand Up @@ -976,7 +976,7 @@ pub struct Iter<'a, K: 'a, V: 'a> {
unsafe impl<'a, K: Sync, V: Sync> Sync for Iter<'a, K, V> {}
unsafe impl<'a, K: Sync, V: Sync> Send for Iter<'a, K, V> {}

// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
// FIXME(#26925) Remove in favor of `#[derive(Clone)]`
impl<'a, K, V> Clone for Iter<'a, K, V> {
fn clone(&self) -> Iter<'a, K, V> {
Iter {
Expand Down
3 changes: 1 addition & 2 deletions src/libsyntax/ast.rs
Expand Up @@ -786,8 +786,7 @@ pub enum MacStmtStyle {
NoBraces,
}

// FIXME (pending discussion of #1697, #2178...): local should really be
// a refinement on pat.
// FIXME: local should really be a refinement on pat.
/// Local represents a `let` statement, e.g., `let <pat>:<ty> = <expr>;`
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct Local {
Expand Down

0 comments on commit ff99111

Please sign in to comment.