diff --git a/src/libcollectionstest/btree/set.rs b/src/libcollectionstest/btree/set.rs index e7593bfcfe556..8fcfe97f42afc 100644 --- a/src/libcollectionstest/btree/set.rs +++ b/src/libcollectionstest/btree/set.rs @@ -148,15 +148,9 @@ fn test_zip() { let y = y; let mut z = x.iter().zip(&y); - // FIXME: #5801: this needs a type hint to compile... - let result: Option<(&usize, & &'static str)> = z.next(); - assert_eq!(result.unwrap(), (&5, &("bar"))); - - let result: Option<(&usize, & &'static str)> = z.next(); - assert_eq!(result.unwrap(), (&11, &("foo"))); - - let result: Option<(&usize, & &'static str)> = z.next(); - assert!(result.is_none()); + assert_eq!(z.next().unwrap(), (&5, &("bar"))); + assert_eq!(z.next().unwrap(), (&11, &("foo"))); + assert!(z.next().is_none()); } #[test] diff --git a/src/libcoretest/cell.rs b/src/libcoretest/cell.rs index 20740a5e2cebc..309a3d51c7602 100644 --- a/src/libcoretest/cell.rs +++ b/src/libcoretest/cell.rs @@ -248,15 +248,14 @@ fn unsafe_cell_unsized() { assert_eq!(unsafe { &mut *cell.get() }, comp); } -// FIXME(#25351) needs deeply nested coercions of DST structs. -// #[test] -// fn refcell_unsized() { -// let cell: &RefCell<[i32]> = &RefCell::new([1, 2, 3]); -// { -// let b = &mut *cell.borrow_mut(); -// b[0] = 4; -// b[2] = 5; -// } -// let comp: &mut [i32] = &mut [4, 2, 5]; -// assert_eq!(&*cell.borrow(), comp); -// } +#[test] +fn refcell_unsized() { + let cell: &RefCell<[i32]> = &RefCell::new([1, 2, 3]); + { + let b = &mut *cell.borrow_mut(); + b[0] = 4; + b[2] = 5; + } + let comp: &mut [i32] = &mut [4, 2, 5]; + assert_eq!(&*cell.borrow(), comp); +} diff --git a/src/librustc/lint/mod.rs b/src/librustc/lint/mod.rs index 7a5b5aa1da08c..4295652b04e59 100644 --- a/src/librustc/lint/mod.rs +++ b/src/librustc/lint/mod.rs @@ -89,7 +89,6 @@ macro_rules! lint_initializer { /// Declare a static item of type `&'static Lint`. #[macro_export] macro_rules! declare_lint { - // FIXME(#14660): deduplicate (pub $name:ident, $level:ident, $desc:expr) => ( pub static $name: &'static ::rustc::lint::Lint = &lint_initializer!($name, $level, $desc); diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index efe5a73fad216..b311ddc4f4515 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -211,7 +211,7 @@ pub fn main_args(args: &[String]) -> isize { for &(name, _, description) in PASSES { println!("{:>20} - {}", name, description); } - println!("{}", "\nDefault passes for rustdoc:"); // FIXME: #9970 + println!("\nDefault passes for rustdoc:"); for &name in DEFAULT_PASSES { println!("{:>20}", name); } diff --git a/src/libserialize/json.rs b/src/libserialize/json.rs index 4bcaa4b5dbc75..452feed3cdb4e 100644 --- a/src/libserialize/json.rs +++ b/src/libserialize/json.rs @@ -76,8 +76,7 @@ //! Create a struct called `TestStruct` and serialize and deserialize it to and from JSON using the //! serialization API, using the derived serialization code. //! -//! ```notrust -//! // FIXME(#19470): this cannot be ```rust``` because it fails orphan checking at the moment +//! ```rust //! extern crate serialize; //! use serialize::json; //! @@ -111,8 +110,7 @@ //! //! ### Simple example of `ToJson` usage //! -//! ```notrust -//! // FIXME(#19470): this cannot be ```rust``` because it fails orphan checking at the moment +//! ```rust //! extern crate serialize; //! use serialize::json::{self, ToJson, Json}; //! @@ -151,8 +149,7 @@ //! //! ### Verbose example of `ToJson` usage //! -//! ```notrust -//! // FIXME(#19470): this cannot be ```rust``` because it fails orphan checking at the moment +//! ```rust //! extern crate serialize; //! use std::collections::BTreeMap; //! use serialize::json::{self, Json, ToJson}; diff --git a/src/libstd/sync/mutex.rs b/src/libstd/sync/mutex.rs index 846a97b547dc6..f1d264b38a0c7 100644 --- a/src/libstd/sync/mutex.rs +++ b/src/libstd/sync/mutex.rs @@ -536,16 +536,15 @@ mod tests { assert_eq!(*lock, 2); } - // FIXME(#25351) needs deeply nested coercions of DST structs. - // #[test] - // fn test_mutex_unsized() { - // let mutex: &Mutex<[i32]> = &Mutex::new([1, 2, 3]); - // { - // let b = &mut *mutex.lock().unwrap(); - // b[0] = 4; - // b[2] = 5; - // } - // let comp: &[i32] = &[4, 2, 5]; - // assert_eq!(&*mutex.lock().unwrap(), comp); - // } + #[test] + fn test_mutex_unsized() { + let mutex: &Mutex<[i32]> = &Mutex::new([1, 2, 3]); + { + let b = &mut *mutex.lock().unwrap(); + b[0] = 4; + b[2] = 5; + } + let comp: &[i32] = &[4, 2, 5]; + assert_eq!(&*mutex.lock().unwrap(), comp); + } } diff --git a/src/libstd/sync/rwlock.rs b/src/libstd/sync/rwlock.rs index 7210328fad805..04ad47082464e 100644 --- a/src/libstd/sync/rwlock.rs +++ b/src/libstd/sync/rwlock.rs @@ -578,18 +578,17 @@ mod tests { assert_eq!(*lock, 2); } - // FIXME(#25351) needs deeply nested coercions of DST structs. - // #[test] - // fn test_rwlock_unsized() { - // let rw: &RwLock<[i32]> = &RwLock::new([1, 2, 3]); - // { - // let b = &mut *rw.write().unwrap(); - // b[0] = 4; - // b[2] = 5; - // } - // let comp: &[i32] = &[4, 2, 5]; - // assert_eq!(&*rw.read().unwrap(), comp); - // } + #[test] + fn test_rwlock_unsized() { + let rw: &RwLock<[i32]> = &RwLock::new([1, 2, 3]); + { + let b = &mut *rw.write().unwrap(); + b[0] = 4; + b[2] = 5; + } + let comp: &[i32] = &[4, 2, 5]; + assert_eq!(&*rw.read().unwrap(), comp); + } #[test] fn test_rwlock_try_write() { diff --git a/src/libstd/sys/common/wtf8.rs b/src/libstd/sys/common/wtf8.rs index 633e7d78a9aeb..10f77d0207cd2 100644 --- a/src/libstd/sys/common/wtf8.rs +++ b/src/libstd/sys/common/wtf8.rs @@ -31,7 +31,6 @@ use core::str::next_code_point; use ascii::*; use borrow::Cow; use char; -use cmp; use fmt; use hash::{Hash, Hasher}; use iter::FromIterator; @@ -375,6 +374,7 @@ impl Extend for Wtf8Buf { /// /// Similar to `&str`, but can additionally contain surrogate code points /// if they’re not in a surrogate pair. +#[derive(Eq, Ord, PartialEq, PartialOrd)] pub struct Wtf8 { bytes: [u8] } @@ -383,36 +383,6 @@ impl AsInner<[u8]> for Wtf8 { fn as_inner(&self) -> &[u8] { &self.bytes } } -// FIXME: https://github.com/rust-lang/rust/issues/18805 -impl PartialEq for Wtf8 { - fn eq(&self, other: &Wtf8) -> bool { self.bytes.eq(&other.bytes) } -} - -// FIXME: https://github.com/rust-lang/rust/issues/18805 -impl Eq for Wtf8 {} - -// FIXME: https://github.com/rust-lang/rust/issues/18738 -impl PartialOrd for Wtf8 { - #[inline] - fn partial_cmp(&self, other: &Wtf8) -> Option { - self.bytes.partial_cmp(&other.bytes) - } - #[inline] - fn lt(&self, other: &Wtf8) -> bool { self.bytes.lt(&other.bytes) } - #[inline] - fn le(&self, other: &Wtf8) -> bool { self.bytes.le(&other.bytes) } - #[inline] - fn gt(&self, other: &Wtf8) -> bool { self.bytes.gt(&other.bytes) } - #[inline] - fn ge(&self, other: &Wtf8) -> bool { self.bytes.ge(&other.bytes) } -} - -// FIXME: https://github.com/rust-lang/rust/issues/18738 -impl Ord for Wtf8 { - #[inline] - fn cmp(&self, other: &Wtf8) -> cmp::Ordering { self.bytes.cmp(&other.bytes) } -} - /// Format the slice with double quotes, /// and surrogates as `\u` followed by four hexadecimal digits. /// Example: `"a\u{D800}"` for a slice with code points [U+0061, U+D800] diff --git a/src/rustbook/main.rs b/src/rustbook/main.rs index 81f8c8c40fdff..17a34cdc611a2 100644 --- a/src/rustbook/main.rs +++ b/src/rustbook/main.rs @@ -39,7 +39,6 @@ mod javascript; static EXIT_STATUS: AtomicIsize = ATOMIC_ISIZE_INIT; -#[cfg(not(test))] // thanks #12327 fn main() { let mut term = Term::new(); let cmd: Vec<_> = env::args().collect(); diff --git a/src/test/bench/core-map.rs b/src/test/bench/core-map.rs index ebb8036bacf1b..a72e348c72018 100644 --- a/src/test/bench/core-map.rs +++ b/src/test/bench/core-map.rs @@ -126,8 +126,7 @@ fn main() { println!("{} keys", n_keys); - // FIXME: #9970 - println!("{}", "\nBTreeMap:"); + println!("\nBTreeMap:"); { let mut map: BTreeMap = BTreeMap::new(); @@ -145,8 +144,7 @@ fn main() { vector(&mut map, n_keys, &rand); } - // FIXME: #9970 - println!("{}", "\nHashMap:"); + println!("\nHashMap:"); { let mut map: HashMap = HashMap::new(); diff --git a/src/test/compile-fail/borrowck-borrow-overloaded-auto-deref-mut.rs b/src/test/compile-fail/borrowck-borrow-overloaded-auto-deref-mut.rs index dd278faa0dc6a..497b0e63edfc1 100644 --- a/src/test/compile-fail/borrowck-borrow-overloaded-auto-deref-mut.rs +++ b/src/test/compile-fail/borrowck-borrow-overloaded-auto-deref-mut.rs @@ -111,12 +111,9 @@ fn assign_field4<'a>(x: &'a mut Own) { x.y = 3; //~ ERROR cannot borrow } -// FIXME(eddyb) #12825 This shouldn't attempt to call deref_mut. -/* fn deref_imm_method(x: Own) { let __isize = x.get(); } -*/ fn deref_mut_method1(x: Own) { x.set(0, 0); //~ ERROR cannot borrow diff --git a/src/test/compile-fail/feature-gated-feature-in-macro-arg.rs b/src/test/compile-fail/feature-gated-feature-in-macro-arg.rs index 54bdaf011c875..ae342af4a52af 100644 --- a/src/test/compile-fail/feature-gated-feature-in-macro-arg.rs +++ b/src/test/compile-fail/feature-gated-feature-in-macro-arg.rs @@ -8,14 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// FIXME #20661: format_args! emits calls to the unstable std::fmt::rt -// module, so the compiler has some hacks to make that possible -// (in span_is_internal). Unnfortunately those hacks defeat this -// particular scenario of checking feature gates in arguments to -// println!(). - -// ignore-test - // tests that input to a macro is checked for use of gated features. If this // test succeeds due to the acceptance of a feature, pick a new feature to // test. Not ideal, but oh well :( diff --git a/src/test/run-pass/issue-5060.rs b/src/test/run-pass/issue-5060.rs index 5726f236e2e0b..21e3343f44586 100644 --- a/src/test/run-pass/issue-5060.rs +++ b/src/test/run-pass/issue-5060.rs @@ -16,8 +16,7 @@ macro_rules! print_hd_tl { print!("{}", stringify!($field_tl)); print!(", "); )+ - // FIXME: #9970 - print!("{}", "]\n"); + print!("]\n"); }) } diff --git a/src/test/run-pass/lambda-var-hygiene.rs b/src/test/run-pass/lambda-var-hygiene.rs index e5bdca1a06773..ae5bf71d15fe4 100644 --- a/src/test/run-pass/lambda-var-hygiene.rs +++ b/src/test/run-pass/lambda-var-hygiene.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-test #9383 - // shouldn't affect evaluation of $ex: macro_rules! bad_macro { ($ex:expr) => ({(|_x| { $ex }) (9) }) diff --git a/src/test/rustdoc/hidden-line.rs b/src/test/rustdoc/hidden-line.rs index af67f7e2c1fb7..e05d51c2bac58 100644 --- a/src/test/rustdoc/hidden-line.rs +++ b/src/test/rustdoc/hidden-line.rs @@ -12,8 +12,6 @@ /// retained. /// /// ```rust -/// mod to_make_deriving_work { // FIXME #4913 -/// /// # #[derive(PartialEq)] // invisible /// # struct Foo; // invisible /// @@ -24,8 +22,6 @@ /// let x = Bar(Foo); /// assert_eq!(x, x); // check that the derivings worked /// } -/// -/// } /// ``` pub fn foo() {}