@@ -692,15 +692,15 @@ pub trait IndexMut<Index, Result> {
692692 * println!("Slicing!");
693693 * self
694694 * }
695- * fn slice_from_ <'a>(&'a self, from: &Foo) -> &'a Foo {
695+ * fn slice_from_or_fail <'a>(&'a self, from: &Foo) -> &'a Foo {
696696 * println!("Slicing!");
697697 * self
698698 * }
699- * fn slice_to_ <'a>(&'a self, to: &Foo) -> &'a Foo {
699+ * fn slice_to_or_fail <'a>(&'a self, to: &Foo) -> &'a Foo {
700700 * println!("Slicing!");
701701 * self
702702 * }
703- * fn slice_ <'a>(&'a self, from: &Foo, to: &Foo) -> &'a Foo {
703+ * fn slice_or_fail <'a>(&'a self, from: &Foo, to: &Foo) -> &'a Foo {
704704 * println!("Slicing!");
705705 * self
706706 * }
@@ -711,7 +711,22 @@ pub trait IndexMut<Index, Result> {
711711 * }
712712 * ```
713713 */
714- // FIXME(#17273) remove the postscript _s
714+ #[ cfg( not( stage0) ) ]
715+ #[ lang="slice" ]
716+ pub trait Slice < Idx , Sized ? Result > for Sized ? {
717+ /// The method for the slicing operation foo[]
718+ fn as_slice_ < ' a > ( & ' a self ) -> & ' a Result ;
719+ /// The method for the slicing operation foo[from..]
720+ fn slice_from_or_fail < ' a > ( & ' a self , from : & Idx ) -> & ' a Result ;
721+ /// The method for the slicing operation foo[..to]
722+ fn slice_to_or_fail < ' a > ( & ' a self , to : & Idx ) -> & ' a Result ;
723+ /// The method for the slicing operation foo[from..to]
724+ fn slice_or_fail < ' a > ( & ' a self , from : & Idx , to : & Idx ) -> & ' a Result ;
725+ }
726+ #[ cfg( stage0) ]
727+ /**
728+ *
729+ */
715730#[ lang="slice" ]
716731pub trait Slice < Idx , Sized ? Result > for Sized ? {
717732 /// The method for the slicing operation foo[]
@@ -742,15 +757,15 @@ pub trait Slice<Idx, Sized? Result> for Sized? {
742757 * println!("Slicing!");
743758 * self
744759 * }
745- * fn slice_from_mut_ <'a>(&'a mut self, from: &Foo) -> &'a mut Foo {
760+ * fn slice_from_or_fail_mut <'a>(&'a mut self, from: &Foo) -> &'a mut Foo {
746761 * println!("Slicing!");
747762 * self
748763 * }
749- * fn slice_to_mut_ <'a>(&'a mut self, to: &Foo) -> &'a mut Foo {
764+ * fn slice_to_or_fail_mut <'a>(&'a mut self, to: &Foo) -> &'a mut Foo {
750765 * println!("Slicing!");
751766 * self
752767 * }
753- * fn slice_mut_ <'a>(&'a mut self, from: &Foo, to: &Foo) -> &'a mut Foo {
768+ * fn slice_or_fail_mut <'a>(&'a mut self, from: &Foo, to: &Foo) -> &'a mut Foo {
754769 * println!("Slicing!");
755770 * self
756771 * }
@@ -761,7 +776,22 @@ pub trait Slice<Idx, Sized? Result> for Sized? {
761776 * }
762777 * ```
763778 */
764- // FIXME(#17273) remove the postscript _s
779+ #[ cfg( not( stage0) ) ]
780+ #[ lang="slice_mut" ]
781+ pub trait SliceMut < Idx , Sized ? Result > for Sized ? {
782+ /// The method for the slicing operation foo[]
783+ fn as_mut_slice_ < ' a > ( & ' a mut self ) -> & ' a mut Result ;
784+ /// The method for the slicing operation foo[from..]
785+ fn slice_from_or_fail_mut < ' a > ( & ' a mut self , from : & Idx ) -> & ' a mut Result ;
786+ /// The method for the slicing operation foo[..to]
787+ fn slice_to_or_fail_mut < ' a > ( & ' a mut self , to : & Idx ) -> & ' a mut Result ;
788+ /// The method for the slicing operation foo[from..to]
789+ fn slice_or_fail_mut < ' a > ( & ' a mut self , from : & Idx , to : & Idx ) -> & ' a mut Result ;
790+ }
791+ #[ cfg( stage0) ]
792+ /**
793+ *
794+ */
765795#[ lang="slice_mut" ]
766796pub trait SliceMut < Idx , Sized ? Result > for Sized ? {
767797 /// The method for the slicing operation foo[mut]
0 commit comments